diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2013-12-18 16:42:16 +0100 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2013-12-18 16:43:19 +0100 |
commit | d006f60ce7ac8b7c69b9aa814f99ed3f5db49e83 (patch) | |
tree | 4983fce409a4f43a627cfdc9614a1191ae2e9208 | |
parent | c59f7581478dccfbccf68bdf3312f61a765aa452 (diff) |
AT697PCI: fix PCI cfg writes
-rw-r--r-- | c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c b/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c index b5f04fded2..142636c4ad 100644 --- a/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c +++ b/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c @@ -306,7 +306,7 @@ int at697pci_cfg_w32(pci_dev_t dev, int offset, uint32_t val) int func = PCI_DEV_FUNC(dev); int retval; - if (slot > 21 || (offset & ~0xfc)) + if (slot > 15 || (offset & ~0xfc)) return PCISTS_EINVAL; regs = at697pcipriv->regs; @@ -315,7 +315,7 @@ int at697pci_cfg_w32(pci_dev_t dev, int offset, uint32_t val) if ( bus == 0 ) { /* PCI Access - TYPE 0 */ - address = (1<<(11+slot)) | (func << 8) | offset; + address = (1<<(16+slot)) | (func << 8) | offset; } else { /* PCI access - TYPE 1 */ address = ((bus & 0xff) << 16) | ((slot & 0x1f) << 11) | |