From 0bc06ab4b1f5b2d05dd9cbeb1e8521a8a717a69c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 20 May 2018 15:41:05 +0300 Subject: agesa/hudson pi/hudson: Use PCI_DEVICE_ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change to 16bit read of the standard register. Change-Id: Id085935eb17838c07bd78716158e622f45f56906 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/26429 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/southbridge/amd/agesa/hudson/hudson.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/southbridge/amd/agesa') diff --git a/src/southbridge/amd/agesa/hudson/hudson.c b/src/southbridge/amd/agesa/hudson/hudson.c index 9fb81a6364..4fc473bdf4 100644 --- a/src/southbridge/amd/agesa/hudson/hudson.c +++ b/src/southbridge/amd/agesa/hudson/hudson.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -83,7 +84,7 @@ void hudson_enable(struct device *dev) switch (dev->path.pci.devfn) { case PCI_DEVFN(0x14, 5): if (dev->enabled == 0) { - u32 usb_device_id = pci_read_config32(dev, 0) >> 16; + u32 usb_device_id = pci_read_config16(dev, PCI_DEVICE_ID); u8 reg8; if (usb_device_id == PCI_DEVICE_ID_AMD_SB900_USB_20_5) { /* turn off and remove device 0:14.5 from PCI space */ @@ -96,7 +97,7 @@ void hudson_enable(struct device *dev) case PCI_DEVFN(0x14, 7): if (dev->enabled == 0) { - u32 sd_device_id = pci_read_config32(dev, 0) >> 16; + u32 sd_device_id = pci_read_config16(dev, PCI_DEVICE_ID); /* turn off the SDHC controller in the PM reg */ u8 reg8; if (sd_device_id == PCI_DEVICE_ID_AMD_HUDSON_SD) { -- cgit v1.2.3