diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-19 19:10:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-19 19:10:56 -0700 |
commit | 635440c0235537a3f0a90ed5b6f8cd8a5da862de (patch) | |
tree | 03eff0d444620fc32c54c16f66aed5ddeefd01ab /arch/powerpc/platforms/cell/setup.c | |
parent | de7c6d15e354bc94a846f03749819768c331280a (diff) | |
parent | 93ce4e2d2d7404e80d5612fb1cc13d4aad5e42fc (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Update some defconfigs
[POWERPC] Hide resources on Axon PCIE root complex nodes
[POWERPC] Fix cell IOMMU code to cope with empty dma-ranges and non-PCI devices
[POWERPC] Fix build failure for tqm8540 and sbc85xx defconfigs
[POWERPC] Fix PMU + soft interrupt disable bug
[POWERPC] user_regset PTRACE_SETREGS regression fix
Diffstat (limited to 'arch/powerpc/platforms/cell/setup.c')
-rw-r--r-- | arch/powerpc/platforms/cell/setup.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index dda34650cb0..5c531e8f9f6 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c @@ -81,6 +81,42 @@ static void cell_progress(char *s, unsigned short hex) printk("*** %04x : %s\n", hex, s ? s : ""); } +static void cell_fixup_pcie_rootcomplex(struct pci_dev *dev) +{ + struct pci_controller *hose; + const char *s; + int i; + + if (!machine_is(cell)) + return; + + /* We're searching for a direct child of the PHB */ + if (dev->bus->self != NULL || dev->devfn != 0) + return; + + hose = pci_bus_to_host(dev->bus); + if (hose == NULL) + return; + + /* Only on PCIE */ + if (!of_device_is_compatible(hose->dn, "pciex")) + return; + + /* And only on axon */ + s = of_get_property(hose->dn, "model", NULL); + if (!s || strcmp(s, "Axon") != 0) + return; + + for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) { + dev->resource[i].start = dev->resource[i].end = 0; + dev->resource[i].flags = 0; + } + + printk(KERN_DEBUG "PCI: Hiding resources on Axon PCIE RC %s\n", + pci_name(dev)); +} +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex); + static int __init cell_publish_devices(void) { int node; |