From 63896ba6864924e5ee28eab5082fbdec13534f63 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 19 Mar 2008 17:10:55 +1100 Subject: [PATCH] --- yaml --- r: 87526 b: refs/heads/master c: ebf3a6509299e46c531f88ee727372bd95cf542a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/cell/setup.c | 36 +++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a31d8c3fc750..241a2b3f08b7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3a4295d101d9654ca909b64c786f9da6ca1bf37a +refs/heads/master: ebf3a6509299e46c531f88ee727372bd95cf542a diff --git a/trunk/arch/powerpc/platforms/cell/setup.c b/trunk/arch/powerpc/platforms/cell/setup.c index dda34650cb07..5c531e8f9f6f 100644 --- a/trunk/arch/powerpc/platforms/cell/setup.c +++ b/trunk/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;