diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2013-11-22 10:22:56 +0100 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2015-04-17 01:10:20 +0200 |
commit | ddc40020b91cfe40fae968408910a887ccd1dd3a (patch) | |
tree | ed710c4781e947dccf892106cfef3258ae6fbe88 /c/src/lib | |
parent | LEON PCI: fix for PCI host bridge driver CFG space access (diff) | |
download | rtems-ddc40020b91cfe40fae968408910a887ccd1dd3a.tar.bz2 |
AT697 PCI: abort whhen a peripheral PCI system detected
Diffstat (limited to 'c/src/lib')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c | 9 |
1 files changed, 8 insertions, 1 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 76b9c4d943..6289a56b59 100644 --- a/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c +++ b/c/src/lib/libbsp/sparc/leon2/pci/at697_pci.c @@ -440,6 +440,13 @@ int at697pci_hw_init(struct at697pci_priv *priv) return -1; } + /* If not in system slot we are not host and we must abort. + * This is a host only driver. + */ + if ((regs->pciis & 0x1000) != 0) { + return -1; + } + /* Reset PCI Core */ regs->pciic = 0xffffffff; @@ -578,7 +585,7 @@ int at697pci_init1(struct drvmgr_dev *dev) if (at697pci_init(priv)) { DBG("Failed to initialize at697pci driver\n"); - return DRVMGR_FAIL; + return DRVMGR_EIO; } /* Host is always Big-Endian */ |