Lines Matching refs:p

13 static void cavium_mdiobus_set_mode(struct cavium_mdiobus *p,  in cavium_mdiobus_set_mode()  argument
18 if (m == p->mode) in cavium_mdiobus_set_mode()
21 smi_clk.u64 = oct_mdio_readq(p->register_base + SMI_CLK); in cavium_mdiobus_set_mode()
24 oct_mdio_writeq(smi_clk.u64, p->register_base + SMI_CLK); in cavium_mdiobus_set_mode()
25 p->mode = m; in cavium_mdiobus_set_mode()
28 static int cavium_mdiobus_c45_addr(struct cavium_mdiobus *p, in cavium_mdiobus_c45_addr() argument
35 cavium_mdiobus_set_mode(p, C45); in cavium_mdiobus_c45_addr()
39 oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT); in cavium_mdiobus_c45_addr()
45 oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD); in cavium_mdiobus_c45_addr()
52 smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT); in cavium_mdiobus_c45_addr()
62 struct cavium_mdiobus *p = bus->priv; in cavium_mdiobus_read_c22() local
67 cavium_mdiobus_set_mode(p, C22); in cavium_mdiobus_read_c22()
73 oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD); in cavium_mdiobus_read_c22()
80 smi_rd.u64 = oct_mdio_readq(p->register_base + SMI_RD_DAT); in cavium_mdiobus_read_c22()
93 struct cavium_mdiobus *p = bus->priv; in cavium_mdiobus_read_c45() local
99 r = cavium_mdiobus_c45_addr(p, phy_id, devad, regnum); in cavium_mdiobus_read_c45()
107 oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD); in cavium_mdiobus_read_c45()
114 smi_rd.u64 = oct_mdio_readq(p->register_base + SMI_RD_DAT); in cavium_mdiobus_read_c45()
127 struct cavium_mdiobus *p = bus->priv; in cavium_mdiobus_write_c22() local
132 cavium_mdiobus_set_mode(p, C22); in cavium_mdiobus_write_c22()
136 oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT); in cavium_mdiobus_write_c22()
142 oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD); in cavium_mdiobus_write_c22()
149 smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT); in cavium_mdiobus_write_c22()
162 struct cavium_mdiobus *p = bus->priv; in cavium_mdiobus_write_c45() local
168 r = cavium_mdiobus_c45_addr(p, phy_id, devad, regnum); in cavium_mdiobus_write_c45()
174 oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT); in cavium_mdiobus_write_c45()
180 oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD); in cavium_mdiobus_write_c45()
187 smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT); in cavium_mdiobus_write_c45()