[coreboot-gerrit] Change in coreboot[master]: soc/intel/skylake: permit Kconfig to set subsystem ID

Matt Delco (Code Review) gerrit at coreboot.org
Mon Jul 23 21:50:39 CEST 2018


Matt Delco has uploaded this change for review. ( https://review.coreboot.org/27609


Change subject: soc/intel/skylake: permit Kconfig to set subsystem ID
......................................................................

soc/intel/skylake: permit Kconfig to set subsystem ID

This change permits the subsystem ID to be specified
via Kconfig for the devices on the SoC.

I'm also changing the behavior of how defaults
are handled.  Some devices are getting zero'ed
subsystem IDs because the unset (and thus zero'ed)
config options are overwriting the fsp defaults.
With this change the fsp defaults will only be
overwritten by non-zero config values.

Change-Id: I0f7bb8e465f55e5dd6d8e0fad71b9b2a22f089dc
Signed-off-by: Matt Delco <delco at chromium.org>
---
M src/soc/intel/skylake/chip.h
M src/soc/intel/skylake/chip_fsp20.c
2 files changed, 31 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/27609/1

diff --git a/src/soc/intel/skylake/chip.h b/src/soc/intel/skylake/chip.h
index a6e03ca..06e90fb 100644
--- a/src/soc/intel/skylake/chip.h
+++ b/src/soc/intel/skylake/chip.h
@@ -44,6 +44,11 @@
 	/* Common struct containing soc config data required by common code */
 	struct soc_intel_common_config common_soc_config;
 
+	/* Subsystem Vendor ID of the SA devices*/
+	uint16_t DefaultSvid;
+	/* Subsystem ID of the SA devices*/
+	uint16_t DefaultSid;
+
 	/*
 	 * Interrupt Routing configuration
 	 * If bit7 is 1, the interrupt is disabled.
diff --git a/src/soc/intel/skylake/chip_fsp20.c b/src/soc/intel/skylake/chip_fsp20.c
index f51559f..cccaba5 100644
--- a/src/soc/intel/skylake/chip_fsp20.c
+++ b/src/soc/intel/skylake/chip_fsp20.c
@@ -374,8 +374,32 @@
 		 */
 		params->SpiFlashCfgLockDown = 0;
 	}
-	params->PchSubSystemVendorId = config->PchConfigSubSystemVendorId;
-	params->PchSubSystemId = config->PchConfigSubSystemId;
+	/* only replacing subsys ID defaults when 'config' non-zero */
+	if (config->DefaultSvid)
+		params->DefaultSvid = config->DefaultSvid;
+#ifdef CONFIG_SUBSYSTEM_VENDOR_ID
+	else
+		params->DefaultSvid = CONFIG_SUBSYSTEM_VENDOR_ID;
+#endif
+	if (config->DefaultSid)
+		params->DefaultSid = config->DefaultSid;
+#ifdef CONFIG_SUBSYSTEM_DEVICE_ID
+	else
+		params->DefaultSid = CONFIG_SUBSYSTEM_DEVICE_ID;
+#endif
+	if (config->PchConfigSubSystemVendorId)
+		params->PchSubSystemVendorId =
+			config->PchConfigSubSystemVendorId;
+#ifdef CONFIG_SUBSYSTEM_VENDOR_ID
+	else
+		params->PchSubSystemVendorId = CONFIG_SUBSYSTEM_VENDOR_ID;
+#endif
+	if (config->PchConfigSubSystemId)
+		params->PchSubSystemId = config->PchConfigSubSystemId;
+#ifdef CONFIG_SUBSYSTEM_VENDOR_ID
+	else
+		params->PchSubSystemId = CONFIG_SUBSYSTEM_DEVICE_ID;
+#endif
 	params->PchPmWolEnableOverride = config->WakeConfigWolEnableOverride;
 	params->PchPmPcieWakeFromDeepSx = config->WakeConfigPcieWakeFromDeepSx;
 	params->PchPmDeepSxPol = config->PmConfigDeepSxPol;

-- 
To view, visit https://review.coreboot.org/27609
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f7bb8e465f55e5dd6d8e0fad71b9b2a22f089dc
Gerrit-Change-Number: 27609
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Delco <delco at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180723/edc726f1/attachment-0001.html>


More information about the coreboot-gerrit mailing list