soc/intel/cannonlake: Use devfn_disable() function for XDCI
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:14.1: enabled 0`. Change-Id: I64ab77bc49d93aca1da0126d849e69ff75b182a3 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55726 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
5dea316250
commit
3b374bebac
|
@ -300,13 +300,9 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable xDCI controller if enabled in devicetree and allowed */
|
/* Enable xDCI controller if enabled in devicetree and allowed */
|
||||||
dev = pcidev_path_on_root(PCH_DEVFN_USBOTG);
|
if (!xdci_can_enable())
|
||||||
if (dev) {
|
devfn_disable(pci_root_bus(), PCH_DEVFN_USBOTG);
|
||||||
if (!xdci_can_enable())
|
params->XdciEnable = is_devfn_enabled(PCH_DEVFN_USBOTG);
|
||||||
dev->enabled = 0;
|
|
||||||
params->XdciEnable = dev->enabled;
|
|
||||||
} else
|
|
||||||
params->XdciEnable = 0;
|
|
||||||
|
|
||||||
/* Set Debug serial port */
|
/* Set Debug serial port */
|
||||||
params->SerialIoDebugUartNumber = CONFIG_UART_FOR_CONSOLE;
|
params->SerialIoDebugUartNumber = CONFIG_UART_FOR_CONSOLE;
|
||||||
|
|
Loading…
Reference in New Issue