17 #include <linux/module.h>
19 #include <linux/string.h>
21 #include <linux/device.h>
27 #include <linux/mii.h>
30 #include <asm/delay.h>
32 #include <asm/machdep.h>
34 #include <asm/processor.h>
47 #ifdef CONFIG_PCMCIA_M8XX
48 static void pcmcia_hw_setup(
int slot,
int enable)
51 clrbits32(&bcsr[1], BCSR1_PCCEN);
53 setbits32(&bcsr[1], BCSR1_PCCEN);
56 static int pcmcia_set_voltage(
int slot,
int vcc,
int vpp)
84 if ((vcc == 33) || (vcc == 50))
93 clrbits32(&bcsr[1], 0x00610000);
96 setbits32(&bcsr[1], reg);
106 static struct cpm_pin mpc885ads_pins[] = {
112 #ifndef CONFIG_MPC8xx_SECOND_ETH_FEC2
142 #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2
165 static void __init init_ioports(
void)
169 for (i = 0; i <
ARRAY_SIZE(mpc885ads_pins); i++) {
180 clrbits32(&
mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
183 static void __init mpc885ads_setup_arch(
void)
200 if (!bcsr || !bcsr5) {
205 clrbits32(&bcsr[1], BCSR1_RS232EN_1);
206 #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2
207 setbits32(&bcsr[1], BCSR1_RS232EN_2);
209 clrbits32(&bcsr[1], BCSR1_RS232EN_2);
212 clrbits32(bcsr5, BCSR5_MII1_EN);
213 setbits32(bcsr5, BCSR5_MII1_RST);
215 clrbits32(bcsr5, BCSR5_MII1_RST);
217 #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2
218 clrbits32(bcsr5, BCSR5_MII2_EN);
219 setbits32(bcsr5, BCSR5_MII2_RST);
221 clrbits32(bcsr5, BCSR5_MII2_RST);
223 setbits32(bcsr5, BCSR5_MII2_EN);
226 #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3
227 clrbits32(&bcsr[4], BCSR4_ETH10_RST);
229 setbits32(&bcsr[4], BCSR4_ETH10_RST);
231 setbits32(&bcsr[1], BCSR1_ETHEN);
247 #ifdef CONFIG_PCMCIA_M8XX
254 static int __init mpc885ads_probe(
void)
256 unsigned long root = of_get_flat_dt_root();
257 return of_flat_dt_is_compatible(root,
"fsl,mpc885ads");
263 { .name =
"localbus", },
267 static int __init declare_of_platform_devices(
void)
270 of_platform_bus_probe(
NULL, of_bus_ids,
NULL);
277 .name =
"Freescale MPC885 ADS",
278 .probe = mpc885ads_probe,
279 .setup_arch = mpc885ads_setup_arch,