diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2014-02-05 17:17:53 +0100 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2015-04-17 01:10:20 +0200 |
commit | 3c236cc2092901b3513e1fb2463399181fa3add7 (patch) | |
tree | 607f81670f7faec984edb50d8a771cbc3b3eb3b7 | |
parent | GPTIMER: timer probing must not be on timer0 (diff) | |
download | rtems-3c236cc2092901b3513e1fb2463399181fa3add7.tar.bz2 |
LEON PCI: fix for PCI host bridge driver CFG space access
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/pci/grpci.c | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/pci/grpci2.c | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/pci/pcif.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/pci/grpci.c b/c/src/lib/libbsp/sparc/shared/pci/grpci.c index 63e08ad92a..08720f0925 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/grpci.c +++ b/c/src/lib/libbsp/sparc/shared/pci/grpci.c @@ -187,7 +187,7 @@ int grpci_cfg_r32(pci_dev_t dev, int ofs, uint32_t *val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); @@ -260,7 +260,7 @@ int grpci_cfg_w32(pci_dev_t dev, int ofs, uint32_t val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); diff --git a/c/src/lib/libbsp/sparc/shared/pci/grpci2.c b/c/src/lib/libbsp/sparc/shared/pci/grpci2.c index 29af4ab756..eacd2288b1 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/grpci2.c +++ b/c/src/lib/libbsp/sparc/shared/pci/grpci2.c @@ -405,7 +405,7 @@ int grpci2_cfg_w32(pci_dev_t dev, int ofs, uint32_t val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); diff --git a/c/src/lib/libbsp/sparc/shared/pci/pcif.c b/c/src/lib/libbsp/sparc/shared/pci/pcif.c index 2dc46a8ad1..bc435b5a80 100644 --- a/c/src/lib/libbsp/sparc/shared/pci/pcif.c +++ b/c/src/lib/libbsp/sparc/shared/pci/pcif.c @@ -174,7 +174,7 @@ int pcif_cfg_r32(pci_dev_t dev, int ofs, uint32_t *val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); @@ -241,7 +241,7 @@ int pcif_cfg_w32(pci_dev_t dev, int ofs, uint32_t val) */ if (dev == HOST_TGT) bus = devfn = 0; - if (bus == 0) + else if (bus == 0) devfn = PCI_DEV_DEVFUNC(dev) + PCI_DEV(0, 6, 0); else devfn = PCI_DEV_DEVFUNC(dev); |