aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/amd/pi/hudson
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2018-05-20 15:41:05 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2018-05-21 14:25:30 +0000
commit0bc06ab4b1f5b2d05dd9cbeb1e8521a8a717a69c (patch)
tree053e35ebe2cd30eb7c42b965b28c08df9e9b9ac0 /src/southbridge/amd/pi/hudson
parentb11d4e3ea4ad6208d82f1bacfda52f6e70f7de8c (diff)
agesa/hudson pi/hudson: Use PCI_DEVICE_ID
Change to 16bit read of the standard register. Change-Id: Id085935eb17838c07bd78716158e622f45f56906 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/26429 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/southbridge/amd/pi/hudson')
-rw-r--r--src/southbridge/amd/pi/hudson/hudson.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/southbridge/amd/pi/hudson/hudson.c b/src/southbridge/amd/pi/hudson/hudson.c
index bd9deb135b..ecf041aaae 100644
--- a/src/southbridge/amd/pi/hudson/hudson.c
+++ b/src/southbridge/amd/pi/hudson/hudson.c
@@ -20,6 +20,7 @@
#include <device/device.h>
#include <device/pci.h>
+#include <device/pci_def.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <cbmem.h>
@@ -61,7 +62,7 @@ void hudson_enable(struct device *dev)
switch (dev->path.pci.devfn) {
case PCI_DEVFN(0x14, 7): /* SD */
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) {