summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2021-06-18 12:13:43 +0530
committerSubrata Banik <subrata.banik@intel.com>2021-06-21 10:38:26 +0000
commitd6d87767cbf65f0da46bff32534b9718adcc332b (patch)
treef8c126e7ed2a371a39171b109d7494c964806e4b /src/soc/intel/apollolake
parent232222727d51f2d254121738b2e3ff92b8c1dc1f (diff)
soc/intel/apollolake: Use devfn_disable() function
Use devfn_disable() for disabling a PCI device rather than using `dev->enabled = 0`. Also, use is_devfn_enabled() to get the device current state prior updating the FSP-S UPD for XDCI. TEST=FSP-S disabled XDCI when `xdci_can_enable` returns 0 and XDCI is disabled at PCI enumeration `PCI: 00:15.1: enabled 0`. Change-Id: I449beae59d2f578c027d8110c03fa79f516c3fe9 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55666 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/apollolake')
-rw-r--r--src/soc/intel/apollolake/chip.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 9694c67fc6..b9f007db36 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -681,10 +681,9 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
apl_fsp_silicon_init_params_cb(cfg, silconfig);
/* Enable xDCI controller if enabled in devicetree and allowed */
- dev = pcidev_path_on_root(PCH_DEVFN_XDCI);
if (!xdci_can_enable())
- dev->enabled = 0;
- silconfig->UsbOtg = dev->enabled;
+ devfn_disable(pci_root_bus(), PCH_DEVFN_XDCI);
+ silconfig->UsbOtg = is_devfn_enabled(PCH_DEVFN_XDCI);
silconfig->VmxEnable = CONFIG(ENABLE_VMX);