diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2011-05-19 23:26:18 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-06-22 22:44:57 -0400 |
commit | c065488f1acfc0be75584c0fe156fc806820f39d (patch) | |
tree | ea1f1c03cb52674dcc861f3882d6a4d73f078313 /arch/powerpc | |
parent | 2602a21231645f0923595a6ae2757222f6802e3f (diff) |
powerpc/pci: Move FSL fixup from 32-bit to common
We need the FSL specific header fixup code on both 32-bit and 64-bit
platforms so just move the code into pci-common.c.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 18 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 19 |
2 files changed, 18 insertions, 19 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 893af2a9cd03..4f134132c195 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -1728,3 +1728,21 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1728 | if (mode == PCI_PROBE_NORMAL) | 1728 | if (mode == PCI_PROBE_NORMAL) |
1729 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); | 1729 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); |
1730 | } | 1730 | } |
1731 | |||
1732 | static void fixup_hide_host_resource_fsl(struct pci_dev *dev) | ||
1733 | { | ||
1734 | int i, class = dev->class >> 8; | ||
1735 | |||
1736 | if ((class == PCI_CLASS_PROCESSOR_POWERPC || | ||
1737 | class == PCI_CLASS_BRIDGE_OTHER) && | ||
1738 | (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) && | ||
1739 | (dev->bus->parent == NULL)) { | ||
1740 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
1741 | dev->resource[i].start = 0; | ||
1742 | dev->resource[i].end = 0; | ||
1743 | dev->resource[i].flags = 0; | ||
1744 | } | ||
1745 | } | ||
1746 | } | ||
1747 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl); | ||
1748 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl); | ||
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index bedb370459f2..d521644030d1 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -51,25 +51,6 @@ struct pci_dev *isa_bridge_pcidev; | |||
51 | EXPORT_SYMBOL_GPL(isa_bridge_pcidev); | 51 | EXPORT_SYMBOL_GPL(isa_bridge_pcidev); |
52 | 52 | ||
53 | static void | 53 | static void |
54 | fixup_hide_host_resource_fsl(struct pci_dev *dev) | ||
55 | { | ||
56 | int i, class = dev->class >> 8; | ||
57 | |||
58 | if ((class == PCI_CLASS_PROCESSOR_POWERPC || | ||
59 | class == PCI_CLASS_BRIDGE_OTHER) && | ||
60 | (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) && | ||
61 | (dev->bus->parent == NULL)) { | ||
62 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
63 | dev->resource[i].start = 0; | ||
64 | dev->resource[i].end = 0; | ||
65 | dev->resource[i].flags = 0; | ||
66 | } | ||
67 | } | ||
68 | } | ||
69 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl); | ||
70 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl); | ||
71 | |||
72 | static void | ||
73 | fixup_cpc710_pci64(struct pci_dev* dev) | 54 | fixup_cpc710_pci64(struct pci_dev* dev) |
74 | { | 55 | { |
75 | /* Hide the PCI64 BARs from the kernel as their content doesn't | 56 | /* Hide the PCI64 BARs from the kernel as their content doesn't |