19 #include <linux/stddef.h>
20 #include <linux/kernel.h>
21 #include <linux/compiler.h>
23 #include <linux/errno.h>
24 #include <linux/reboot.h>
25 #include <linux/pci.h>
26 #include <linux/kdev_t.h>
39 #include <asm/machdep.h>
54 #define DBG(fmt...) udbg_printf(fmt)
64 static void __init mpc836x_mds_setup_arch(
void)
70 ppc_md.progress(
"mpc836x_mds_setup_arch()", 0);
84 #ifdef CONFIG_QUICC_ENGINE
110 #define BCSR9_GETHRST 0x20
111 clrbits8(&bcsr_regs[9], BCSR9_GETHRST);
113 setbits8(&bcsr_regs[9], BCSR9_GETHRST);
116 svid =
mfspr(SPRN_SVR);
117 if (svid == 0x80480021) {
126 setbits32(immap, 0x0c003000);
132 clrsetbits_be32(immap + 4, 0xff0, 0xaa0);
146 static int __init mpc836x_usb_cfg(
void)
168 #define BCSR8_TSEC1M_MASK (0x3 << 6)
169 #define BCSR8_TSEC1M_RGMII (0x0 << 6)
170 #define BCSR8_TSEC2M_MASK (0x3 << 4)
171 #define BCSR8_TSEC2M_RGMII (0x0 << 4)
176 clrsetbits_8(&bcsr[8], BCSR8_TSEC1M_MASK | BCSR8_TSEC2M_MASK,
177 BCSR8_TSEC1M_RGMII | BCSR8_TSEC2M_RGMII);
179 #define BCSR13_USBMASK 0x0f
180 #define BCSR13_nUSBEN 0x08
181 #define BCSR13_USBSPEED 0x04
182 #define BCSR13_USBMODE 0x02
183 #define BCSR13_nUSBVCC 0x01
185 clrsetbits_8(&bcsr[13], BCSR13_USBMASK, BCSR13_USBSPEED);
188 if (mode && !
strcmp(mode,
"peripheral")) {
189 setbits8(&bcsr[13], BCSR13_nUSBVCC);
192 setbits8(&bcsr[13], BCSR13_USBMODE);
212 static int __init mpc836x_mds_probe(
void)
214 unsigned long root = of_get_flat_dt_root();
216 return of_flat_dt_is_compatible(root,
"MPC836xMDS");
220 .name =
"MPC836x MDS",
221 .probe = mpc836x_mds_probe,
222 .setup_arch = mpc836x_mds_setup_arch,