15 #include <linux/stddef.h>
16 #include <linux/kernel.h>
17 #include <linux/pci.h>
18 #include <linux/kdev_t.h>
25 #include <asm/machdep.h>
26 #include <asm/pci-bridge.h>
31 #include <asm/i8259.h>
32 #include <asm/swiotlb.h>
43 #define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
45 #define DBG(fmt, args...)
48 #ifdef CONFIG_PPC_I8259
49 static void mpc85xx_8259_cascade(
unsigned int irq,
struct irq_desc *
desc)
54 if (cascade_irq !=
NO_IRQ) {
64 #ifdef CONFIG_PPC_I8259
69 unsigned long root = of_get_flat_dt_root();
71 if (of_flat_dt_is_compatible(root,
"fsl,MPC8572DS-CAMP")) {
87 #ifdef CONFIG_PPC_I8259
89 for_each_node_by_type(np,
"interrupt-controller")
95 if (cascade_node ==
NULL) {
101 if (cascade_irq ==
NO_IRQ) {
106 DBG(
"mpc85xxds: cascade mapped to irq %d\n", cascade_irq);
109 of_node_put(cascade_node);
111 irq_set_chained_handler(cascade_irq, mpc85xx_8259_cascade);
124 if (hose->dn == pci_with_uli)
131 static void __init mpc85xx_ds_uli_init(
void)
143 if (pci_with_uli == fsl_pci_primary) {
144 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
154 static void __init mpc85xx_ds_setup_arch(
void)
157 ppc_md.progress(
"mpc85xx_ds_setup_arch()", 0);
160 fsl_pci_assign_primary();
161 mpc85xx_ds_uli_init();
164 printk(
"MPC85xx DS board from Freescale Semiconductor\n");
170 static int __init mpc8544_ds_probe(
void)
172 unsigned long root = of_get_flat_dt_root();
174 return !!of_flat_dt_is_compatible(root,
"MPC8544DS");
188 static int __init mpc8572_ds_probe(
void)
190 unsigned long root = of_get_flat_dt_root();
192 return !!of_flat_dt_is_compatible(root,
"fsl,MPC8572DS");
198 static int __init p2020_ds_probe(
void)
200 unsigned long root = of_get_flat_dt_root();
202 return !!of_flat_dt_is_compatible(root,
"fsl,P2020DS");
206 .name =
"MPC8544 DS",
207 .probe = mpc8544_ds_probe,
208 .setup_arch = mpc85xx_ds_setup_arch,
211 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
214 .restart = fsl_rstcr_restart,
220 .name =
"MPC8572 DS",
221 .probe = mpc8572_ds_probe,
222 .setup_arch = mpc85xx_ds_setup_arch,
225 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
228 .restart = fsl_rstcr_restart,
235 .probe = p2020_ds_probe,
236 .setup_arch = mpc85xx_ds_setup_arch,
239 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
242 .restart = fsl_rstcr_restart,