From ec1c0f53374effbab967cdb373f92e04a05e4443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Mon, 21 Dec 2020 17:09:08 +0100 Subject: mb/siemens/mc_apl1: do LPC/eSPI pad configuration at board-level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do LPC/eSPI pad configuration at board-level to match other platforms. Early gpio configuration was done in romstage, while LPC pads were configured in bootblock. Instead of adding another dedicated gpio table for bootblock, move early gpio configuration completely to bootblock on these boards. This won't hurt, since there is no code touching the pads in between. The soc code gets dropped in CB:49410. Change-Id: I2a614afb305036b0581eac8ed6a723a3f80747b3 Tested-by: Mario Scheithauer Signed-off-by: Michael Niewöhner Reviewed-on: https://review.coreboot.org/c/coreboot/+/49413 Tested-by: build bot (Jenkins) Reviewed-by: Mario Scheithauer --- src/mainboard/siemens/mc_apl1/bootblock.c | 9 +++++++-- src/mainboard/siemens/mc_apl1/romstage.c | 6 ------ src/mainboard/siemens/mc_apl1/variants/baseboard/Makefile.inc | 3 ++- src/mainboard/siemens/mc_apl1/variants/mc_apl2/Makefile.inc | 2 +- src/mainboard/siemens/mc_apl1/variants/mc_apl3/Makefile.inc | 2 +- src/mainboard/siemens/mc_apl1/variants/mc_apl4/Makefile.inc | 3 ++- src/mainboard/siemens/mc_apl1/variants/mc_apl5/Makefile.inc | 2 +- src/mainboard/siemens/mc_apl1/variants/mc_apl6/Makefile.inc | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mainboard/siemens/mc_apl1/bootblock.c b/src/mainboard/siemens/mc_apl1/bootblock.c index fdaaaa182b..01c8e93d28 100644 --- a/src/mainboard/siemens/mc_apl1/bootblock.c +++ b/src/mainboard/siemens/mc_apl1/bootblock.c @@ -1,9 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include -#include +#include void bootblock_mainboard_init(void) { - lpc_configure_pads(); + const struct pad_config *pads; + size_t num; + + pads = variant_early_gpio_table(&num); + gpio_configure_pads(pads, num); } diff --git a/src/mainboard/siemens/mc_apl1/romstage.c b/src/mainboard/siemens/mc_apl1/romstage.c index bb45bbcfa6..a29b7a60b4 100644 --- a/src/mainboard/siemens/mc_apl1/romstage.c +++ b/src/mainboard/siemens/mc_apl1/romstage.c @@ -11,15 +11,9 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) { - const struct pad_config *pads; const struct lpddr4_swizzle_cfg *cfg; const struct lpddr4_chan_swizzle_cfg *chan; uint8_t spd[0x80]; - size_t num; - - /* setup early gpio before memory */ - pads = variant_early_gpio_table(&num); - gpio_configure_pads(pads, num); /* * Get DRAM configuration data from hwinfo block. diff --git a/src/mainboard/siemens/mc_apl1/variants/baseboard/Makefile.inc b/src/mainboard/siemens/mc_apl1/variants/baseboard/Makefile.inc index 07ebf9b049..1d38b77ea0 100644 --- a/src/mainboard/siemens/mc_apl1/variants/baseboard/Makefile.inc +++ b/src/mainboard/siemens/mc_apl1/variants/baseboard/Makefile.inc @@ -1,4 +1,5 @@ -romstage-y += gpio.c +bootblock-y += gpio.c + romstage-y += memory.c ramstage-y += gpio.c diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl2/Makefile.inc b/src/mainboard/siemens/mc_apl1/variants/mc_apl2/Makefile.inc index a6b80e0832..152b46ece1 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl2/Makefile.inc +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl2/Makefile.inc @@ -1,4 +1,4 @@ -romstage-y += gpio.c +bootblock-y += gpio.c ramstage-y += gpio.c ramstage-y += mainboard.c diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/Makefile.inc b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/Makefile.inc index a6b80e0832..152b46ece1 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/Makefile.inc +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/Makefile.inc @@ -1,4 +1,4 @@ -romstage-y += gpio.c +bootblock-y += gpio.c ramstage-y += gpio.c ramstage-y += mainboard.c diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Makefile.inc b/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Makefile.inc index b1e6a0f74f..e26339c548 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Makefile.inc +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl4/Makefile.inc @@ -1,5 +1,6 @@ +bootblock-y += gpio.c + romstage-y += memory.c -romstage-y += gpio.c ramstage-y += gpio.c ramstage-y += lcd_panel.c diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Makefile.inc b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Makefile.inc index bd81552afc..3629aca053 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Makefile.inc +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/Makefile.inc @@ -1,4 +1,4 @@ -romstage-y += gpio.c +bootblock-y += gpio.c ramstage-y += gpio.c ramstage-y += mainboard.c diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl6/Makefile.inc b/src/mainboard/siemens/mc_apl1/variants/mc_apl6/Makefile.inc index a6b80e0832..152b46ece1 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl6/Makefile.inc +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl6/Makefile.inc @@ -1,4 +1,4 @@ -romstage-y += gpio.c +bootblock-y += gpio.c ramstage-y += gpio.c ramstage-y += mainboard.c -- cgit v1.2.3