aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2008-03-19 02:10:55 -0400
committerPaul Mackerras <paulus@samba.org>2008-03-19 19:15:13 -0400
commitebf3a6509299e46c531f88ee727372bd95cf542a (patch)
tree288bef411ca1c9f3adc4548098a117c85faca739
parent3a4295d101d9654ca909b64c786f9da6ca1bf37a (diff)
[POWERPC] Hide resources on Axon PCIE root complex nodes
The PCI bridge representing the PCIE root complex on Axon, contains device BARs for a memory range and ROM that define inbound accesses. This confuses the kernel resource management code -- the resources need to be hidden when Axon is a host bridge. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/cell/setup.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index dda34650cb07..5c531e8f9f6f 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)
81 printk("*** %04x : %s\n", hex, s ? s : ""); 81 printk("*** %04x : %s\n", hex, s ? s : "");
82} 82}
83 83
84static void cell_fixup_pcie_rootcomplex(struct pci_dev *dev)
85{
86 struct pci_controller *hose;
87 const char *s;
88 int i;
89
90 if (!machine_is(cell))
91 return;
92
93 /* We're searching for a direct child of the PHB */
94 if (dev->bus->self != NULL || dev->devfn != 0)
95 return;
96
97 hose = pci_bus_to_host(dev->bus);
98 if (hose == NULL)
99 return;
100
101 /* Only on PCIE */
102 if (!of_device_is_compatible(hose->dn, "pciex"))
103 return;
104
105 /* And only on axon */
106 s = of_get_property(hose->dn, "model", NULL);
107 if (!s || strcmp(s, "Axon") != 0)
108 return;
109
110 for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) {
111 dev->resource[i].start = dev->resource[i].end = 0;
112 dev->resource[i].flags = 0;
113 }
114
115 printk(KERN_DEBUG "PCI: Hiding resources on Axon PCIE RC %s\n",
116 pci_name(dev));
117}
118DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex);
119
84static int __init cell_publish_devices(void) 120static int __init cell_publish_devices(void)
85{ 121{
86 int node; 122 int node;