Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38814 )
Change subject: soc/intel/apl: disable NPK device in devicetree.cb ......................................................................
soc/intel/apl: disable NPK device in devicetree.cb
Allows to enable/disable NPK device from the device tree:
device pci 00.2 off end # NPK
Tested on Kontron come-mal10.
Change-Id: I910245d4ff35a6a0a9059fb6911d4426cdb999b6 Signed-off-by: Maxim Polyakov max.senia.poliak@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/38814 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Aaron Durbin adurbin@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/intel/apollolake/chip.c M src/soc/intel/apollolake/romstage.c 2 files changed, 10 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Aaron Durbin: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index 03e6dbd..37fdfff 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -425,6 +425,12 @@ static void disable_dev(struct device *dev, FSP_S_CONFIG *silconfig) { switch (dev->path.pci.devfn) { + case PCH_DEVFN_NPK: + /* + * Disable this device in the parse_devicetree_setting() function + * in romstage.c + */ + break; case PCH_DEVFN_ISH: silconfig->IshEnable = 0; break; diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c index 13adeee..05cd0db 100644 --- a/src/soc/intel/apollolake/romstage.c +++ b/src/soc/intel/apollolake/romstage.c @@ -291,12 +291,12 @@
static void parse_devicetree_setting(FSPM_UPD *m_upd) { -#if CONFIG(SOC_INTEL_GLK) DEVTREE_CONST struct device *dev = pcidev_path_on_root(PCH_DEVFN_NPK); - if (!dev) - return;
- m_upd->FspmConfig.TraceHubEn = dev->enabled; +#if CONFIG(SOC_INTEL_GLK) + m_upd->FspmConfig.TraceHubEn = dev ? dev->enabled : 0; +#else + m_upd->FspmConfig.NpkEn = dev ? dev->enabled : 0; #endif }