soc/intel/apollolake: Allow overriding dev tree settings by board
This change provides interface to override dev tree settings per
board due to many projects share same devicetree.cb.
BUG=b:64880573
TEST=Verify that dev tree settings can be overridden in mainboard
on coral
Change-Id: I349b1678d9e66022b586b6c7f344b831ed631c74
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://review.coreboot.org/21142
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index af625a1..628304c 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -497,6 +497,11 @@
silconfig->HdaEnable = 0;
}
+void __attribute__((weak)) mainboard_devtree_update(struct device *dev)
+{
+ /* Override dev tree settings per board */
+}
+
void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
{
FSP_S_CONFIG *silconfig = &silupd->FspsConfig;
@@ -512,6 +517,8 @@
return;
}
+ mainboard_devtree_update(dev);
+
cfg = dev->chip_info;
/* Parse device tree and disable unused device*/
diff --git a/src/soc/intel/apollolake/include/soc/cpu.h b/src/soc/intel/apollolake/include/soc/cpu.h
index 10e05959..2d22ae5 100644
--- a/src/soc/intel/apollolake/include/soc/cpu.h
+++ b/src/soc/intel/apollolake/include/soc/cpu.h
@@ -28,5 +28,6 @@
struct device;
void apollolake_init_cpus(struct device *dev);
+void mainboard_devtree_update(struct device *dev);
#endif /* _SOC_APOLLOLAKE_CPU_H_ */