Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/84097?usp=email )
Change subject: mb/dell/snb_ivb_latitude: Move early_init.c out of variants ......................................................................
mb/dell/snb_ivb_latitude: Move early_init.c out of variants
Now that the USB configs are in the devicetree, only the bootblock_mainboard_early_init function remains in early_init.c. It is identical between every variant except the E6230, which enabled fewer decode ranges in the LPC_EN register. Enabling the additional decode ranges probably shouldn't cause issues, so go with the majority.
TEST=Timeless builds do not change with the exception of the E6230.
Change-Id: Ic43915888f5893652991b7402ebab3bd3a2cf278 Signed-off-by: Nicholas Chin nic.c3.14@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/84097 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@mailbox.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/mainboard/dell/snb_ivb_latitude/Makefile.mk R src/mainboard/dell/snb_ivb_latitude/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e5520/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e5530/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e6220/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e6230/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e6320/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e6330/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e6420/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e6430/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e6520/early_init.c D src/mainboard/dell/snb_ivb_latitude/variants/e6530/early_init.c 12 files changed, 2 insertions(+), 140 deletions(-)
Approvals: Nico Huber: Looks good to me, approved build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve
diff --git a/src/mainboard/dell/snb_ivb_latitude/Makefile.mk b/src/mainboard/dell/snb_ivb_latitude/Makefile.mk index 299fbb9..bd50ae7 100644 --- a/src/mainboard/dell/snb_ivb_latitude/Makefile.mk +++ b/src/mainboard/dell/snb_ivb_latitude/Makefile.mk @@ -1,9 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-only
-bootblock-y += variants/$(VARIANT_DIR)/early_init.c +bootblock-y += early_init.c bootblock-y += variants/$(VARIANT_DIR)/gpio.c
-romstage-y += variants/$(VARIANT_DIR)/early_init.c +romstage-y += early_init.c romstage-y += variants/$(VARIANT_DIR)/gpio.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e5420/early_init.c b/src/mainboard/dell/snb_ivb_latitude/early_init.c similarity index 100% rename from src/mainboard/dell/snb_ivb_latitude/variants/e5420/early_init.c rename to src/mainboard/dell/snb_ivb_latitude/early_init.c diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e5520/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e5520/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e5520/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e5530/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e5530/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e5530/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e6220/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e6220/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e6220/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e6230/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e6230/early_init.c deleted file mode 100644 index 24c1b32..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e6230/early_init.c +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN | KBC_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e6320/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e6320/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e6320/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e6330/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e6330/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e6330/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e6420/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e6420/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e6420/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e6430/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e6430/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e6430/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e6520/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e6520/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e6520/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -} diff --git a/src/mainboard/dell/snb_ivb_latitude/variants/e6530/early_init.c b/src/mainboard/dell/snb_ivb_latitude/variants/e6530/early_init.c deleted file mode 100644 index ff83db0..0000000 --- a/src/mainboard/dell/snb_ivb_latitude/variants/e6530/early_init.c +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <bootblock_common.h> -#include <device/pci_ops.h> -#include <ec/dell/mec5035/mec5035.h> -#include <southbridge/intel/bd82x6x/pch.h> - -void bootblock_mainboard_early_init(void) -{ - pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN - | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN - | COMB_LPC_EN | COMA_LPC_EN); - mec5035_early_init(); -}