diff options
Diffstat (limited to 'arch/powerpc')
-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 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 | ||
84 | static 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 | } | ||
118 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex); | ||
119 | |||
84 | static int __init cell_publish_devices(void) | 120 | static int __init cell_publish_devices(void) |
85 | { | 121 | { |
86 | int node; | 122 | int node; |