diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-01-12 15:48:43 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-01-12 15:48:43 -0600 |
commit | d5e78b7bf4f54e3ec6b3720716331643fdc13bf8 (patch) | |
tree | afbe455169cd6634bf09a46f1badc2d8e1a77c12 | |
parent | 1e8f1da65b78c13125c287b6a989f228df5aed34 (diff) | |
parent | dffb70f3305daa16625ec9d5b02a2c0d23ff84b3 (diff) | |
download | u-boot-imx-d5e78b7bf4f54e3ec6b3720716331643fdc13bf8.zip u-boot-imx-d5e78b7bf4f54e3ec6b3720716331643fdc13bf8.tar.gz u-boot-imx-d5e78b7bf4f54e3ec6b3720716331643fdc13bf8.tar.bz2 |
Merge branch 'pci'
-rw-r--r-- | CHANGELOG | 5 | ||||
-rw-r--r-- | drivers/pci_indirect.c | 16 |
2 files changed, 21 insertions, 0 deletions
@@ -2,6 +2,11 @@ Changes since U-Boot 1.1.4: ====================================================================== +* Fixed PCI indirect config ops to handle multiple PCI controllers + We need to adjust the bus number we are trying to access based + on which PCI controller its on + Patch by Kumar Gala 12 Jan 2006 + * Add helper function for generic flat device tree fixups for mpc83xx Patch by Kumar Gala 11 Jan 2006 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; \ |