From 5bddcc48b82c1887c96077c85ba078cd427d1133 Mon Sep 17 00:00:00 2001 From: Kane Chen Date: Tue, 22 Aug 2017 11:37:18 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/21142 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/soc/intel/apollolake/chip.c | 7 +++++++ src/soc/intel/apollolake/include/soc/cpu.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index af625a1d9e..628304c99d 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -497,6 +497,11 @@ static void glk_fsp_silicon_init_params_cb( 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 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd) 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 10e0595900..2d22ae5181 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_ */ -- cgit v1.2.3