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>
39 #define MPC85xx_L2CTL_L2E 0x80000000
40 #define MPC85xx_L2CTL_L2I 0x40000000
41 #define MPC85xx_L2CTL_L2SIZ_MASK 0x30000000
51 static void xes_mpc85xx_configure_l2(
void __iomem *l2_base)
55 asm volatile(
"msync; isync");
73 asm volatile(
"msync; isync");
75 asm volatile(
"msync; isync");
78 static void xes_mpc85xx_fixups(
void)
87 for_each_node_by_name(np,
"l2-cache-controller") {
93 "fsl,mpc8548-l2-cache-controller") &&
95 "fsl,mpc8540-l2-cache-controller") &&
97 "fsl,mpc8560-l2-cache-controller"))
103 "resource for device tree node '%s'",
110 xes_mpc85xx_configure_l2(l2_base);
117 static void __init xes_mpc85xx_setup_arch(
void)
120 const char *
model =
"Unknown";
131 xes_mpc85xx_fixups();
135 fsl_pci_assign_primary();
145 static int __init xes_mpc8572_probe(
void)
147 unsigned long root = of_get_flat_dt_root();
149 return of_flat_dt_is_compatible(root,
"xes,MPC8572");
152 static int __init xes_mpc8548_probe(
void)
154 unsigned long root = of_get_flat_dt_root();
156 return of_flat_dt_is_compatible(root,
"xes,MPC8548");
159 static int __init xes_mpc8540_probe(
void)
161 unsigned long root = of_get_flat_dt_root();
163 return of_flat_dt_is_compatible(root,
"xes,MPC8540");
167 .name =
"X-ES MPC8572",
168 .probe = xes_mpc8572_probe,
169 .setup_arch = xes_mpc85xx_setup_arch,
172 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
175 .restart = fsl_rstcr_restart,
181 .name =
"X-ES MPC8548",
182 .probe = xes_mpc8548_probe,
183 .setup_arch = xes_mpc85xx_setup_arch,
186 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
189 .restart = fsl_rstcr_restart,
195 .name =
"X-ES MPC8540",
196 .probe = xes_mpc8540_probe,
197 .setup_arch = xes_mpc85xx_setup_arch,
200 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
203 .restart = fsl_rstcr_restart,