diff options
Diffstat (limited to 'arch/powerpc/platforms/86xx')
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_ppc9a.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_sbc310.c | 13 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_sbc610.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 21 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 42 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/sbc8641d.c | 14 |
6 files changed, 28 insertions, 86 deletions
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c index 563aafa8629..bf5338754c5 100644 --- a/arch/powerpc/platforms/86xx/gef_ppc9a.c +++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c | |||
@@ -73,13 +73,6 @@ static void __init gef_ppc9a_init_irq(void) | |||
73 | static void __init gef_ppc9a_setup_arch(void) | 73 | static void __init gef_ppc9a_setup_arch(void) |
74 | { | 74 | { |
75 | struct device_node *regs; | 75 | struct device_node *regs; |
76 | #ifdef CONFIG_PCI | ||
77 | struct device_node *np; | ||
78 | |||
79 | for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { | ||
80 | fsl_add_bridge(np, 1); | ||
81 | } | ||
82 | #endif | ||
83 | 76 | ||
84 | printk(KERN_INFO "GE Intelligent Platforms PPC9A 6U VME SBC\n"); | 77 | printk(KERN_INFO "GE Intelligent Platforms PPC9A 6U VME SBC\n"); |
85 | 78 | ||
@@ -87,6 +80,8 @@ static void __init gef_ppc9a_setup_arch(void) | |||
87 | mpc86xx_smp_init(); | 80 | mpc86xx_smp_init(); |
88 | #endif | 81 | #endif |
89 | 82 | ||
83 | fsl_pci_assign_primary(); | ||
84 | |||
90 | /* Remap basic board registers */ | 85 | /* Remap basic board registers */ |
91 | regs = of_find_compatible_node(NULL, NULL, "gef,ppc9a-fpga-regs"); | 86 | regs = of_find_compatible_node(NULL, NULL, "gef,ppc9a-fpga-regs"); |
92 | if (regs) { | 87 | if (regs) { |
@@ -221,6 +216,7 @@ static long __init mpc86xx_time_init(void) | |||
221 | static __initdata struct of_device_id of_bus_ids[] = { | 216 | static __initdata struct of_device_id of_bus_ids[] = { |
222 | { .compatible = "simple-bus", }, | 217 | { .compatible = "simple-bus", }, |
223 | { .compatible = "gianfar", }, | 218 | { .compatible = "gianfar", }, |
219 | { .compatible = "fsl,mpc8641-pcie", }, | ||
224 | {}, | 220 | {}, |
225 | }; | 221 | }; |
226 | 222 | ||
@@ -231,7 +227,7 @@ static int __init declare_of_platform_devices(void) | |||
231 | 227 | ||
232 | return 0; | 228 | return 0; |
233 | } | 229 | } |
234 | machine_device_initcall(gef_ppc9a, declare_of_platform_devices); | 230 | machine_arch_initcall(gef_ppc9a, declare_of_platform_devices); |
235 | 231 | ||
236 | define_machine(gef_ppc9a) { | 232 | define_machine(gef_ppc9a) { |
237 | .name = "GE PPC9A", | 233 | .name = "GE PPC9A", |
diff --git a/arch/powerpc/platforms/86xx/gef_sbc310.c b/arch/powerpc/platforms/86xx/gef_sbc310.c index cc6a91ae088..0b7851330a0 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc310.c +++ b/arch/powerpc/platforms/86xx/gef_sbc310.c | |||
@@ -73,20 +73,14 @@ static void __init gef_sbc310_init_irq(void) | |||
73 | static void __init gef_sbc310_setup_arch(void) | 73 | static void __init gef_sbc310_setup_arch(void) |
74 | { | 74 | { |
75 | struct device_node *regs; | 75 | struct device_node *regs; |
76 | #ifdef CONFIG_PCI | ||
77 | struct device_node *np; | ||
78 | |||
79 | for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { | ||
80 | fsl_add_bridge(np, 1); | ||
81 | } | ||
82 | #endif | ||
83 | |||
84 | printk(KERN_INFO "GE Intelligent Platforms SBC310 6U VPX SBC\n"); | 76 | printk(KERN_INFO "GE Intelligent Platforms SBC310 6U VPX SBC\n"); |
85 | 77 | ||
86 | #ifdef CONFIG_SMP | 78 | #ifdef CONFIG_SMP |
87 | mpc86xx_smp_init(); | 79 | mpc86xx_smp_init(); |
88 | #endif | 80 | #endif |
89 | 81 | ||
82 | fsl_pci_assign_primary(); | ||
83 | |||
90 | /* Remap basic board registers */ | 84 | /* Remap basic board registers */ |
91 | regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs"); | 85 | regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs"); |
92 | if (regs) { | 86 | if (regs) { |
@@ -209,6 +203,7 @@ static long __init mpc86xx_time_init(void) | |||
209 | static __initdata struct of_device_id of_bus_ids[] = { | 203 | static __initdata struct of_device_id of_bus_ids[] = { |
210 | { .compatible = "simple-bus", }, | 204 | { .compatible = "simple-bus", }, |
211 | { .compatible = "gianfar", }, | 205 | { .compatible = "gianfar", }, |
206 | { .compatible = "fsl,mpc8641-pcie", }, | ||
212 | {}, | 207 | {}, |
213 | }; | 208 | }; |
214 | 209 | ||
@@ -219,7 +214,7 @@ static int __init declare_of_platform_devices(void) | |||
219 | 214 | ||
220 | return 0; | 215 | return 0; |
221 | } | 216 | } |
222 | machine_device_initcall(gef_sbc310, declare_of_platform_devices); | 217 | machine_arch_initcall(gef_sbc310, declare_of_platform_devices); |
223 | 218 | ||
224 | define_machine(gef_sbc310) { | 219 | define_machine(gef_sbc310) { |
225 | .name = "GE SBC310", | 220 | .name = "GE SBC310", |
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c index aead6b337f4..b9eb174897b 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc610.c +++ b/arch/powerpc/platforms/86xx/gef_sbc610.c | |||
@@ -73,13 +73,6 @@ static void __init gef_sbc610_init_irq(void) | |||
73 | static void __init gef_sbc610_setup_arch(void) | 73 | static void __init gef_sbc610_setup_arch(void) |
74 | { | 74 | { |
75 | struct device_node *regs; | 75 | struct device_node *regs; |
76 | #ifdef CONFIG_PCI | ||
77 | struct device_node *np; | ||
78 | |||
79 | for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { | ||
80 | fsl_add_bridge(np, 1); | ||
81 | } | ||
82 | #endif | ||
83 | 76 | ||
84 | printk(KERN_INFO "GE Intelligent Platforms SBC610 6U VPX SBC\n"); | 77 | printk(KERN_INFO "GE Intelligent Platforms SBC610 6U VPX SBC\n"); |
85 | 78 | ||
@@ -87,6 +80,8 @@ static void __init gef_sbc610_setup_arch(void) | |||
87 | mpc86xx_smp_init(); | 80 | mpc86xx_smp_init(); |
88 | #endif | 81 | #endif |
89 | 82 | ||
83 | fsl_pci_assign_primary(); | ||
84 | |||
90 | /* Remap basic board registers */ | 85 | /* Remap basic board registers */ |
91 | regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs"); | 86 | regs = of_find_compatible_node(NULL, NULL, "gef,fpga-regs"); |
92 | if (regs) { | 87 | if (regs) { |
@@ -198,6 +193,7 @@ static long __init mpc86xx_time_init(void) | |||
198 | static __initdata struct of_device_id of_bus_ids[] = { | 193 | static __initdata struct of_device_id of_bus_ids[] = { |
199 | { .compatible = "simple-bus", }, | 194 | { .compatible = "simple-bus", }, |
200 | { .compatible = "gianfar", }, | 195 | { .compatible = "gianfar", }, |
196 | { .compatible = "fsl,mpc8641-pcie", }, | ||
201 | {}, | 197 | {}, |
202 | }; | 198 | }; |
203 | 199 | ||
@@ -208,7 +204,7 @@ static int __init declare_of_platform_devices(void) | |||
208 | 204 | ||
209 | return 0; | 205 | return 0; |
210 | } | 206 | } |
211 | machine_device_initcall(gef_sbc610, declare_of_platform_devices); | 207 | machine_arch_initcall(gef_sbc610, declare_of_platform_devices); |
212 | 208 | ||
213 | define_machine(gef_sbc610) { | 209 | define_machine(gef_sbc610) { |
214 | .name = "GE SBC610", | 210 | .name = "GE SBC610", |
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c index 62cd3c555bf..a817398a56d 100644 --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c | |||
@@ -91,6 +91,9 @@ static struct of_device_id __initdata mpc8610_ids[] = { | |||
91 | { .compatible = "simple-bus", }, | 91 | { .compatible = "simple-bus", }, |
92 | /* So that the DMA channel nodes can be probed individually: */ | 92 | /* So that the DMA channel nodes can be probed individually: */ |
93 | { .compatible = "fsl,eloplus-dma", }, | 93 | { .compatible = "fsl,eloplus-dma", }, |
94 | /* PCI controllers */ | ||
95 | { .compatible = "fsl,mpc8610-pci", }, | ||
96 | { .compatible = "fsl,mpc8641-pcie", }, | ||
94 | {} | 97 | {} |
95 | }; | 98 | }; |
96 | 99 | ||
@@ -107,7 +110,7 @@ static int __init mpc8610_declare_of_platform_devices(void) | |||
107 | 110 | ||
108 | return 0; | 111 | return 0; |
109 | } | 112 | } |
110 | machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); | 113 | machine_arch_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); |
111 | 114 | ||
112 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | 115 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) |
113 | 116 | ||
@@ -278,25 +281,13 @@ mpc8610hpcd_valid_monitor_port(enum fsl_diu_monitor_port port) | |||
278 | static void __init mpc86xx_hpcd_setup_arch(void) | 281 | static void __init mpc86xx_hpcd_setup_arch(void) |
279 | { | 282 | { |
280 | struct resource r; | 283 | struct resource r; |
281 | struct device_node *np; | ||
282 | unsigned char *pixis; | 284 | unsigned char *pixis; |
283 | 285 | ||
284 | if (ppc_md.progress) | 286 | if (ppc_md.progress) |
285 | ppc_md.progress("mpc86xx_hpcd_setup_arch()", 0); | 287 | ppc_md.progress("mpc86xx_hpcd_setup_arch()", 0); |
286 | 288 | ||
287 | #ifdef CONFIG_PCI | 289 | fsl_pci_assign_primary(); |
288 | for_each_node_by_type(np, "pci") { | 290 | |
289 | if (of_device_is_compatible(np, "fsl,mpc8610-pci") | ||
290 | || of_device_is_compatible(np, "fsl,mpc8641-pcie")) { | ||
291 | struct resource rsrc; | ||
292 | of_address_to_resource(np, 0, &rsrc); | ||
293 | if ((rsrc.start & 0xfffff) == 0xa000) | ||
294 | fsl_add_bridge(np, 1); | ||
295 | else | ||
296 | fsl_add_bridge(np, 0); | ||
297 | } | ||
298 | } | ||
299 | #endif | ||
300 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | 291 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) |
301 | diu_ops.get_pixel_format = mpc8610hpcd_get_pixel_format; | 292 | diu_ops.get_pixel_format = mpc8610hpcd_get_pixel_format; |
302 | diu_ops.set_gamma_table = mpc8610hpcd_set_gamma_table; | 293 | diu_ops.set_gamma_table = mpc8610hpcd_set_gamma_table; |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 817245bc021..e8bf3fae560 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/memblock.h> | ||
23 | 22 | ||
24 | #include <asm/time.h> | 23 | #include <asm/time.h> |
25 | #include <asm/machdep.h> | 24 | #include <asm/machdep.h> |
@@ -51,15 +50,8 @@ extern int uli_exclude_device(struct pci_controller *hose, | |||
51 | static int mpc86xx_exclude_device(struct pci_controller *hose, | 50 | static int mpc86xx_exclude_device(struct pci_controller *hose, |
52 | u_char bus, u_char devfn) | 51 | u_char bus, u_char devfn) |
53 | { | 52 | { |
54 | struct device_node* node; | 53 | if (hose->dn == fsl_pci_primary) |
55 | struct resource rsrc; | ||
56 | |||
57 | node = hose->dn; | ||
58 | of_address_to_resource(node, 0, &rsrc); | ||
59 | |||
60 | if ((rsrc.start & 0xfffff) == 0x8000) { | ||
61 | return uli_exclude_device(hose, bus, devfn); | 54 | return uli_exclude_device(hose, bus, devfn); |
62 | } | ||
63 | 55 | ||
64 | return PCIBIOS_SUCCESSFUL; | 56 | return PCIBIOS_SUCCESSFUL; |
65 | } | 57 | } |
@@ -69,30 +61,11 @@ static int mpc86xx_exclude_device(struct pci_controller *hose, | |||
69 | static void __init | 61 | static void __init |
70 | mpc86xx_hpcn_setup_arch(void) | 62 | mpc86xx_hpcn_setup_arch(void) |
71 | { | 63 | { |
72 | #ifdef CONFIG_PCI | ||
73 | struct device_node *np; | ||
74 | struct pci_controller *hose; | ||
75 | #endif | ||
76 | dma_addr_t max = 0xffffffff; | ||
77 | |||
78 | if (ppc_md.progress) | 64 | if (ppc_md.progress) |
79 | ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); | 65 | ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); |
80 | 66 | ||
81 | #ifdef CONFIG_PCI | 67 | #ifdef CONFIG_PCI |
82 | for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { | ||
83 | struct resource rsrc; | ||
84 | of_address_to_resource(np, 0, &rsrc); | ||
85 | if ((rsrc.start & 0xfffff) == 0x8000) | ||
86 | fsl_add_bridge(np, 1); | ||
87 | else | ||
88 | fsl_add_bridge(np, 0); | ||
89 | hose = pci_find_hose_for_OF_device(np); | ||
90 | max = min(max, hose->dma_window_base_cur + | ||
91 | hose->dma_window_size); | ||
92 | } | ||
93 | |||
94 | ppc_md.pci_exclude_device = mpc86xx_exclude_device; | 68 | ppc_md.pci_exclude_device = mpc86xx_exclude_device; |
95 | |||
96 | #endif | 69 | #endif |
97 | 70 | ||
98 | printk("MPC86xx HPCN board from Freescale Semiconductor\n"); | 71 | printk("MPC86xx HPCN board from Freescale Semiconductor\n"); |
@@ -101,13 +74,9 @@ mpc86xx_hpcn_setup_arch(void) | |||
101 | mpc86xx_smp_init(); | 74 | mpc86xx_smp_init(); |
102 | #endif | 75 | #endif |
103 | 76 | ||
104 | #ifdef CONFIG_SWIOTLB | 77 | fsl_pci_assign_primary(); |
105 | if ((memblock_end_of_DRAM() - 1) > max) { | 78 | |
106 | ppc_swiotlb_enable = 1; | 79 | swiotlb_detect_4g(); |
107 | set_pci_dma_ops(&swiotlb_dma_ops); | ||
108 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | ||
109 | } | ||
110 | #endif | ||
111 | } | 80 | } |
112 | 81 | ||
113 | 82 | ||
@@ -162,6 +131,7 @@ static __initdata struct of_device_id of_bus_ids[] = { | |||
162 | { .compatible = "simple-bus", }, | 131 | { .compatible = "simple-bus", }, |
163 | { .compatible = "fsl,srio", }, | 132 | { .compatible = "fsl,srio", }, |
164 | { .compatible = "gianfar", }, | 133 | { .compatible = "gianfar", }, |
134 | { .compatible = "fsl,mpc8641-pcie", }, | ||
165 | {}, | 135 | {}, |
166 | }; | 136 | }; |
167 | 137 | ||
@@ -171,7 +141,7 @@ static int __init declare_of_platform_devices(void) | |||
171 | 141 | ||
172 | return 0; | 142 | return 0; |
173 | } | 143 | } |
174 | machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices); | 144 | machine_arch_initcall(mpc86xx_hpcn, declare_of_platform_devices); |
175 | machine_arch_initcall(mpc86xx_hpcn, swiotlb_setup_bus_notifier); | 145 | machine_arch_initcall(mpc86xx_hpcn, swiotlb_setup_bus_notifier); |
176 | 146 | ||
177 | define_machine(mpc86xx_hpcn) { | 147 | define_machine(mpc86xx_hpcn) { |
diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c index e7007d0d949..b47a8fd0f3d 100644 --- a/arch/powerpc/platforms/86xx/sbc8641d.c +++ b/arch/powerpc/platforms/86xx/sbc8641d.c | |||
@@ -38,23 +38,16 @@ | |||
38 | static void __init | 38 | static void __init |
39 | sbc8641_setup_arch(void) | 39 | sbc8641_setup_arch(void) |
40 | { | 40 | { |
41 | #ifdef CONFIG_PCI | ||
42 | struct device_node *np; | ||
43 | #endif | ||
44 | |||
45 | if (ppc_md.progress) | 41 | if (ppc_md.progress) |
46 | ppc_md.progress("sbc8641_setup_arch()", 0); | 42 | ppc_md.progress("sbc8641_setup_arch()", 0); |
47 | 43 | ||
48 | #ifdef CONFIG_PCI | ||
49 | for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") | ||
50 | fsl_add_bridge(np, 0); | ||
51 | #endif | ||
52 | |||
53 | printk("SBC8641 board from Wind River\n"); | 44 | printk("SBC8641 board from Wind River\n"); |
54 | 45 | ||
55 | #ifdef CONFIG_SMP | 46 | #ifdef CONFIG_SMP |
56 | mpc86xx_smp_init(); | 47 | mpc86xx_smp_init(); |
57 | #endif | 48 | #endif |
49 | |||
50 | fsl_pci_assign_primary(); | ||
58 | } | 51 | } |
59 | 52 | ||
60 | 53 | ||
@@ -102,6 +95,7 @@ mpc86xx_time_init(void) | |||
102 | static __initdata struct of_device_id of_bus_ids[] = { | 95 | static __initdata struct of_device_id of_bus_ids[] = { |
103 | { .compatible = "simple-bus", }, | 96 | { .compatible = "simple-bus", }, |
104 | { .compatible = "gianfar", }, | 97 | { .compatible = "gianfar", }, |
98 | { .compatible = "fsl,mpc8641-pcie", }, | ||
105 | {}, | 99 | {}, |
106 | }; | 100 | }; |
107 | 101 | ||
@@ -111,7 +105,7 @@ static int __init declare_of_platform_devices(void) | |||
111 | 105 | ||
112 | return 0; | 106 | return 0; |
113 | } | 107 | } |
114 | machine_device_initcall(sbc8641, declare_of_platform_devices); | 108 | machine_arch_initcall(sbc8641, declare_of_platform_devices); |
115 | 109 | ||
116 | define_machine(sbc8641) { | 110 | define_machine(sbc8641) { |
117 | .name = "SBC8641D", | 111 | .name = "SBC8641D", |