nb/intel/sandybridge: Set up console in bootblock
Change-Id: Ia041b63201b2a4a2fe6ab11e3497c460f88061d1
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36784
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/src/mainboard/apple/macbookair4_2/Makefile.inc b/src/mainboard/apple/macbookair4_2/Makefile.inc
index da82193..665a95f 100644
--- a/src/mainboard/apple/macbookair4_2/Makefile.inc
+++ b/src/mainboard/apple/macbookair4_2/Makefile.inc
@@ -7,3 +7,5 @@
spd.bin-type := spd
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/apple/macbookair4_2/romstage.c b/src/mainboard/apple/macbookair4_2/early_init.c
similarity index 97%
rename from src/mainboard/apple/macbookair4_2/romstage.c
rename to src/mainboard/apple/macbookair4_2/early_init.c
index f445eea..bfd070c 100644
--- a/src/mainboard/apple/macbookair4_2/romstage.c
+++ b/src/mainboard/apple/macbookair4_2/early_init.c
@@ -49,10 +49,6 @@
{ 1, 0, -1 },
};
-void mainboard_config_superio(void)
-{
-}
-
void mainboard_get_spd(spd_raw_data *spd, bool id_only)
{
void *spd_file;
diff --git a/src/mainboard/asrock/b75pro3-m/Makefile.inc b/src/mainboard/asrock/b75pro3-m/Makefile.inc
index df00e37..598cd90 100644
--- a/src/mainboard/asrock/b75pro3-m/Makefile.inc
+++ b/src/mainboard/asrock/b75pro3-m/Makefile.inc
@@ -17,3 +17,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/asrock/b75pro3-m/romstage.c b/src/mainboard/asrock/b75pro3-m/early_init.c
similarity index 95%
rename from src/mainboard/asrock/b75pro3-m/romstage.c
rename to src/mainboard/asrock/b75pro3-m/early_init.c
index 983de07..296c2de 100644
--- a/src/mainboard/asrock/b75pro3-m/romstage.c
+++ b/src/mainboard/asrock/b75pro3-m/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <device/pnp_ops.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -40,7 +41,7 @@
{ 1, 0, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
/* Set GPIOs on superio, enable UART */
nuvoton_pnp_enter_conf_state(SERIAL_DEV);
diff --git a/src/mainboard/asus/h61m-cs/Makefile.inc b/src/mainboard/asus/h61m-cs/Makefile.inc
index af2b674..f0b34f9 100644
--- a/src/mainboard/asus/h61m-cs/Makefile.inc
+++ b/src/mainboard/asus/h61m-cs/Makefile.inc
@@ -1,3 +1,5 @@
bootblock-y += gpio.c
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/asus/h61m-cs/romstage.c b/src/mainboard/asus/h61m-cs/early_init.c
similarity index 95%
rename from src/mainboard/asus/h61m-cs/romstage.c
rename to src/mainboard/asus/h61m-cs/early_init.c
index 2aa243f..2720e7a 100644
--- a/src/mainboard/asus/h61m-cs/romstage.c
+++ b/src/mainboard/asus/h61m-cs/early_init.c
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <device/pci_ops.h>
#include <device/pnp_ops.h>
@@ -44,7 +45,7 @@
{ 1, 0, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
nuvoton_pnp_enter_conf_state(SIO_DEV);
pnp_set_logical_device(ACPI_DEV);
diff --git a/src/mainboard/asus/maximus_iv_gene-z/Makefile.inc b/src/mainboard/asus/maximus_iv_gene-z/Makefile.inc
index 0547b4d..be8d9c3 100644
--- a/src/mainboard/asus/maximus_iv_gene-z/Makefile.inc
+++ b/src/mainboard/asus/maximus_iv_gene-z/Makefile.inc
@@ -17,3 +17,5 @@
bootblock-y += gpio.c
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/asus/maximus_iv_gene-z/romstage.c b/src/mainboard/asus/maximus_iv_gene-z/early_init.c
similarity index 95%
rename from src/mainboard/asus/maximus_iv_gene-z/romstage.c
rename to src/mainboard/asus/maximus_iv_gene-z/early_init.c
index c1e3975..4b4fbbe 100644
--- a/src/mainboard/asus/maximus_iv_gene-z/romstage.c
+++ b/src/mainboard/asus/maximus_iv_gene-z/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pnp_ops.h>
#include <device/pci_ops.h>
#include <device/dram/ddr3.h>
@@ -40,7 +41,7 @@
{ 1, 0, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
static const pnp_devfn_t GLOBAL_PSEUDO_DEV = PNP_DEV(0x2e, 0);
static const pnp_devfn_t ACPI_DEV = PNP_DEV(0x2e, NCT6776_ACPI);
diff --git a/src/mainboard/asus/p8h61-m_lx/Makefile.inc b/src/mainboard/asus/p8h61-m_lx/Makefile.inc
index 9ee5136..28f5e60 100644
--- a/src/mainboard/asus/p8h61-m_lx/Makefile.inc
+++ b/src/mainboard/asus/p8h61-m_lx/Makefile.inc
@@ -17,3 +17,5 @@
bootblock-y += gpio.c
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/asus/p8h61-m_lx/romstage.c b/src/mainboard/asus/p8h61-m_lx/early_init.c
similarity index 95%
rename from src/mainboard/asus/p8h61-m_lx/romstage.c
rename to src/mainboard/asus/p8h61-m_lx/early_init.c
index d336191..7dc8cd5 100644
--- a/src/mainboard/asus/p8h61-m_lx/romstage.c
+++ b/src/mainboard/asus/p8h61-m_lx/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <device/dram/ddr3.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -47,7 +48,7 @@
CNF1_LPC_EN | KBC_LPC_EN | LPT_LPC_EN | COMA_LPC_EN);
}
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
}
diff --git a/src/mainboard/asus/p8h61-m_pro/Makefile.inc b/src/mainboard/asus/p8h61-m_pro/Makefile.inc
index 620a9c0..e402ffa 100644
--- a/src/mainboard/asus/p8h61-m_pro/Makefile.inc
+++ b/src/mainboard/asus/p8h61-m_pro/Makefile.inc
@@ -2,3 +2,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/asus/p8h61-m_pro/romstage.c b/src/mainboard/asus/p8h61-m_pro/early_init.c
similarity index 96%
rename from src/mainboard/asus/p8h61-m_pro/romstage.c
rename to src/mainboard/asus/p8h61-m_pro/early_init.c
index ff5a677..4b02505 100644
--- a/src/mainboard/asus/p8h61-m_pro/romstage.c
+++ b/src/mainboard/asus/p8h61-m_pro/early_init.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <device/pnp_ops.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -49,7 +50,7 @@
{ 1, 0, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
/* Enable UART */
nuvoton_pnp_enter_conf_state(GLOBAL_DEV);
diff --git a/src/mainboard/asus/p8z77-m_pro/Makefile.inc b/src/mainboard/asus/p8z77-m_pro/Makefile.inc
index 8fc0ead..e9fbd3c 100644
--- a/src/mainboard/asus/p8z77-m_pro/Makefile.inc
+++ b/src/mainboard/asus/p8z77-m_pro/Makefile.inc
@@ -18,3 +18,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/asus/p8z77-m_pro/romstage.c b/src/mainboard/asus/p8z77-m_pro/early_init.c
similarity index 98%
rename from src/mainboard/asus/p8z77-m_pro/romstage.c
rename to src/mainboard/asus/p8z77-m_pro/early_init.c
index 4963c31..ce479a8 100644
--- a/src/mainboard/asus/p8z77-m_pro/romstage.c
+++ b/src/mainboard/asus/p8z77-m_pro/early_init.c
@@ -13,6 +13,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <device/pnp_ops.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
@@ -48,7 +49,7 @@
{ 0, 2, 6 } /* Port 13: Unused. Asus propietary DEBUG_PORT ??? */
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
/* Setup COM/UART */
nuvoton_pnp_enter_conf_state(GLOBAL_DEV);
diff --git a/src/mainboard/compulab/intense_pc/Makefile.inc b/src/mainboard/compulab/intense_pc/Makefile.inc
index 620a9c0..e402ffa 100644
--- a/src/mainboard/compulab/intense_pc/Makefile.inc
+++ b/src/mainboard/compulab/intense_pc/Makefile.inc
@@ -2,3 +2,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/compulab/intense_pc/romstage.c b/src/mainboard/compulab/intense_pc/early_init.c
similarity index 96%
rename from src/mainboard/compulab/intense_pc/romstage.c
rename to src/mainboard/compulab/intense_pc/early_init.c
index 4176703..73acc46 100644
--- a/src/mainboard/compulab/intense_pc/romstage.c
+++ b/src/mainboard/compulab/intense_pc/early_init.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <stdint.h>
#include <arch/io.h>
#include <device/pci_ops.h>
@@ -60,7 +61,7 @@
{ 1, 0, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
const u16 port = SIO_PORT;
const u16 runtime_port = 0x180;
diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/Makefile.inc b/src/mainboard/gigabyte/ga-b75m-d3h/Makefile.inc
index f5b33bd..0abe482 100644
--- a/src/mainboard/gigabyte/ga-b75m-d3h/Makefile.inc
+++ b/src/mainboard/gigabyte/ga-b75m-d3h/Makefile.inc
@@ -21,3 +21,5 @@
subdirs-y += variants/$(VARIANT_DIR)
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/romstage.c b/src/mainboard/gigabyte/ga-b75m-d3h/early_init.c
similarity index 97%
rename from src/mainboard/gigabyte/ga-b75m-d3h/romstage.c
rename to src/mainboard/gigabyte/ga-b75m-d3h/early_init.c
index a5d4c35..0a863ff 100644
--- a/src/mainboard/gigabyte/ga-b75m-d3h/romstage.c
+++ b/src/mainboard/gigabyte/ga-b75m-d3h/early_init.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
@@ -30,7 +31,7 @@
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
/* Initialize SuperIO */
ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
diff --git a/src/mainboard/gigabyte/ga-h61m-s2pv/Makefile.inc b/src/mainboard/gigabyte/ga-h61m-s2pv/Makefile.inc
index 5166ce0..9916927 100644
--- a/src/mainboard/gigabyte/ga-h61m-s2pv/Makefile.inc
+++ b/src/mainboard/gigabyte/ga-h61m-s2pv/Makefile.inc
@@ -3,3 +3,5 @@
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/gigabyte/ga-h61m-s2pv/romstage.c b/src/mainboard/gigabyte/ga-h61m-s2pv/early_init.c
similarity index 95%
rename from src/mainboard/gigabyte/ga-h61m-s2pv/romstage.c
rename to src/mainboard/gigabyte/ga-h61m-s2pv/early_init.c
index a68070f..4157b09 100644
--- a/src/mainboard/gigabyte/ga-h61m-s2pv/romstage.c
+++ b/src/mainboard/gigabyte/ga-h61m-s2pv/early_init.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
@@ -40,7 +41,7 @@
{ 1, 0, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
if (!CONFIG(NO_UART_ON_SUPERIO)) {
/* Enable serial port */
diff --git a/src/mainboard/google/butterfly/Makefile.inc b/src/mainboard/google/butterfly/Makefile.inc
index fa9a4a9..18f2006 100644
--- a/src/mainboard/google/butterfly/Makefile.inc
+++ b/src/mainboard/google/butterfly/Makefile.inc
@@ -23,3 +23,5 @@
smm-y += mainboard_smi.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/google/butterfly/romstage.c b/src/mainboard/google/butterfly/early_init.c
similarity index 98%
rename from src/mainboard/google/butterfly/romstage.c
rename to src/mainboard/google/butterfly/early_init.c
index e1d948d..d6566d1 100644
--- a/src/mainboard/google/butterfly/romstage.c
+++ b/src/mainboard/google/butterfly/early_init.c
@@ -112,11 +112,6 @@
read_spd(&spd[2], 0x52, id_only);
}
-void mainboard_config_superio(void)
-{
-}
-
-
void mainboard_fill_pei_data(struct pei_data *pei_data)
{
struct pei_data pei_data_template = {
diff --git a/src/mainboard/google/link/Makefile.inc b/src/mainboard/google/link/Makefile.inc
index 724150c..22c28c8 100644
--- a/src/mainboard/google/link/Makefile.inc
+++ b/src/mainboard/google/link/Makefile.inc
@@ -42,3 +42,5 @@
spd.bin-type := spd
bootblock-y += gpio.c
romstage-y += gpio.c
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/google/link/romstage.c b/src/mainboard/google/link/early_init.c
similarity index 98%
rename from src/mainboard/google/link/romstage.c
rename to src/mainboard/google/link/early_init.c
index 3fd90e9..9d985e62 100644
--- a/src/mainboard/google/link/romstage.c
+++ b/src/mainboard/google/link/early_init.c
@@ -201,7 +201,3 @@
{
return !s3resume;
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/google/parrot/Makefile.inc b/src/mainboard/google/parrot/Makefile.inc
index 67324bd..a2ed11e 100644
--- a/src/mainboard/google/parrot/Makefile.inc
+++ b/src/mainboard/google/parrot/Makefile.inc
@@ -21,3 +21,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/google/parrot/romstage.c b/src/mainboard/google/parrot/early_init.c
similarity index 98%
rename from src/mainboard/google/parrot/romstage.c
rename to src/mainboard/google/parrot/early_init.c
index caff3f5..3c07dc8 100644
--- a/src/mainboard/google/parrot/romstage.c
+++ b/src/mainboard/google/parrot/early_init.c
@@ -155,10 +155,6 @@
read_spd(&spd[2], 0x52, id_only);
}
-void mainboard_config_superio(void)
-{
-}
-
int mainboard_should_reset_usb(int s3resume)
{
return !s3resume;
diff --git a/src/mainboard/google/stout/Makefile.inc b/src/mainboard/google/stout/Makefile.inc
index 59ac22d..3add362 100644
--- a/src/mainboard/google/stout/Makefile.inc
+++ b/src/mainboard/google/stout/Makefile.inc
@@ -26,3 +26,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/google/stout/romstage.c b/src/mainboard/google/stout/early_init.c
similarity index 98%
rename from src/mainboard/google/stout/romstage.c
rename to src/mainboard/google/stout/early_init.c
index d8e04ea..6ee982ad 100644
--- a/src/mainboard/google/stout/romstage.c
+++ b/src/mainboard/google/stout/early_init.c
@@ -198,10 +198,6 @@
return !s3resume;
}
-void mainboard_config_superio(void)
-{
-}
-
const struct southbridge_usb_port mainboard_usb_ports[] = {
/* enabled usb oc pin length */
{1, 0, 0}, /* P0: USB 3.0 1 (OC0) */
diff --git a/src/mainboard/hp/2570p/Makefile.inc b/src/mainboard/hp/2570p/Makefile.inc
index 4fbf73b..1d25875 100644
--- a/src/mainboard/hp/2570p/Makefile.inc
+++ b/src/mainboard/hp/2570p/Makefile.inc
@@ -17,3 +17,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/2570p/romstage.c b/src/mainboard/hp/2570p/early_init.c
similarity index 94%
rename from src/mainboard/hp/2570p/romstage.c
rename to src/mainboard/hp/2570p/early_init.c
index f1d1e90..226367a 100644
--- a/src/mainboard/hp/2570p/romstage.c
+++ b/src/mainboard/hp/2570p/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -37,7 +38,7 @@
{ 0, 0, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
kbc1126_enter_conf();
kbc1126_mailbox_init();
diff --git a/src/mainboard/hp/2760p/Makefile.inc b/src/mainboard/hp/2760p/Makefile.inc
index 4fbf73b..1d25875 100644
--- a/src/mainboard/hp/2760p/Makefile.inc
+++ b/src/mainboard/hp/2760p/Makefile.inc
@@ -17,3 +17,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/2760p/romstage.c b/src/mainboard/hp/2760p/early_init.c
similarity index 94%
rename from src/mainboard/hp/2760p/romstage.c
rename to src/mainboard/hp/2760p/early_init.c
index acf5b18..98806de 100644
--- a/src/mainboard/hp/2760p/romstage.c
+++ b/src/mainboard/hp/2760p/early_init.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -36,7 +37,7 @@
{ 1, 1, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
kbc1126_enter_conf();
kbc1126_mailbox_init();
diff --git a/src/mainboard/hp/8460p/Makefile.inc b/src/mainboard/hp/8460p/Makefile.inc
index 4fbf73b..1d25875 100644
--- a/src/mainboard/hp/8460p/Makefile.inc
+++ b/src/mainboard/hp/8460p/Makefile.inc
@@ -17,3 +17,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/8460p/romstage.c b/src/mainboard/hp/8460p/early_init.c
similarity index 95%
rename from src/mainboard/hp/8460p/romstage.c
rename to src/mainboard/hp/8460p/early_init.c
index 4e4b175..9c2a4b1 100644
--- a/src/mainboard/hp/8460p/romstage.c
+++ b/src/mainboard/hp/8460p/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -40,7 +41,7 @@
{ 1, 0, 6 }, /* docking */
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
lpc47n217_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
kbc1126_enter_conf();
diff --git a/src/mainboard/hp/8470p/Makefile.inc b/src/mainboard/hp/8470p/Makefile.inc
index 4fbf73b..1d25875 100644
--- a/src/mainboard/hp/8470p/Makefile.inc
+++ b/src/mainboard/hp/8470p/Makefile.inc
@@ -17,3 +17,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/8470p/romstage.c b/src/mainboard/hp/8470p/early_init.c
similarity index 94%
rename from src/mainboard/hp/8470p/romstage.c
rename to src/mainboard/hp/8470p/early_init.c
index 8c9b29e..8dbe158 100644
--- a/src/mainboard/hp/8470p/romstage.c
+++ b/src/mainboard/hp/8470p/early_init.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -39,7 +40,7 @@
{ 1, 0, 6 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
lpc47n217_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
kbc1126_enter_conf();
diff --git a/src/mainboard/hp/8770w/Makefile.inc b/src/mainboard/hp/8770w/Makefile.inc
index 910d6a6..f4b387a 100644
--- a/src/mainboard/hp/8770w/Makefile.inc
+++ b/src/mainboard/hp/8770w/Makefile.inc
@@ -15,3 +15,5 @@
bootblock-y += gpio.c
romstage-y += gpio.c
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/8770w/romstage.c b/src/mainboard/hp/8770w/early_init.c
similarity index 95%
rename from src/mainboard/hp/8770w/romstage.c
rename to src/mainboard/hp/8770w/early_init.c
index 8eefe4d..3bd2ed7 100644
--- a/src/mainboard/hp/8770w/romstage.c
+++ b/src/mainboard/hp/8770w/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -40,7 +41,7 @@
{ 1, 0, 6 }, /* Conn (eSATA Combo) */
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
lpc47n217_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
kbc1126_enter_conf();
diff --git a/src/mainboard/hp/compaq_8200_elite_sff/Makefile.inc b/src/mainboard/hp/compaq_8200_elite_sff/Makefile.inc
index af2b674..f0b34f9 100644
--- a/src/mainboard/hp/compaq_8200_elite_sff/Makefile.inc
+++ b/src/mainboard/hp/compaq_8200_elite_sff/Makefile.inc
@@ -1,3 +1,5 @@
bootblock-y += gpio.c
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/compaq_8200_elite_sff/romstage.c b/src/mainboard/hp/compaq_8200_elite_sff/early_init.c
similarity index 95%
rename from src/mainboard/hp/compaq_8200_elite_sff/romstage.c
rename to src/mainboard/hp/compaq_8200_elite_sff/early_init.c
index df581fe..882a604 100644
--- a/src/mainboard/hp/compaq_8200_elite_sff/romstage.c
+++ b/src/mainboard/hp/compaq_8200_elite_sff/early_init.c
@@ -16,6 +16,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <stdint.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
@@ -44,7 +45,7 @@
{ 1, 0, -1 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
if (CONFIG(CONSOLE_SERIAL))
nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
diff --git a/src/mainboard/hp/folio_9470m/Makefile.inc b/src/mainboard/hp/folio_9470m/Makefile.inc
index 4fbf73b..1d25875 100644
--- a/src/mainboard/hp/folio_9470m/Makefile.inc
+++ b/src/mainboard/hp/folio_9470m/Makefile.inc
@@ -17,3 +17,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/folio_9470m/romstage.c b/src/mainboard/hp/folio_9470m/early_init.c
similarity index 95%
rename from src/mainboard/hp/folio_9470m/romstage.c
rename to src/mainboard/hp/folio_9470m/early_init.c
index 07ee1eb..e5a1892 100644
--- a/src/mainboard/hp/folio_9470m/romstage.c
+++ b/src/mainboard/hp/folio_9470m/early_init.c
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <device/pci_ops.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit_native.h>
@@ -38,7 +39,7 @@
{ 0, 0, 6 }, /* B1P6 */
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
kbc1126_enter_conf();
kbc1126_mailbox_init();
diff --git a/src/mainboard/hp/revolve_810_g1/Makefile.inc b/src/mainboard/hp/revolve_810_g1/Makefile.inc
index 574f56e..0a15c42 100644
--- a/src/mainboard/hp/revolve_810_g1/Makefile.inc
+++ b/src/mainboard/hp/revolve_810_g1/Makefile.inc
@@ -20,3 +20,5 @@
# FIXME: Other varients with same size onboard ram may exist.
SPD_SOURCES = hynix_4g
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/revolve_810_g1/romstage.c b/src/mainboard/hp/revolve_810_g1/early_init.c
similarity index 95%
rename from src/mainboard/hp/revolve_810_g1/romstage.c
rename to src/mainboard/hp/revolve_810_g1/early_init.c
index 2424742..b464ce3 100644
--- a/src/mainboard/hp/revolve_810_g1/romstage.c
+++ b/src/mainboard/hp/revolve_810_g1/early_init.c
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <string.h>
#include <cbfs.h>
#include <console/console.h>
@@ -46,7 +47,7 @@
{ 0, 0, 6 }, /* B1P6 */
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
kbc1126_enter_conf();
kbc1126_mailbox_init();
diff --git a/src/mainboard/hp/z220_sff_workstation/Makefile.inc b/src/mainboard/hp/z220_sff_workstation/Makefile.inc
index af2b674..f0b34f9 100644
--- a/src/mainboard/hp/z220_sff_workstation/Makefile.inc
+++ b/src/mainboard/hp/z220_sff_workstation/Makefile.inc
@@ -1,3 +1,5 @@
bootblock-y += gpio.c
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/hp/z220_sff_workstation/romstage.c b/src/mainboard/hp/z220_sff_workstation/early_init.c
similarity index 95%
rename from src/mainboard/hp/z220_sff_workstation/romstage.c
rename to src/mainboard/hp/z220_sff_workstation/early_init.c
index 0b9ffe4..fd70690 100644
--- a/src/mainboard/hp/z220_sff_workstation/romstage.c
+++ b/src/mainboard/hp/z220_sff_workstation/early_init.c
@@ -16,6 +16,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <stdint.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
@@ -44,7 +45,7 @@
{ 1, 0, 7 },
};
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
if (CONFIG(CONSOLE_SERIAL))
nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
diff --git a/src/mainboard/intel/dcp847ske/Makefile.inc b/src/mainboard/intel/dcp847ske/Makefile.inc
index ec86d84..28bc7c7 100644
--- a/src/mainboard/intel/dcp847ske/Makefile.inc
+++ b/src/mainboard/intel/dcp847ske/Makefile.inc
@@ -1,3 +1,4 @@
+bootblock-y += early_southbridge.c
romstage-y += early_southbridge.c
bootblock-y += gpio.c
romstage-y += gpio.c
diff --git a/src/mainboard/intel/dcp847ske/early_southbridge.c b/src/mainboard/intel/dcp847ske/early_southbridge.c
index 8f38270..53f5564 100644
--- a/src/mainboard/intel/dcp847ske/early_southbridge.c
+++ b/src/mainboard/intel/dcp847ske/early_southbridge.c
@@ -16,6 +16,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <stdint.h>
#include <cf9_reset.h>
#include <device/pci_ops.h>
@@ -160,7 +161,7 @@
SUPERIO_LOCK;
}
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
superio_init();
hwm_init();
diff --git a/src/mainboard/intel/emeraldlake2/Makefile.inc b/src/mainboard/intel/emeraldlake2/Makefile.inc
index 974241d..3e78db0 100644
--- a/src/mainboard/intel/emeraldlake2/Makefile.inc
+++ b/src/mainboard/intel/emeraldlake2/Makefile.inc
@@ -17,3 +17,5 @@
ramstage-y += chromeos.c
bootblock-y += gpio.c
romstage-y += gpio.c
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/intel/emeraldlake2/romstage.c b/src/mainboard/intel/emeraldlake2/early_init.c
similarity index 98%
rename from src/mainboard/intel/emeraldlake2/romstage.c
rename to src/mainboard/intel/emeraldlake2/early_init.c
index 2cfb556..94a4655 100644
--- a/src/mainboard/intel/emeraldlake2/romstage.c
+++ b/src/mainboard/intel/emeraldlake2/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <stdint.h>
#include <arch/io.h>
#include <device/pci_ops.h>
@@ -43,7 +44,7 @@
}
}
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
const u16 port = SIO_PORT;
const u16 runtime_port = 0x180;
diff --git a/src/mainboard/kontron/ktqm77/Makefile.inc b/src/mainboard/kontron/ktqm77/Makefile.inc
index 620a9c0..e402ffa 100644
--- a/src/mainboard/kontron/ktqm77/Makefile.inc
+++ b/src/mainboard/kontron/ktqm77/Makefile.inc
@@ -2,3 +2,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/kontron/ktqm77/romstage.c b/src/mainboard/kontron/ktqm77/early_init.c
similarity index 98%
rename from src/mainboard/kontron/ktqm77/romstage.c
rename to src/mainboard/kontron/ktqm77/early_init.c
index 3b49653..6a483bc 100644
--- a/src/mainboard/kontron/ktqm77/romstage.c
+++ b/src/mainboard/kontron/ktqm77/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <stdint.h>
#include <device/pnp_ops.h>
#include <device/pci_ops.h>
@@ -54,7 +55,7 @@
RCBA32(FD) = reg32;
}
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
int lvds_3v = 0; /* 0 (5V) or 1 (3V3) */
int dis_bl_inv = 1; /* backlight inversion: 1 = disabled, 0 = enabled */
diff --git a/src/mainboard/lenovo/l520/Makefile.inc b/src/mainboard/lenovo/l520/Makefile.inc
index 14cd059..c032767 100644
--- a/src/mainboard/lenovo/l520/Makefile.inc
+++ b/src/mainboard/lenovo/l520/Makefile.inc
@@ -13,9 +13,10 @@
## GNU General Public License for more details.
##
-romstage-y += romstage.c
bootblock-y += gpio.c
romstage-y += gpio.c
smm-y += smihandler.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/l520/romstage.c b/src/mainboard/lenovo/l520/early_init.c
similarity index 96%
rename from src/mainboard/lenovo/l520/romstage.c
rename to src/mainboard/lenovo/l520/early_init.c
index af73537..d63a667 100644
--- a/src/mainboard/lenovo/l520/romstage.c
+++ b/src/mainboard/lenovo/l520/early_init.c
@@ -39,10 +39,6 @@
{ 1, 0, -1 },
};
-void mainboard_config_superio(void)
-{
-}
-
void mainboard_get_spd(spd_raw_data *spd, bool id_only)
{
read_spd(&spd[0], 0x50, id_only);
diff --git a/src/mainboard/lenovo/s230u/Makefile.inc b/src/mainboard/lenovo/s230u/Makefile.inc
index aa4c4f8..12e7709 100644
--- a/src/mainboard/lenovo/s230u/Makefile.inc
+++ b/src/mainboard/lenovo/s230u/Makefile.inc
@@ -16,3 +16,5 @@
SPD_SOURCES += hynix_2gb # 0b1000
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/s230u/romstage.c b/src/mainboard/lenovo/s230u/early_init.c
similarity index 98%
rename from src/mainboard/lenovo/s230u/romstage.c
rename to src/mainboard/lenovo/s230u/early_init.c
index 0552170..6bc92b2 100644
--- a/src/mainboard/lenovo/s230u/romstage.c
+++ b/src/mainboard/lenovo/s230u/early_init.c
@@ -64,10 +64,6 @@
{ 1, 1, 6 },
};
-void mainboard_config_superio(void)
-{
-}
-
static const char *mainboard_spd_names[9] = {
"ELPIDA 4GB",
"SAMSUNG 4GB",
diff --git a/src/mainboard/lenovo/t420/Makefile.inc b/src/mainboard/lenovo/t420/Makefile.inc
index 3914f51..080812e 100644
--- a/src/mainboard/lenovo/t420/Makefile.inc
+++ b/src/mainboard/lenovo/t420/Makefile.inc
@@ -18,3 +18,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/t420/romstage.c b/src/mainboard/lenovo/t420/early_init.c
similarity index 97%
rename from src/mainboard/lenovo/t420/romstage.c
rename to src/mainboard/lenovo/t420/early_init.c
index e04803f..50e6258 100644
--- a/src/mainboard/lenovo/t420/romstage.c
+++ b/src/mainboard/lenovo/t420/early_init.c
@@ -82,7 +82,3 @@
{
hybrid_graphics_init();
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/lenovo/t420s/Makefile.inc b/src/mainboard/lenovo/t420s/Makefile.inc
index 3914f51..080812e 100644
--- a/src/mainboard/lenovo/t420s/Makefile.inc
+++ b/src/mainboard/lenovo/t420s/Makefile.inc
@@ -18,3 +18,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/t420s/romstage.c b/src/mainboard/lenovo/t420s/early_init.c
similarity index 97%
rename from src/mainboard/lenovo/t420s/romstage.c
rename to src/mainboard/lenovo/t420s/early_init.c
index 7649972..1357a0a 100644
--- a/src/mainboard/lenovo/t420s/romstage.c
+++ b/src/mainboard/lenovo/t420s/early_init.c
@@ -81,7 +81,3 @@
{
hybrid_graphics_init();
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/lenovo/t430/Makefile.inc b/src/mainboard/lenovo/t430/Makefile.inc
index 409d484..0f49600 100644
--- a/src/mainboard/lenovo/t430/Makefile.inc
+++ b/src/mainboard/lenovo/t430/Makefile.inc
@@ -1,6 +1,7 @@
-romstage-y += romstage.c
bootblock-y += gpio.c
romstage-y += gpio.c
smm-y += smihandler.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/t430/romstage.c b/src/mainboard/lenovo/t430/early_init.c
similarity index 97%
rename from src/mainboard/lenovo/t430/romstage.c
rename to src/mainboard/lenovo/t430/early_init.c
index f1e724b..74c8b60 100644
--- a/src/mainboard/lenovo/t430/romstage.c
+++ b/src/mainboard/lenovo/t430/early_init.c
@@ -72,10 +72,6 @@
hybrid_graphics_init();
}
-void mainboard_config_superio(void)
-{
-}
-
void mainboard_get_spd(spd_raw_data *spd, bool id_only)
{
read_spd(&spd[0], 0x50, id_only);
diff --git a/src/mainboard/lenovo/t430s/Makefile.inc b/src/mainboard/lenovo/t430s/Makefile.inc
index 425047f..d0e69a8 100644
--- a/src/mainboard/lenovo/t430s/Makefile.inc
+++ b/src/mainboard/lenovo/t430s/Makefile.inc
@@ -20,3 +20,5 @@
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
subdirs-$(CONFIG_BOARD_LENOVO_T431S) += variants/$(VARIANT_DIR)/spd
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/t430s/romstage.c b/src/mainboard/lenovo/t430s/early_init.c
similarity index 95%
rename from src/mainboard/lenovo/t430s/romstage.c
rename to src/mainboard/lenovo/t430s/early_init.c
index 6503c9a..0757c06 100644
--- a/src/mainboard/lenovo/t430s/romstage.c
+++ b/src/mainboard/lenovo/t430s/early_init.c
@@ -23,7 +23,3 @@
{
pci_write_config32(PCH_LPC_DEV, ETR3, 0x10000);
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/lenovo/t520/Makefile.inc b/src/mainboard/lenovo/t520/Makefile.inc
index 5310bbf..8f3c154 100644
--- a/src/mainboard/lenovo/t520/Makefile.inc
+++ b/src/mainboard/lenovo/t520/Makefile.inc
@@ -18,3 +18,5 @@
romstage-y += variants/$(VARIANT_DIR)/gpio.c
romstage-y += variants/$(VARIANT_DIR)/romstage.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/t520/romstage.c b/src/mainboard/lenovo/t520/early_init.c
similarity index 97%
rename from src/mainboard/lenovo/t520/romstage.c
rename to src/mainboard/lenovo/t520/early_init.c
index caf54bd..cfa69b7 100644
--- a/src/mainboard/lenovo/t520/romstage.c
+++ b/src/mainboard/lenovo/t520/early_init.c
@@ -77,7 +77,3 @@
{
hybrid_graphics_init();
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/lenovo/t530/Makefile.inc b/src/mainboard/lenovo/t530/Makefile.inc
index 5310bbf..8f3c154 100644
--- a/src/mainboard/lenovo/t530/Makefile.inc
+++ b/src/mainboard/lenovo/t530/Makefile.inc
@@ -18,3 +18,5 @@
romstage-y += variants/$(VARIANT_DIR)/gpio.c
romstage-y += variants/$(VARIANT_DIR)/romstage.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/t530/romstage.c b/src/mainboard/lenovo/t530/early_init.c
similarity index 97%
rename from src/mainboard/lenovo/t530/romstage.c
rename to src/mainboard/lenovo/t530/early_init.c
index 85c3090..34c61e4 100644
--- a/src/mainboard/lenovo/t530/romstage.c
+++ b/src/mainboard/lenovo/t530/early_init.c
@@ -60,7 +60,3 @@
{
hybrid_graphics_init();
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/lenovo/x131e/Makefile.inc b/src/mainboard/lenovo/x131e/Makefile.inc
index 4fbf73b..1d25875 100644
--- a/src/mainboard/lenovo/x131e/Makefile.inc
+++ b/src/mainboard/lenovo/x131e/Makefile.inc
@@ -17,3 +17,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/x131e/romstage.c b/src/mainboard/lenovo/x131e/early_init.c
similarity index 96%
rename from src/mainboard/lenovo/x131e/romstage.c
rename to src/mainboard/lenovo/x131e/early_init.c
index 45d6b88..fe9fec0 100644
--- a/src/mainboard/lenovo/x131e/romstage.c
+++ b/src/mainboard/lenovo/x131e/early_init.c
@@ -42,7 +42,3 @@
read_spd(&spd[0], 0x50, id_only);
read_spd(&spd[2], 0x52, id_only);
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/Makefile.inc b/src/mainboard/lenovo/x1_carbon_gen1/Makefile.inc
index 8ce77fc..f6331a6 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/Makefile.inc
+++ b/src/mainboard/lenovo/x1_carbon_gen1/Makefile.inc
@@ -20,3 +20,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/romstage.c b/src/mainboard/lenovo/x1_carbon_gen1/early_init.c
similarity index 98%
rename from src/mainboard/lenovo/x1_carbon_gen1/romstage.c
rename to src/mainboard/lenovo/x1_carbon_gen1/early_init.c
index 1f027ff..c70b21d 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/romstage.c
+++ b/src/mainboard/lenovo/x1_carbon_gen1/early_init.c
@@ -99,7 +99,3 @@
memcpy(&spd[0], memory, 256);
memcpy(&spd[2], memory, 256);
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/lenovo/x220/Makefile.inc b/src/mainboard/lenovo/x220/Makefile.inc
index c0ba457..4363770 100644
--- a/src/mainboard/lenovo/x220/Makefile.inc
+++ b/src/mainboard/lenovo/x220/Makefile.inc
@@ -19,3 +19,5 @@
romstage-y += variants/$(VARIANT_DIR)/romstage.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/x220/romstage.c b/src/mainboard/lenovo/x220/early_init.c
similarity index 98%
rename from src/mainboard/lenovo/x220/romstage.c
rename to src/mainboard/lenovo/x220/early_init.c
index 72dd8dd..8ee807c 100644
--- a/src/mainboard/lenovo/x220/romstage.c
+++ b/src/mainboard/lenovo/x220/early_init.c
@@ -87,10 +87,6 @@
read_spd (&spd[2], 0x51, id_only);
}
-void mainboard_config_superio(void)
-{
-}
-
int mainboard_should_reset_usb(int s3resume)
{
return !s3resume;
diff --git a/src/mainboard/lenovo/x230/Makefile.inc b/src/mainboard/lenovo/x230/Makefile.inc
index 3914f51..080812e 100644
--- a/src/mainboard/lenovo/x230/Makefile.inc
+++ b/src/mainboard/lenovo/x230/Makefile.inc
@@ -18,3 +18,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/lenovo/x230/romstage.c b/src/mainboard/lenovo/x230/early_init.c
similarity index 97%
rename from src/mainboard/lenovo/x230/romstage.c
rename to src/mainboard/lenovo/x230/early_init.c
index 56f5a90..b737e7d 100644
--- a/src/mainboard/lenovo/x230/romstage.c
+++ b/src/mainboard/lenovo/x230/early_init.c
@@ -51,7 +51,3 @@
read_spd (&spd[0], 0x50, id_only);
read_spd (&spd[2], 0x51, id_only);
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/msi/ms7707/Makefile.inc b/src/mainboard/msi/ms7707/Makefile.inc
index 0ec849f..2fa05da 100644
--- a/src/mainboard/msi/ms7707/Makefile.inc
+++ b/src/mainboard/msi/ms7707/Makefile.inc
@@ -1,2 +1,4 @@
bootblock-y += gpio.c
romstage-y += gpio.c
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/msi/ms7707/romstage.c b/src/mainboard/msi/ms7707/early_init.c
similarity index 96%
rename from src/mainboard/msi/ms7707/romstage.c
rename to src/mainboard/msi/ms7707/early_init.c
index 1dd3fd0..480e196 100644
--- a/src/mainboard/msi/ms7707/romstage.c
+++ b/src/mainboard/msi/ms7707/early_init.c
@@ -45,10 +45,6 @@
{1, 0, 6},
};
-void mainboard_config_superio(void)
-{
-}
-
void mainboard_get_spd(spd_raw_data *spd, bool id_only)
{
read_spd(&spd[0], 0x50, id_only);
diff --git a/src/mainboard/roda/rv11/Makefile.inc b/src/mainboard/roda/rv11/Makefile.inc
index 422b448..a3d6d59 100644
--- a/src/mainboard/roda/rv11/Makefile.inc
+++ b/src/mainboard/roda/rv11/Makefile.inc
@@ -16,7 +16,10 @@
bootblock-y += gpio.c
romstage-y += gpio.c
-romstage-y += variants/$(VARIANT_DIR)/romstage.c
+bootblock-y += variants/$(VARIANT_DIR)/early_init.c
+romstage-y += variants/$(VARIANT_DIR)/early_init.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/roda/rv11/romstage.c b/src/mainboard/roda/rv11/early_init.c
similarity index 100%
rename from src/mainboard/roda/rv11/romstage.c
rename to src/mainboard/roda/rv11/early_init.c
diff --git a/src/mainboard/roda/rv11/variants/rv11/romstage.c b/src/mainboard/roda/rv11/variants/rv11/early_init.c
similarity index 98%
rename from src/mainboard/roda/rv11/variants/rv11/romstage.c
rename to src/mainboard/roda/rv11/variants/rv11/early_init.c
index 38c4064..5081c00 100644
--- a/src/mainboard/roda/rv11/variants/rv11/romstage.c
+++ b/src/mainboard/roda/rv11/variants/rv11/early_init.c
@@ -21,10 +21,6 @@
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <southbridge/intel/bd82x6x/pch.h>
-void mainboard_config_superio(void)
-{
-}
-
void mainboard_fill_pei_data(struct pei_data *const pei_data)
{
const struct pei_data pei_data_template = {
diff --git a/src/mainboard/roda/rv11/variants/rw11/romstage.c b/src/mainboard/roda/rv11/variants/rw11/early_init.c
similarity index 98%
rename from src/mainboard/roda/rv11/variants/rw11/romstage.c
rename to src/mainboard/roda/rv11/variants/rw11/early_init.c
index 7321dac..f3865fc 100644
--- a/src/mainboard/roda/rv11/variants/rw11/romstage.c
+++ b/src/mainboard/roda/rv11/variants/rw11/early_init.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <stdint.h>
#include <device/pci.h>
#include <device/pci_ops.h>
@@ -25,7 +26,7 @@
#include <superio/ite/it8783ef/it8783ef.h>
#include <superio/ite/common/ite.h>
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
const pnp_devfn_t dev = PNP_DEV(0x2e, IT8783EF_GPIO);
diff --git a/src/mainboard/samsung/lumpy/Makefile.inc b/src/mainboard/samsung/lumpy/Makefile.inc
index 3e28bd4..e6e65aa 100644
--- a/src/mainboard/samsung/lumpy/Makefile.inc
+++ b/src/mainboard/samsung/lumpy/Makefile.inc
@@ -31,3 +31,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/samsung/lumpy/romstage.c b/src/mainboard/samsung/lumpy/early_init.c
similarity index 99%
rename from src/mainboard/samsung/lumpy/romstage.c
rename to src/mainboard/samsung/lumpy/early_init.c
index d6ded7a..6bc545c 100644
--- a/src/mainboard/samsung/lumpy/romstage.c
+++ b/src/mainboard/samsung/lumpy/early_init.c
@@ -232,7 +232,3 @@
{
return !s3resume;
}
-
-void mainboard_config_superio(void)
-{
-}
diff --git a/src/mainboard/samsung/stumpy/Makefile.inc b/src/mainboard/samsung/stumpy/Makefile.inc
index 497acca..de233ce 100644
--- a/src/mainboard/samsung/stumpy/Makefile.inc
+++ b/src/mainboard/samsung/stumpy/Makefile.inc
@@ -19,3 +19,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/samsung/stumpy/romstage.c b/src/mainboard/samsung/stumpy/early_init.c
similarity index 98%
rename from src/mainboard/samsung/stumpy/romstage.c
rename to src/mainboard/samsung/stumpy/early_init.c
index 35dc055..03cb8d7 100644
--- a/src/mainboard/samsung/stumpy/romstage.c
+++ b/src/mainboard/samsung/stumpy/early_init.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <bootblock_common.h>
#include <stdint.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
@@ -239,7 +240,7 @@
}
}
-void mainboard_config_superio(void)
+void bootblock_mainboard_early_init(void)
{
setup_sio_gpios();
diff --git a/src/mainboard/sapphire/pureplatinumh61/Makefile.inc b/src/mainboard/sapphire/pureplatinumh61/Makefile.inc
index 4cf022a..8d8f3ee 100644
--- a/src/mainboard/sapphire/pureplatinumh61/Makefile.inc
+++ b/src/mainboard/sapphire/pureplatinumh61/Makefile.inc
@@ -18,3 +18,5 @@
romstage-y += gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+bootblock-y += early_init.c
+romstage-y += early_init.c
diff --git a/src/mainboard/sapphire/pureplatinumh61/romstage.c b/src/mainboard/sapphire/pureplatinumh61/early_init.c
similarity index 96%
rename from src/mainboard/sapphire/pureplatinumh61/romstage.c
rename to src/mainboard/sapphire/pureplatinumh61/early_init.c
index bc08fd8..be66561 100644
--- a/src/mainboard/sapphire/pureplatinumh61/romstage.c
+++ b/src/mainboard/sapphire/pureplatinumh61/early_init.c
@@ -48,10 +48,6 @@
{ 1, 0, 6 },
};
-void mainboard_config_superio(void)
-{
-}
-
void mainboard_get_spd(spd_raw_data *spd, bool id_only)
{
read_spd(&spd[0], 0x50, id_only);