Lines Matching full:mdio
3 * CPSW MDIO generic driver for TI AMxx/K2x/EMAC devices.
64 static int cpsw_mdio_wait_for_user_access(struct cpsw_mdio *mdio) in cpsw_mdio_wait_for_user_access() argument
66 return wait_for_bit_le32(&mdio->regs->user[0].access, in cpsw_mdio_wait_for_user_access()
74 struct cpsw_mdio *mdio = bus->priv; in cpsw_mdio_read() local
81 ret = cpsw_mdio_wait_for_user_access(mdio); in cpsw_mdio_read()
87 writel(reg, &mdio->regs->user[0].access); in cpsw_mdio_read()
88 ret = cpsw_mdio_wait_for_user_access(mdio); in cpsw_mdio_read()
92 reg = readl(&mdio->regs->user[0].access); in cpsw_mdio_read()
100 struct cpsw_mdio *mdio = bus->priv; in cpsw_mdio_write() local
107 ret = cpsw_mdio_wait_for_user_access(mdio); in cpsw_mdio_write()
114 writel(reg, &mdio->regs->user[0].access); in cpsw_mdio_write()
116 return cpsw_mdio_wait_for_user_access(mdio); in cpsw_mdio_write()
121 struct cpsw_mdio *mdio = bus->priv; in cpsw_mdio_get_alive() local
124 val = readl(&mdio->regs->control); in cpsw_mdio_get_alive()
192 struct cpsw_mdio *mdio = bus->priv; in cpsw_mdio_free() local
195 /* disable mdio */ in cpsw_mdio_free()
196 reg = readl(&mdio->regs->control); in cpsw_mdio_free()
198 writel(reg, &mdio->regs->control); in cpsw_mdio_free()
202 free(mdio); in cpsw_mdio_free()