Lines Matching full:fec
41 #include "fec.h"
43 /* Make MII read/write commands for the FEC.
53 struct fec_info* fec = bus->priv; in fs_enet_fec_mii_read() local
54 struct fec __iomem *fecp = fec->fecp; in fs_enet_fec_mii_read()
76 struct fec_info* fec = bus->priv; in fs_enet_fec_mii_write() local
77 struct fec __iomem *fecp = fec->fecp; in fs_enet_fec_mii_write()
101 struct fec_info *fec; in fs_enet_mdio_probe() local
111 fec = kzalloc(sizeof(struct fec_info), GFP_KERNEL); in fs_enet_mdio_probe()
112 if (!fec) in fs_enet_mdio_probe()
115 new_bus->priv = fec; in fs_enet_mdio_probe()
116 new_bus->name = "FEC MII Bus"; in fs_enet_mdio_probe()
126 fec->fecp = ioremap(res.start, resource_size(&res)); in fs_enet_mdio_probe()
127 if (!fec->fecp) { in fs_enet_mdio_probe()
154 fec->mii_speed = speed << 1; in fs_enet_mdio_probe()
156 setbits32(&fec->fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); in fs_enet_mdio_probe()
157 setbits32(&fec->fecp->fec_ecntrl, FEC_ECNTRL_PINMUX | in fs_enet_mdio_probe()
159 out_be32(&fec->fecp->fec_ievent, FEC_ENET_MII); in fs_enet_mdio_probe()
160 clrsetbits_be32(&fec->fecp->fec_mii_speed, 0x7E, fec->mii_speed); in fs_enet_mdio_probe()
174 iounmap(fec->fecp); in fs_enet_mdio_probe()
177 kfree(fec); in fs_enet_mdio_probe()
187 struct fec_info *fec = bus->priv; in fs_enet_mdio_remove() local
190 iounmap(fec->fecp); in fs_enet_mdio_remove()
191 kfree(fec); in fs_enet_mdio_remove()
197 .compatible = "fsl,pq1-fec-mdio",
201 .compatible = "fsl,mpc5121-fec-mdio",
211 .name = "fsl-fec-mdio",