aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/86xx/pci.c4
-rw-r--r--arch/powerpc/sysdev/indirect_pci.c6
-rw-r--r--include/asm-ppc/pci-bridge.h5
3 files changed, 14 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c
index 3825e1ac53..6f3c0f674b 100644
--- a/arch/powerpc/platforms/86xx/pci.c
+++ b/arch/powerpc/platforms/86xx/pci.c
@@ -158,11 +158,13 @@ int __init mpc86xx_add_bridge(struct device_node *dev)
158 printk(KERN_WARNING "Can't get bus-range for %s, assume" 158 printk(KERN_WARNING "Can't get bus-range for %s, assume"
159 " bus 0\n", dev->full_name); 159 " bus 0\n", dev->full_name);
160 160
161 pci_assign_all_buses = 1;
161 hose = pcibios_alloc_controller(); 162 hose = pcibios_alloc_controller();
162 if (!hose) 163 if (!hose)
163 return -ENOMEM; 164 return -ENOMEM;
164 hose->arch_data = dev; 165 hose->arch_data = dev;
165 hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG; 166 hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG |
167 PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS;
166 168
167 hose->first_busno = bus_range ? bus_range[0] : 0x0; 169 hose->first_busno = bus_range ? bus_range[0] : 0x0;
168 hose->last_busno = bus_range ? bus_range[1] : 0xff; 170 hose->last_busno = bus_range ? bus_range[1] : 0xff;
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index 3a1612253c..c7e6e859b3 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -103,6 +103,12 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
103 (0x80000000 | (bus_no << 16) 103 (0x80000000 | (bus_no << 16)
104 | (devfn << 8) | reg | cfg_type)); 104 | (devfn << 8) | reg | cfg_type));
105 105
106 /* surpress setting of PCI_PRIMARY_BUS */
107 if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS)
108 if ((offset == PCI_PRIMARY_BUS) &&
109 (bus->number == hose->first_busno))
110 val &= 0xffffff00;
111
106 /* 112 /*
107 * Note: the caller has already checked that offset is 113 * Note: the caller has already checked that offset is
108 * suitably aligned and that len is 1, 2 or 4. 114 * suitably aligned and that len is 1, 2 or 4.
diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h
index 0dee56b839..c09fbf02ef 100644
--- a/include/asm-ppc/pci-bridge.h
+++ b/include/asm-ppc/pci-bridge.h
@@ -73,9 +73,14 @@ struct pci_controller {
73 * Used for variants of PCI indirect handling and possible quirks: 73 * Used for variants of PCI indirect handling and possible quirks:
74 * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 74 * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1
75 * EXT_REG - provides access to PCI-e extended registers 75 * EXT_REG - provides access to PCI-e extended registers
76 * SURPRESS_PRIMARY_BUS - we surpress the setting of PCI_PRIMARY_BUS
77 * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS
78 * to determine which bus number to match on when generating type0
79 * config cycles
76 */ 80 */
77#define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001) 81#define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001)
78#define PPC_INDIRECT_TYPE_EXT_REG (0x00000002) 82#define PPC_INDIRECT_TYPE_EXT_REG (0x00000002)
83#define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004)
79 u32 indirect_type; 84 u32 indirect_type;
80 85
81 /* Currently, we limit ourselves to 1 IO range and 3 mem 86 /* Currently, we limit ourselves to 1 IO range and 3 mem