From cac5e9472622f43c0b33d70f20adef801b345773 Mon Sep 17 00:00:00 2001 From: Aamir Bohra Date: Fri, 26 Jul 2019 10:38:17 +0530 Subject: soc/intel/common/block/lpss: Correct the PCI device reference The initial implementation was assigning the devfn as PCI device reference directly which was incorrect. Change-Id: Iad57e9bc6b2acf1823ee38116aea8a93feece6f9 Signed-off-by: Aamir Bohra Reviewed-on: https://review.coreboot.org/c/coreboot/+/34579 Tested-by: build bot (Jenkins) Reviewed-by: Paul Fagerburg Reviewed-by: Tim Wawrzynczak --- src/soc/intel/common/block/lpss/lpss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/soc/intel/common/block/lpss/lpss.c b/src/soc/intel/common/block/lpss/lpss.c index 226b4d30a8..a519bf65e2 100644 --- a/src/soc/intel/common/block/lpss/lpss.c +++ b/src/soc/intel/common/block/lpss/lpss.c @@ -14,6 +14,7 @@ */ #include +#include #include #include @@ -80,7 +81,8 @@ void lpss_clk_update(uintptr_t base, uint32_t clk_m_val, uint32_t clk_n_val) void lpss_set_power_state(const struct device *dev, enum lpss_pwr_state state) { #if defined(__SIMPLE_DEVICE__) - pci_devfn_t lpss_dev = dev->path.pci.devfn; + unsigned int devfn = dev->path.pci.devfn; + pci_devfn_t lpss_dev = PCI_DEV(0, PCI_SLOT(devfn), PCI_FUNC(devfn)); #else const struct device *lpss_dev = dev; #endif -- cgit v1.2.3