Kane Chen has uploaded this change for review. ( https://review.coreboot.org/21142
Change subject: soc/intel/apollolake: Allow overriding FSP_S settings by board ......................................................................
soc/intel/apollolake: Allow overriding FSP_S settings by board
This change provides interface to override FSP_S settings per board due to many projects share same devicetree.cb
BUG=b:64880573 TEST=Verify that FSP_S settings can be overridden in mainboard on coral
Change-Id: I349b1678d9e66022b586b6c7f344b831ed631c74 Signed-off-by: Kane Chen kane.chen@intel.com --- M src/mainboard/google/reef/mainboard.c M src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h M src/mainboard/google/reef/variants/coral/mainboard.c M src/soc/intel/apollolake/chip.c 4 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/21142/1
diff --git a/src/mainboard/google/reef/mainboard.c b/src/mainboard/google/reef/mainboard.c index c6b1997..3c52ef0 100644 --- a/src/mainboard/google/reef/mainboard.c +++ b/src/mainboard/google/reef/mainboard.c @@ -82,6 +82,12 @@ *oem_revision = variant_board_sku(); }
+void __attribute__((weak)) variant_slicon_config_overrides( + FSP_S_CONFIG *silconfig) +{ + /* Override the FSP_S settings by variant_board_sku() */ +} + static unsigned long mainboard_write_acpi_tables( device_t device, unsigned long current, acpi_rsdp_t *rsdp) { diff --git a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h index 388397b..ad977e8 100644 --- a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h @@ -47,5 +47,6 @@ void variant_nhlt_oem_overrides(const char **oem_id, const char **oem_table_id, uint32_t *oem_revision); void variant_nhlt_init(struct nhlt *nhlt); +void variant_slicon_config_overrides(FSP_S_CONFIG *silconfig);
#endif /* BASEBOARD_VARIANTS_H */ diff --git a/src/mainboard/google/reef/variants/coral/mainboard.c b/src/mainboard/google/reef/variants/coral/mainboard.c index 3da5456..cbbbaef 100644 --- a/src/mainboard/google/reef/variants/coral/mainboard.c +++ b/src/mainboard/google/reef/variants/coral/mainboard.c @@ -31,3 +31,8 @@ *oem_table_id = CONFIG_VARIANT_DIR; *oem_revision = variant_board_sku(); } + +void variant_slicon_config_overrides(FSP_S_CONFIG *silconfig) +{ + /* Override the FSP_S settings by variant_board_sku() */ +} diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index af625a1..23924ae 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -45,6 +45,7 @@ #include <soc/systemagent.h>
#include "chip.h" +#include <baseboard/variants.h>
static void *vbt; static struct region_device vbt_rdev; @@ -487,6 +488,9 @@ silconfig->PortUsb20HsNpreDrvSel[port] = cfg->usb2eye[port].Usb20HsNpreDrvSel; } + + /* interface to override FSP_S settings per board */ + variant_slicon_config_overrides(silconfig); #endif }