summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2013-07-01 15:00:21 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2015-04-17 01:10:20 +0200
commit51347053b8fa490f2e5a20ce0693ef32dc6a3018 (patch)
tree6cf4488afc5343efac529f61483c86352ac1a4a9 /c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c
parentAPBUART: debug bit was cleared incorrectly (diff)
downloadrtems-51347053b8fa490f2e5a20ce0693ef32dc6a3018.tar.bz2
LEON PCI: host bridge driver support for probing dev0=AD16
Before the LIBPCI didn't probe device0 (AD16), the host bridge drivers used bus=dev=func=0 to internally probe the host bridge's target interface. Now that LIBPCI uses bus=dev=func=0 to access device0, bus=0xff is introduced internally to identify the host bridge target configuration space.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c8
1 files changed, 2 insertions, 6 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 2387cc0bf7..76b9c4d943 100644
--- a/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c
+++ b/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c
@@ -161,7 +161,6 @@ struct at697pci_priv {
struct at697pci_regs *regs;
int minor;
- uint32_t devVend; /* PCI Device and Vendor ID of Host */
uint32_t bar1_pci_adr;
uint32_t bar2_pci_adr;
@@ -228,7 +227,7 @@ int at697pci_cfg_r32(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)) {
*val = 0xffffffff;
return PCISTS_EINVAL;
}
@@ -239,7 +238,7 @@ int at697pci_cfg_r32(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) |
@@ -462,9 +461,6 @@ int at697pci_hw_init(struct at697pci_priv *priv)
/* Set Inititator configuration so that AHB slave accesses generate memory read/write commands */
regs->pciic = 0x41;
- /* Get the AT697PCI Host PCI ID */
- at697pci_cfg_r32(host, PCI_VENDOR_ID, &priv->devVend);
-
return 0;
}