diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2013-08-09 07:55:10 -0700 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2013-12-21 12:02:40 +0100 |
commit | 7e1c83e31bdd4b0aeebb2ed0916959a472c2369f (patch) | |
tree | 2f538a099ec17d2044e274f1089f930f51ddcb0c /src/device/pci_device.c | |
parent | d538e8fb0006c4ea2d689f2d99e28f9786a6fc2e (diff) |
Add Kconfig options to override Subsystem Vendor and Device ID
These can typically be set in the devicetree but we need a way to
override those values with a Kconfig setting so as not to expose
the Vendor ID before the product has launched.
Change-Id: Ib382e6d9359d24b128c693a657ffde52604efad3
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/65310
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/4455
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/device/pci_device.c')
-rw-r--r-- | src/device/pci_device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 1d998ca780..c810483649 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -599,6 +599,10 @@ void pci_dev_enable_resources(struct device *dev) /* Set the subsystem vendor and device ID for mainboard devices. */ ops = ops_pci(dev); if (dev->on_mainboard && ops && ops->set_subsystem) { + if (CONFIG_SUBSYSTEM_VENDOR_ID) + dev->subsystem_vendor = CONFIG_SUBSYSTEM_VENDOR_ID; + if (CONFIG_SUBSYSTEM_DEVICE_ID) + dev->subsystem_device = CONFIG_SUBSYSTEM_DEVICE_ID; printk(BIOS_DEBUG, "%s subsystem <- %04x/%04x\n", dev_path(dev), dev->subsystem_vendor, dev->subsystem_device); |