Jeff Chase has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/57037 )
Change subject: mb/google/hatch: don't override variant_ramstage_init() in baseboard ......................................................................
mb/google/hatch: don't override variant_ramstage_init() in baseboard
We have some variants based on puff baseboard that need to override variant_ramstage_init() but we don't want to disrupt other puff variants.
BUG=b:181016324 TEST=emerge-puff coreboot; emerge-ambassador coreboot
Change-Id: Ic5e787c3d4c2f2c62a0dc868997b6e4c3da84c43 Signed-off-by: Jeff Chase jnchase@google.com --- M src/mainboard/google/hatch/variants/ambassador/Makefile.inc A src/mainboard/google/hatch/variants/ambassador/ramstage.c M src/mainboard/google/hatch/variants/baseboard/Makefile.inc M src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h R src/mainboard/google/hatch/variants/baseboard/mainboard_puff.c M src/mainboard/google/hatch/variants/dooly/Makefile.inc A src/mainboard/google/hatch/variants/dooly/ramstage.c M src/mainboard/google/hatch/variants/duffy/Makefile.inc A src/mainboard/google/hatch/variants/duffy/ramstage.c M src/mainboard/google/hatch/variants/faffy/Makefile.inc A src/mainboard/google/hatch/variants/faffy/ramstage.c M src/mainboard/google/hatch/variants/genesis/Makefile.inc A src/mainboard/google/hatch/variants/genesis/ramstage.c M src/mainboard/google/hatch/variants/kaisa/Makefile.inc A src/mainboard/google/hatch/variants/kaisa/ramstage.c M src/mainboard/google/hatch/variants/noibat/Makefile.inc A src/mainboard/google/hatch/variants/noibat/ramstage.c M src/mainboard/google/hatch/variants/puff/Makefile.inc A src/mainboard/google/hatch/variants/puff/ramstage.c M src/mainboard/google/hatch/variants/scout/Makefile.inc A src/mainboard/google/hatch/variants/scout/ramstage.c M src/mainboard/google/hatch/variants/wyvern/Makefile.inc A src/mainboard/google/hatch/variants/wyvern/ramstage.c 23 files changed, 98 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/57037/1
diff --git a/src/mainboard/google/hatch/variants/ambassador/Makefile.inc b/src/mainboard/google/hatch/variants/ambassador/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/ambassador/Makefile.inc +++ b/src/mainboard/google/hatch/variants/ambassador/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/ambassador/ramstage.c b/src/mainboard/google/hatch/variants/ambassador/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/ambassador/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/baseboard/Makefile.inc b/src/mainboard/google/hatch/variants/baseboard/Makefile.inc index 69f9322..e4f5c5f 100644 --- a/src/mainboard/google/hatch/variants/baseboard/Makefile.inc +++ b/src/mainboard/google/hatch/variants/baseboard/Makefile.inc @@ -6,7 +6,7 @@ romstage-y += memory.c
ramstage-y += gpio.c -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_PUFF) += mainboard.c +ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_PUFF) += mainboard_puff.c
verstage-y += gpio.c
diff --git a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h index 2f06a55..8c4c6eb 100644 --- a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h @@ -40,4 +40,7 @@ /* Perform variant specific mainboard initialization */ void variant_mainboard_enable(struct device *dev);
+/* Perform puff specific initialization in ramstage. */ +void mainboard_puff_ramstage_init(void); + #endif /* BASEBOARD_VARIANTS_H */ diff --git a/src/mainboard/google/hatch/variants/baseboard/mainboard.c b/src/mainboard/google/hatch/variants/baseboard/mainboard_puff.c similarity index 96% rename from src/mainboard/google/hatch/variants/baseboard/mainboard.c rename to src/mainboard/google/hatch/variants/baseboard/mainboard_puff.c index d641405..d60a12b 100644 --- a/src/mainboard/google/hatch/variants/baseboard/mainboard.c +++ b/src/mainboard/google/hatch/variants/baseboard/mainboard_puff.c @@ -48,7 +48,7 @@ #define PUFF_MIN_DUTYCYCLE 4
/* - * mainboard_set_power_limits + * mainboard_puff_set_power_limits * * Set Pl2 and SysPl2 values based on detected charger. * Values are defined below but we use U22 value for all SKUs for now. @@ -87,7 +87,7 @@ #define PSYS_IMAX 9600 #define BJ_VOLTS_MV 19000
-static void mainboard_set_power_limits(struct soc_power_limits_config *conf) +static void mainboard_puff_set_power_limits(struct soc_power_limits_config *conf) { enum usb_chg_type type; u32 watts; @@ -148,7 +148,7 @@ conf->tdp_psyspl2 = psyspl2; }
-void variant_ramstage_init(void) +void mainboard_puff_ramstage_init(void) { static const long display_timeout_ms = 3000; struct soc_power_limits_config *soc_config; @@ -166,5 +166,5 @@ } /* Psys_pmax needs to be setup before FSP-S */ soc_config = &conf->power_limits_config; - mainboard_set_power_limits(soc_config); + mainboard_puff_set_power_limits(soc_config); } diff --git a/src/mainboard/google/hatch/variants/dooly/Makefile.inc b/src/mainboard/google/hatch/variants/dooly/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/dooly/Makefile.inc +++ b/src/mainboard/google/hatch/variants/dooly/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/dooly/ramstage.c b/src/mainboard/google/hatch/variants/dooly/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/dooly/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/duffy/Makefile.inc b/src/mainboard/google/hatch/variants/duffy/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/duffy/Makefile.inc +++ b/src/mainboard/google/hatch/variants/duffy/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/duffy/ramstage.c b/src/mainboard/google/hatch/variants/duffy/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/duffy/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/faffy/Makefile.inc b/src/mainboard/google/hatch/variants/faffy/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/faffy/Makefile.inc +++ b/src/mainboard/google/hatch/variants/faffy/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/faffy/ramstage.c b/src/mainboard/google/hatch/variants/faffy/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/faffy/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/genesis/Makefile.inc b/src/mainboard/google/hatch/variants/genesis/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/genesis/Makefile.inc +++ b/src/mainboard/google/hatch/variants/genesis/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/genesis/ramstage.c b/src/mainboard/google/hatch/variants/genesis/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/genesis/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/kaisa/Makefile.inc b/src/mainboard/google/hatch/variants/kaisa/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/kaisa/Makefile.inc +++ b/src/mainboard/google/hatch/variants/kaisa/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/kaisa/ramstage.c b/src/mainboard/google/hatch/variants/kaisa/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/kaisa/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/noibat/Makefile.inc b/src/mainboard/google/hatch/variants/noibat/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/noibat/Makefile.inc +++ b/src/mainboard/google/hatch/variants/noibat/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/noibat/ramstage.c b/src/mainboard/google/hatch/variants/noibat/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/noibat/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/puff/Makefile.inc b/src/mainboard/google/hatch/variants/puff/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/puff/Makefile.inc +++ b/src/mainboard/google/hatch/variants/puff/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/puff/ramstage.c b/src/mainboard/google/hatch/variants/puff/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/puff/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/scout/Makefile.inc b/src/mainboard/google/hatch/variants/scout/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/scout/Makefile.inc +++ b/src/mainboard/google/hatch/variants/scout/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/scout/ramstage.c b/src/mainboard/google/hatch/variants/scout/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/scout/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +} diff --git a/src/mainboard/google/hatch/variants/wyvern/Makefile.inc b/src/mainboard/google/hatch/variants/wyvern/Makefile.inc index 3b5b7d0..abbdb150 100644 --- a/src/mainboard/google/hatch/variants/wyvern/Makefile.inc +++ b/src/mainboard/google/hatch/variants/wyvern/Makefile.inc @@ -1,4 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only
ramstage-y += gpio.c +ramstage-y += ramstage.c bootblock-y += gpio.c diff --git a/src/mainboard/google/hatch/variants/wyvern/ramstage.c b/src/mainboard/google/hatch/variants/wyvern/ramstage.c new file mode 100644 index 0000000..b0c3d88 --- /dev/null +++ b/src/mainboard/google/hatch/variants/wyvern/ramstage.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> + +void variant_ramstage_init(void) +{ + mainboard_puff_ramstage_init(); +}