soc/intel: Refactor xdci_can_enable()
function
The same pattern appears on all `xdci_can_enable()` call sites. Move the logic inside the function and take the xDCI devfn as parameter. Change-Id: I94c24c10c7fc7c5b4938cffca17bdfb853c7bd59 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55790 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
committed by
Patrick Georgi
parent
3657187789
commit
c7cfe0ba54
@@ -371,10 +371,7 @@ static void fill_fsps_xhci_params(FSP_S_CONFIG *s_cfg,
|
||||
static void fill_fsps_xdci_params(FSP_S_CONFIG *s_cfg,
|
||||
const struct soc_intel_alderlake_config *config)
|
||||
{
|
||||
/* Enable xDCI controller if enabled in devicetree and allowed */
|
||||
if (!xdci_can_enable())
|
||||
devfn_disable(pci_root_bus(), PCH_DEVFN_USBOTG);
|
||||
s_cfg->XdciEnable = is_devfn_enabled(PCH_DEVFN_USBOTG);
|
||||
s_cfg->XdciEnable = xdci_can_enable(PCH_DEVFN_USBOTG);
|
||||
}
|
||||
|
||||
static void fill_fsps_uart_params(FSP_S_CONFIG *s_cfg,
|
||||
|
Reference in New Issue
Block a user