aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-12-19 22:54:46 -0500
committerPaul Mackerras <paulus@samba.org>2007-12-20 00:18:07 -0500
commitfc3fb71c3e1850a6a1099dd1cb7bcd7e69ac7b73 (patch)
treec9885bd47237c6e09b42a3c42496b5865c0caa02 /arch/powerpc/platforms
parentb9baa20b0a50947f2e86d7775c9dba87c0d946ef (diff)
[POWERPC] pci32: Add flags modifying the PCI code behaviour
This adds to the 32 bits PCI code some flags, replacing the old pci_assign_all_busses global, that allow us to control various aspects of the PCI probing, such as whether to re-assign all resources or not, or to not try to assign anything at all. This also adds the flag x86 already has to avoid ISA alignment on bridges that don't have ISA forwarding enabled (no legacy devices on the top level bus) and sets it for PowerMacs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c2
-rw-r--r--arch/powerpc/platforms/82xx/pq2.c2
-rw-r--r--arch/powerpc/platforms/83xx/pci.c2
-rw-r--r--arch/powerpc/platforms/chrp/pci.c2
-rw-r--r--arch/powerpc/platforms/powermac/pci.c7
5 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4c6c82a684b1..262eda8659d0 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -363,7 +363,7 @@ mpc52xx_add_bridge(struct device_node *node)
363 363
364 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name); 364 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name);
365 365
366 pci_assign_all_buses = 1; 366 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
367 367
368 if (of_address_to_resource(node, 0, &rsrc) != 0) { 368 if (of_address_to_resource(node, 0, &rsrc) != 0) {
369 printk(KERN_ERR "Can't get %s resources\n", node->full_name); 369 printk(KERN_ERR "Can't get %s resources\n", node->full_name);
diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c
index 11d1db8bb091..1b75902fad64 100644
--- a/arch/powerpc/platforms/82xx/pq2.c
+++ b/arch/powerpc/platforms/82xx/pq2.c
@@ -53,7 +53,7 @@ static void __init pq2_pci_add_bridge(struct device_node *np)
53 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b) 53 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b)
54 goto err; 54 goto err;
55 55
56 pci_assign_all_buses = 1; 56 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
57 57
58 hose = pcibios_alloc_controller(np); 58 hose = pcibios_alloc_controller(np);
59 if (!hose) 59 if (!hose)
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 80425d7b14f8..14f1080c6c9d 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -54,7 +54,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
54 " bus 0\n", dev->full_name); 54 " bus 0\n", dev->full_name);
55 } 55 }
56 56
57 pci_assign_all_buses = 1; 57 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
58 hose = pcibios_alloc_controller(dev); 58 hose = pcibios_alloc_controller(dev);
59 if (!hose) 59 if (!hose)
60 return -ENOMEM; 60 return -ENOMEM;
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 0340a342f772..d51f83aeef7f 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -198,7 +198,7 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d
198 printk ("RTAS supporting Pegasos OF not found, please upgrade" 198 printk ("RTAS supporting Pegasos OF not found, please upgrade"
199 " your firmware\n"); 199 " your firmware\n");
200 } 200 }
201 pci_assign_all_buses = 1; 201 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
202 /* keep the reference to the root node */ 202 /* keep the reference to the root node */
203} 203}
204 204
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 589c613bcd3c..a2e9b36f61ef 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -725,7 +725,7 @@ static void __init setup_bandit(struct pci_controller *hose,
725static int __init setup_uninorth(struct pci_controller *hose, 725static int __init setup_uninorth(struct pci_controller *hose,
726 struct resource *addr) 726 struct resource *addr)
727{ 727{
728 pci_assign_all_buses = 1; 728 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
729 has_uninorth = 1; 729 has_uninorth = 1;
730 hose->ops = &macrisc_pci_ops; 730 hose->ops = &macrisc_pci_ops;
731 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000); 731 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
@@ -994,6 +994,9 @@ void __init pmac_pci_init(void)
994 struct device_node *np, *root; 994 struct device_node *np, *root;
995 struct device_node *ht = NULL; 995 struct device_node *ht = NULL;
996 996
997#ifdef CONFIG_PPC32
998 ppc_pci_flags = PPC_PCI_CAN_SKIP_ISA_ALIGN;
999#endif
997 root = of_find_node_by_path("/"); 1000 root = of_find_node_by_path("/");
998 if (root == NULL) { 1001 if (root == NULL) {
999 printk(KERN_CRIT "pmac_pci_init: can't find root " 1002 printk(KERN_CRIT "pmac_pci_init: can't find root "
@@ -1051,7 +1054,7 @@ void __init pmac_pci_init(void)
1051 * some offset between bus number and domains for now when we 1054 * some offset between bus number and domains for now when we
1052 * assign all busses should help for now 1055 * assign all busses should help for now
1053 */ 1056 */
1054 if (pci_assign_all_buses) 1057 if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
1055 pcibios_assign_bus_offset = 0x10; 1058 pcibios_assign_bus_offset = 0x10;
1056#endif 1059#endif
1057} 1060}