diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-06-23 12:31:35 +0200 |
---|---|---|
committer | Werner Zeh <werner.zeh@siemens.com> | 2021-06-25 04:24:09 +0000 |
commit | 50b92f9a82872ffeb6fa01ab7d128bdadc191f42 (patch) | |
tree | b4192679a168e4a574f1434b705ad652130a82a1 /src | |
parent | 9bf9adae13b01cb400975d4d409bb3eb484c8a63 (diff) |
soc/intel/apollolake/xdci.c: Use `dev` parameter
The `dev` parameter already points to the xDCI device.
Change-Id: I122cc642c86b30804dd1176f77f4e2e1ebea4aa0
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55788
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/apollolake/xdci.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/soc/intel/apollolake/xdci.c b/src/soc/intel/apollolake/xdci.c index 56d4c87bdb..8c86e442ec 100644 --- a/src/soc/intel/apollolake/xdci.c +++ b/src/soc/intel/apollolake/xdci.c @@ -34,19 +34,18 @@ static void configure_host_mode_port0(struct device *dev) const struct resource *res; uint32_t reg; struct stopwatch sw; - struct device *xdci_dev = PCH_DEV_XDCI; /* * Only default to host mode if the xdci device is present and * enabled. If it's disabled assume the switch was already done * in FSP. */ - if (!dev->enabled || !xdci_dev->enabled || !xdci_can_enable()) + if (!dev->enabled || !xdci_can_enable()) return; printk(BIOS_INFO, "Putting port 0 into host mode.\n"); - res = find_resource(xdci_dev, PCI_BASE_ADDRESS_0); + res = find_resource(dev, PCI_BASE_ADDRESS_0); cfg0 = (void *)(uintptr_t)(res->base + DUAL_ROLE_CFG0); cfg1 = (void *)(uintptr_t)(res->base + DUAL_ROLE_CFG1); |