aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_32.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-07-25 01:44:11 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-07-26 00:02:06 -0400
commit2052d6d25decc04dc05beb99348b3d78f6e3490d (patch)
treece88378411b0d51c7464d8e523b2a371d05f7519 /arch/powerpc/kernel/pci_32.c
parent7659c038d3d0a635b5aeff04aed523d7b6c1dde8 (diff)
[POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB
The Freescale PCI PHBs actual report back values in the BAR registers this causes issues in that we try to allocate resources for them and will get error messages like the following on MPC8544 DS: PCI: Failed to allocate mem resource #1:80000000@0 for 0000:00:00.0 To address this if we are class PCI_CLASS_PROCESSOR_POWERPC, a normal header type, and the PHB we clear out all the resources. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_32.c')
-rw-r--r--arch/powerpc/kernel/pci_32.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 721a69400d65..395086f63239 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -60,6 +60,24 @@ LIST_HEAD(hose_list);
60static int pci_bus_count; 60static int pci_bus_count;
61 61
62static void 62static void
63fixup_hide_host_resource_fsl(struct pci_dev* dev)
64{
65 int i, class = dev->class >> 8;
66
67 if ((class == PCI_CLASS_PROCESSOR_POWERPC) &&
68 (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) &&
69 (dev->bus->parent == NULL)) {
70 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
71 dev->resource[i].start = 0;
72 dev->resource[i].end = 0;
73 dev->resource[i].flags = 0;
74 }
75 }
76}
77DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl);
78DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl);
79
80static void
63fixup_broken_pcnet32(struct pci_dev* dev) 81fixup_broken_pcnet32(struct pci_dev* dev)
64{ 82{
65 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { 83 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {