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 <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34579
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Aamir Bohra 2019-07-26 10:38:17 +05:30 committed by Patrick Georgi
parent 28883db36f
commit cac5e94726
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,7 @@
*/
#include <device/mmio.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <intelblocks/lpss.h>
@ -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