diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2006-03-12 21:31:38 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2006-03-12 21:31:38 +0100 |
commit | 7b230f61db319d87d51449d4620d520822813fbb (patch) | |
tree | 4ab1907f8a19b51240ee9853bfe8acaad05c041c /drivers/pci_indirect.c | |
parent | a3f0169880a44ac06de5177e7926d7c732368663 (diff) | |
parent | dffb70f3305daa16625ec9d5b02a2c0d23ff84b3 (diff) | |
download | u-boot-imx-7b230f61db319d87d51449d4620d520822813fbb.zip u-boot-imx-7b230f61db319d87d51449d4620d520822813fbb.tar.gz u-boot-imx-7b230f61db319d87d51449d4620d520822813fbb.tar.bz2 |
Merge with git://git.kernel.org/pub/scm/boot/u-boot/u-boot.git#pci
Diffstat (limited to 'drivers/pci_indirect.c')
-rw-r--r-- | drivers/pci_indirect.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pci_indirect.c b/drivers/pci_indirect.c index e8f19f5..f0c4a1c 100644 --- a/drivers/pci_indirect.c +++ b/drivers/pci_indirect.c @@ -36,6 +36,10 @@ static int \ indirect_##rw##_config_##size(struct pci_controller *hose, \ pci_dev_t dev, int offset, type val) \ { \ + u32 b, d,f; \ + b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev); \ + b = b - hose->first_busno; \ + dev = PCI_BDF(b, d, f); \ out_le32(hose->cfg_addr, dev | (offset & 0xfc) | 0x80000000); \ sync(); \ cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \ @@ -47,6 +51,10 @@ static int \ indirect_##rw##_config_##size(struct pci_controller *hose, \ pci_dev_t dev, int offset, type val) \ { \ + u32 b, d,f; \ + b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev); \ + b = b - hose->first_busno; \ + dev = PCI_BDF(b, d, f); \ *(hose->cfg_addr) = dev | (offset & 0xfc) | 0x80000000; \ sync(); \ cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \ @@ -58,6 +66,10 @@ static int \ indirect_##rw##_config_##size(struct pci_controller *hose, \ pci_dev_t dev, int offset, type val) \ { \ + u32 b, d,f; \ + b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev); \ + b = b - hose->first_busno; \ + dev = PCI_BDF(b, d, f); \ if (PCI_BUS(dev) > 0) \ out_le32(hose->cfg_addr, dev | (offset & 0xfc) | 0x80000001); \ else \ @@ -71,6 +83,10 @@ static int \ indirect_##rw##_config_##size(struct pci_controller *hose, \ pci_dev_t dev, int offset, type val) \ { \ + u32 b, d,f; \ + b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev); \ + b = b - hose->first_busno; \ + dev = PCI_BDF(b, d, f); \ out_le32(hose->cfg_addr, dev | (offset & 0xfc) | 0x80000000); \ cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \ return 0; \ |