<p>Matt Delco has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27609">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/skylake: permit Kconfig to set subsystem ID<br><br>This change permits the subsystem ID to be specified<br>via Kconfig for the devices on the SoC.<br><br>I'm also changing the behavior of how defaults<br>are handled.  Some devices are getting zero'ed<br>subsystem IDs because the unset (and thus zero'ed)<br>config options are overwriting the fsp defaults.<br>With this change the fsp defaults will only be<br>overwritten by non-zero config values.<br><br>Change-Id: I0f7bb8e465f55e5dd6d8e0fad71b9b2a22f089dc<br>Signed-off-by: Matt Delco <delco@chromium.org><br>---<br>M src/soc/intel/skylake/chip.h<br>M src/soc/intel/skylake/chip_fsp20.c<br>2 files changed, 31 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/27609/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/intel/skylake/chip.h b/src/soc/intel/skylake/chip.h</span><br><span>index a6e03ca..06e90fb 100644</span><br><span>--- a/src/soc/intel/skylake/chip.h</span><br><span>+++ b/src/soc/intel/skylake/chip.h</span><br><span>@@ -44,6 +44,11 @@</span><br><span>  /* Common struct containing soc config data required by common code */</span><br><span>       struct soc_intel_common_config common_soc_config;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* Subsystem Vendor ID of the SA devices*/</span><br><span style="color: hsl(120, 100%, 40%);">+    uint16_t DefaultSvid;</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Subsystem ID of the SA devices*/</span><br><span style="color: hsl(120, 100%, 40%);">+   uint16_t DefaultSid;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>       /*</span><br><span>    * Interrupt Routing configuration</span><br><span>    * If bit7 is 1, the interrupt is disabled.</span><br><span>diff --git a/src/soc/intel/skylake/chip_fsp20.c b/src/soc/intel/skylake/chip_fsp20.c</span><br><span>index f51559f..cccaba5 100644</span><br><span>--- a/src/soc/intel/skylake/chip_fsp20.c</span><br><span>+++ b/src/soc/intel/skylake/chip_fsp20.c</span><br><span>@@ -374,8 +374,32 @@</span><br><span>               */</span><br><span>          params->SpiFlashCfgLockDown = 0;</span><br><span>  }</span><br><span style="color: hsl(0, 100%, 40%);">-       params->PchSubSystemVendorId = config->PchConfigSubSystemVendorId;</span><br><span style="color: hsl(0, 100%, 40%);">-        params->PchSubSystemId = config->PchConfigSubSystemId;</span><br><span style="color: hsl(120, 100%, 40%);">+  /* only replacing subsys ID defaults when 'config' non-zero */</span><br><span style="color: hsl(120, 100%, 40%);">+        if (config->DefaultSvid)</span><br><span style="color: hsl(120, 100%, 40%);">+           params->DefaultSvid = config->DefaultSvid;</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef CONFIG_SUBSYSTEM_VENDOR_ID</span><br><span style="color: hsl(120, 100%, 40%);">+   else</span><br><span style="color: hsl(120, 100%, 40%);">+          params->DefaultSvid = CONFIG_SUBSYSTEM_VENDOR_ID;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+  if (config->DefaultSid)</span><br><span style="color: hsl(120, 100%, 40%);">+            params->DefaultSid = config->DefaultSid;</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef CONFIG_SUBSYSTEM_DEVICE_ID</span><br><span style="color: hsl(120, 100%, 40%);">+     else</span><br><span style="color: hsl(120, 100%, 40%);">+          params->DefaultSid = CONFIG_SUBSYSTEM_DEVICE_ID;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+   if (config->PchConfigSubSystemVendorId)</span><br><span style="color: hsl(120, 100%, 40%);">+            params->PchSubSystemVendorId =</span><br><span style="color: hsl(120, 100%, 40%);">+                     config->PchConfigSubSystemVendorId;</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef CONFIG_SUBSYSTEM_VENDOR_ID</span><br><span style="color: hsl(120, 100%, 40%);">+     else</span><br><span style="color: hsl(120, 100%, 40%);">+          params->PchSubSystemVendorId = CONFIG_SUBSYSTEM_VENDOR_ID;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+ if (config->PchConfigSubSystemId)</span><br><span style="color: hsl(120, 100%, 40%);">+          params->PchSubSystemId = config->PchConfigSubSystemId;</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef CONFIG_SUBSYSTEM_VENDOR_ID</span><br><span style="color: hsl(120, 100%, 40%);">+       else</span><br><span style="color: hsl(120, 100%, 40%);">+          params->PchSubSystemId = CONFIG_SUBSYSTEM_DEVICE_ID;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span>      params->PchPmWolEnableOverride = config->WakeConfigWolEnableOverride;</span><br><span>  params->PchPmPcieWakeFromDeepSx = config->WakeConfigPcieWakeFromDeepSx;</span><br><span>        params->PchPmDeepSxPol = config->PmConfigDeepSxPol;</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27609">change 27609</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/27609"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I0f7bb8e465f55e5dd6d8e0fad71b9b2a22f089dc </div>
<div style="display:none"> Gerrit-Change-Number: 27609 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Matt Delco <delco@chromium.org> </div>