diff options
author | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2008-12-11 04:46:44 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-15 23:53:16 -0500 |
commit | 7fe519c207e3400dea6d67e1d483a16b11608423 (patch) | |
tree | f06d9194f5a14424e1f08e60682b35e666d4698c /arch/powerpc/platforms | |
parent | edc72ac4a0894247a6d3f1157a8ec8d603fff52d (diff) |
powerpc: Introduce ppc_pci_flags accessors
Currently there are a number of platforms that open code access to
the ppc_pci_flags global variable. However, that variable is not
present if CONFIG_PCI is not set, which can lead to a build break.
This introduces a number of accessor functions that are defined
to be empty in the case of CONFIG_PCI being disabled. The
various platform files in the kernel are updated to use these.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/40x/ep405.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/kilauea.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/40x/ppc40x_simple.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/ebony.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/ppc44x_simple.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/sam440ep.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/82xx/pq2.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pci.c | 6 |
10 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/40x/ep405.c b/arch/powerpc/platforms/40x/ep405.c index ae2e7f67c18e..4058fd1e7fc7 100644 --- a/arch/powerpc/platforms/40x/ep405.c +++ b/arch/powerpc/platforms/40x/ep405.c | |||
@@ -100,7 +100,7 @@ static void __init ep405_setup_arch(void) | |||
100 | /* Find & init the BCSR CPLD */ | 100 | /* Find & init the BCSR CPLD */ |
101 | ep405_init_bcsr(); | 101 | ep405_init_bcsr(); |
102 | 102 | ||
103 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | 103 | ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); |
104 | } | 104 | } |
105 | 105 | ||
106 | static int __init ep405_probe(void) | 106 | static int __init ep405_probe(void) |
diff --git a/arch/powerpc/platforms/40x/kilauea.c b/arch/powerpc/platforms/40x/kilauea.c index 1dd24ffc0dc1..fd7d934dac8b 100644 --- a/arch/powerpc/platforms/40x/kilauea.c +++ b/arch/powerpc/platforms/40x/kilauea.c | |||
@@ -44,7 +44,7 @@ static int __init kilauea_probe(void) | |||
44 | if (!of_flat_dt_is_compatible(root, "amcc,kilauea")) | 44 | if (!of_flat_dt_is_compatible(root, "amcc,kilauea")) |
45 | return 0; | 45 | return 0; |
46 | 46 | ||
47 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | 47 | ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); |
48 | 48 | ||
49 | return 1; | 49 | return 1; |
50 | } | 50 | } |
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c index 4498a86b46c3..f40ac9b8f99f 100644 --- a/arch/powerpc/platforms/40x/ppc40x_simple.c +++ b/arch/powerpc/platforms/40x/ppc40x_simple.c | |||
@@ -61,7 +61,7 @@ static int __init ppc40x_probe(void) | |||
61 | 61 | ||
62 | for (i = 0; i < ARRAY_SIZE(board); i++) { | 62 | for (i = 0; i < ARRAY_SIZE(board); i++) { |
63 | if (of_flat_dt_is_compatible(root, board[i])) { | 63 | if (of_flat_dt_is_compatible(root, board[i])) { |
64 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | 64 | ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); |
65 | return 1; | 65 | return 1; |
66 | } | 66 | } |
67 | } | 67 | } |
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c index a0e8fe4662f6..88b9117fa691 100644 --- a/arch/powerpc/platforms/44x/ebony.c +++ b/arch/powerpc/platforms/44x/ebony.c | |||
@@ -54,7 +54,7 @@ static int __init ebony_probe(void) | |||
54 | if (!of_flat_dt_is_compatible(root, "ibm,ebony")) | 54 | if (!of_flat_dt_is_compatible(root, "ibm,ebony")) |
55 | return 0; | 55 | return 0; |
56 | 56 | ||
57 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | 57 | ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); |
58 | 58 | ||
59 | return 1; | 59 | return 1; |
60 | } | 60 | } |
diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c index 29671262801f..76fdc51dac8b 100644 --- a/arch/powerpc/platforms/44x/ppc44x_simple.c +++ b/arch/powerpc/platforms/44x/ppc44x_simple.c | |||
@@ -69,7 +69,7 @@ static int __init ppc44x_probe(void) | |||
69 | 69 | ||
70 | for (i = 0; i < ARRAY_SIZE(board); i++) { | 70 | for (i = 0; i < ARRAY_SIZE(board); i++) { |
71 | if (of_flat_dt_is_compatible(root, board[i])) { | 71 | if (of_flat_dt_is_compatible(root, board[i])) { |
72 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | 72 | ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); |
73 | return 1; | 73 | return 1; |
74 | } | 74 | } |
75 | } | 75 | } |
diff --git a/arch/powerpc/platforms/44x/sam440ep.c b/arch/powerpc/platforms/44x/sam440ep.c index 47f10e647735..a78e8eb6da41 100644 --- a/arch/powerpc/platforms/44x/sam440ep.c +++ b/arch/powerpc/platforms/44x/sam440ep.c | |||
@@ -51,7 +51,7 @@ static int __init sam440ep_probe(void) | |||
51 | if (!of_flat_dt_is_compatible(root, "acube,sam440ep")) | 51 | if (!of_flat_dt_is_compatible(root, "acube,sam440ep")) |
52 | return 0; | 52 | return 0; |
53 | 53 | ||
54 | ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; | 54 | ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); |
55 | 55 | ||
56 | return 1; | 56 | return 1; |
57 | } | 57 | } |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c index b49a18527661..c3f2c21024e3 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c | |||
@@ -375,7 +375,7 @@ mpc52xx_add_bridge(struct device_node *node) | |||
375 | 375 | ||
376 | pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name); | 376 | pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name); |
377 | 377 | ||
378 | ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS; | 378 | ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); |
379 | 379 | ||
380 | if (of_address_to_resource(node, 0, &rsrc) != 0) { | 380 | if (of_address_to_resource(node, 0, &rsrc) != 0) { |
381 | printk(KERN_ERR "Can't get %s resources\n", node->full_name); | 381 | 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 1b75902fad64..9761a59f175f 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 | ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS; | 56 | ppc_pci_add_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/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 5a72ee5767ed..f6b0c519d5a2 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -199,7 +199,7 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d | |||
199 | printk ("RTAS supporting Pegasos OF not found, please upgrade" | 199 | printk ("RTAS supporting Pegasos OF not found, please upgrade" |
200 | " your firmware\n"); | 200 | " your firmware\n"); |
201 | } | 201 | } |
202 | ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS; | 202 | ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); |
203 | /* keep the reference to the root node */ | 203 | /* keep the reference to the root node */ |
204 | } | 204 | } |
205 | 205 | ||
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index bcf50d7056e9..54b7b76ed4f0 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -729,7 +729,7 @@ static void __init setup_bandit(struct pci_controller *hose, | |||
729 | static int __init setup_uninorth(struct pci_controller *hose, | 729 | static int __init setup_uninorth(struct pci_controller *hose, |
730 | struct resource *addr) | 730 | struct resource *addr) |
731 | { | 731 | { |
732 | ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS; | 732 | ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); |
733 | has_uninorth = 1; | 733 | has_uninorth = 1; |
734 | hose->ops = ¯isc_pci_ops; | 734 | hose->ops = ¯isc_pci_ops; |
735 | hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000); | 735 | hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000); |
@@ -996,7 +996,7 @@ void __init pmac_pci_init(void) | |||
996 | struct device_node *np, *root; | 996 | struct device_node *np, *root; |
997 | struct device_node *ht = NULL; | 997 | struct device_node *ht = NULL; |
998 | 998 | ||
999 | ppc_pci_flags = PPC_PCI_CAN_SKIP_ISA_ALIGN; | 999 | ppc_pci_set_flags(PPC_PCI_CAN_SKIP_ISA_ALIGN); |
1000 | 1000 | ||
1001 | root = of_find_node_by_path("/"); | 1001 | root = of_find_node_by_path("/"); |
1002 | if (root == NULL) { | 1002 | if (root == NULL) { |
@@ -1055,7 +1055,7 @@ void __init pmac_pci_init(void) | |||
1055 | * some offset between bus number and domains for now when we | 1055 | * some offset between bus number and domains for now when we |
1056 | * assign all busses should help for now | 1056 | * assign all busses should help for now |
1057 | */ | 1057 | */ |
1058 | if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS) | 1058 | if (ppc_pci_has_flag(PPC_PCI_REASSIGN_ALL_BUS)) |
1059 | pcibios_assign_bus_offset = 0x10; | 1059 | pcibios_assign_bus_offset = 0x10; |
1060 | #endif | 1060 | #endif |
1061 | } | 1061 | } |