12 #include <linux/stddef.h>
13 #include <linux/kernel.h>
14 #include <linux/pci.h>
15 #include <linux/kdev_t.h>
22 #include <asm/machdep.h>
23 #include <asm/pci-bridge.h>
41 #define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
43 #define DBG(fmt, args...)
50 unsigned long root = of_get_flat_dt_root();
52 #ifdef CONFIG_QUICC_ENGINE
56 if (of_flat_dt_is_compatible(root,
"fsl,MPC85XXRDB-CAMP")) {
71 #ifdef CONFIG_QUICC_ENGINE
75 qe_ic_cascade_high_mpic);
79 pr_err(
"%s: Could not find qe-ic node\n", __func__);
87 static void __init mpc85xx_rdb_setup_arch(
void)
89 #ifdef CONFIG_QUICC_ENGINE
94 ppc_md.progress(
"mpc85xx_rdb_setup_arch()", 0);
98 fsl_pci_assign_primary();
100 #ifdef CONFIG_QUICC_ENGINE
103 pr_err(
"%s: Could not find Quicc Engine node\n", __func__);
117 for_each_node_by_name(ucc,
"ucc")
121 #if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE)
122 if (machine_is(p1025_rdb)) {
124 struct ccsr_guts
__iomem *guts;
131 pr_err(
"mpc85xx-rdb: could not map global utilities register\n");
140 setbits32(&guts->pmuxcr, MPC85xx_PMUXCR_QE(0) |
141 MPC85xx_PMUXCR_QE(3) |
142 MPC85xx_PMUXCR_QE(9) |
143 MPC85xx_PMUXCR_QE(12));
171 static int __init p2020_rdb_probe(
void)
173 unsigned long root = of_get_flat_dt_root();
175 if (of_flat_dt_is_compatible(root,
"fsl,P2020RDB"))
180 static int __init p1020_rdb_probe(
void)
182 unsigned long root = of_get_flat_dt_root();
184 if (of_flat_dt_is_compatible(root,
"fsl,P1020RDB"))
189 static int __init p1020_rdb_pc_probe(
void)
191 unsigned long root = of_get_flat_dt_root();
193 return of_flat_dt_is_compatible(root,
"fsl,P1020RDB-PC");
196 static int __init p1021_rdb_pc_probe(
void)
198 unsigned long root = of_get_flat_dt_root();
200 if (of_flat_dt_is_compatible(root,
"fsl,P1021RDB-PC"))
205 static int __init p2020_rdb_pc_probe(
void)
207 unsigned long root = of_get_flat_dt_root();
209 if (of_flat_dt_is_compatible(root,
"fsl,P2020RDB-PC"))
214 static int __init p1025_rdb_probe(
void)
216 unsigned long root = of_get_flat_dt_root();
218 return of_flat_dt_is_compatible(root,
"fsl,P1025RDB");
221 static int __init p1020_mbg_pc_probe(
void)
223 unsigned long root = of_get_flat_dt_root();
225 return of_flat_dt_is_compatible(root,
"fsl,P1020MBG-PC");
228 static int __init p1020_utm_pc_probe(
void)
230 unsigned long root = of_get_flat_dt_root();
232 return of_flat_dt_is_compatible(root,
"fsl,P1020UTM-PC");
235 static int __init p1024_rdb_probe(
void)
237 unsigned long root = of_get_flat_dt_root();
239 return of_flat_dt_is_compatible(root,
"fsl,P1024RDB");
244 .probe = p2020_rdb_probe,
245 .setup_arch = mpc85xx_rdb_setup_arch,
248 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
251 .restart = fsl_rstcr_restart,
258 .probe = p1020_rdb_probe,
259 .setup_arch = mpc85xx_rdb_setup_arch,
262 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
265 .restart = fsl_rstcr_restart,
271 .name =
"P1021 RDB-PC",
272 .probe = p1021_rdb_pc_probe,
273 .setup_arch = mpc85xx_rdb_setup_arch,
276 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
279 .restart = fsl_rstcr_restart,
285 .name =
"P2020RDB-PC",
286 .probe = p2020_rdb_pc_probe,
287 .setup_arch = mpc85xx_rdb_setup_arch,
290 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
293 .restart = fsl_rstcr_restart,
300 .probe = p1025_rdb_probe,
301 .setup_arch = mpc85xx_rdb_setup_arch,
304 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
307 .restart = fsl_rstcr_restart,
313 .name =
"P1020 MBG-PC",
314 .probe = p1020_mbg_pc_probe,
315 .setup_arch = mpc85xx_rdb_setup_arch,
318 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
321 .restart = fsl_rstcr_restart,
327 .name =
"P1020 UTM-PC",
328 .probe = p1020_utm_pc_probe,
329 .setup_arch = mpc85xx_rdb_setup_arch,
332 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
335 .restart = fsl_rstcr_restart,
341 .name =
"P1020RDB-PC",
342 .probe = p1020_rdb_pc_probe,
343 .setup_arch = mpc85xx_rdb_setup_arch,
346 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
349 .restart = fsl_rstcr_restart,
356 .probe = p1024_rdb_probe,
357 .setup_arch = mpc85xx_rdb_setup_arch,
360 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
363 .restart = fsl_rstcr_restart,