aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/nvidia/ck804/ck804_reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/nvidia/ck804/ck804_reset.c')
-rw-r--r--src/southbridge/nvidia/ck804/ck804_reset.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/southbridge/nvidia/ck804/ck804_reset.c b/src/southbridge/nvidia/ck804/ck804_reset.c
index bd1bc5378c..accd06e121 100644
--- a/src/southbridge/nvidia/ck804/ck804_reset.c
+++ b/src/southbridge/nvidia/ck804/ck804_reset.c
@@ -6,16 +6,16 @@
#include <arch/io.h>
#define PCI_DEV(BUS, DEV, FN) ( \
- (((BUS) & 0xFF) << 16) | \
- (((DEV) & 0x1f) << 11) | \
- (((FN) & 0x7) << 8))
+ (((BUS) & 0xFFF) << 20) | \
+ (((DEV) & 0x1F) << 15) | \
+ (((FN) & 0x7) << 12))
typedef unsigned device_t;
static void pci_write_config32(device_t dev, unsigned where, unsigned value)
{
unsigned addr;
- addr = dev | where;
+ addr = (dev>>4) | where;
outl(0x80000000 | (addr & ~3), 0xCF8);
outl(value, 0xCFC);
}
@@ -23,7 +23,7 @@ static void pci_write_config32(device_t dev, unsigned where, unsigned value)
static unsigned pci_read_config32(device_t dev, unsigned where)
{
unsigned addr;
- addr = dev | where;
+ addr = (dev>>4) | where;
outl(0x80000000 | (addr & ~3), 0xCF8);
return inl(0xCFC);
}