Home
last modified time | relevance | path

Searched refs:devad (Results 1 – 25 of 43) sorted by relevance

12

/linux/drivers/net/ethernet/sfc/falcon/
H A Dmdio_10g.h22 static inline int ef4_mdio_read(struct ef4_nic *efx, int devad, int addr) in ef4_mdio_read() argument
24 return efx->mdio.mdio_read(efx->net_dev, efx->mdio.prtad, devad, addr); in ef4_mdio_read()
28 ef4_mdio_write(struct ef4_nic *efx, int devad, int addr, int value) in ef4_mdio_write() argument
30 efx->mdio.mdio_write(efx->net_dev, efx->mdio.prtad, devad, addr, value); in ef4_mdio_write()
99 ef4_mdio_set_flag(struct ef4_nic *efx, int devad, int addr, in ef4_mdio_set_flag() argument
102 mdio_set_flag(&efx->mdio, efx->mdio.prtad, devad, addr, mask, state); in ef4_mdio_set_flag()
H A Dmdio_10g.c313 int devad = __ffs(efx->mdio.mmds); in ef4_mdio_test_alive() local
318 physid1 = ef4_mdio_read(efx, devad, MDIO_DEVID1); in ef4_mdio_test_alive()
319 physid2 = ef4_mdio_read(efx, devad, MDIO_DEVID2); in ef4_mdio_test_alive()
/linux/drivers/base/regmap/
H A Dregmap-mdio.c48 unsigned int devad; in regmap_mdio_c45_read() local
54 devad = reg >> REGMAP_MDIO_C45_DEVAD_SHIFT; in regmap_mdio_c45_read()
57 ret = mdiodev_c45_read(mdio_dev, devad, reg); in regmap_mdio_c45_read()
69 unsigned int devad; in regmap_mdio_c45_write() local
74 devad = reg >> REGMAP_MDIO_C45_DEVAD_SHIFT; in regmap_mdio_c45_write()
77 return mdiodev_c45_write(mdio_dev, devad, reg, val); in regmap_mdio_c45_write()
/linux/drivers/net/mdio/
H A Dmdio-i2c.c33 static int i2c_mii_read_default_c45(struct mii_bus *bus, int phy_id, int devad, in i2c_mii_read_default_c45() argument
45 if (devad >= 0) { in i2c_mii_read_default_c45()
46 *p++ = 0x20 | devad; in i2c_mii_read_default_c45()
69 int devad, int reg, u16 val) in i2c_mii_write_default_c45() argument
80 if (devad >= 0) { in i2c_mii_write_default_c45()
81 *p++ = devad; in i2c_mii_write_default_c45()
294 static int i2c_mii_read_rollball(struct mii_bus *bus, int phy_id, int devad, in i2c_mii_read_rollball() argument
306 buf[1] = devad; in i2c_mii_read_rollball()
326 static int i2c_mii_write_rollball(struct mii_bus *bus, int phy_id, int devad, in i2c_mii_write_rollball() argument
337 buf[1] = devad; in i2c_mii_write_rollball()
H A Dmdio-cavium.c29 int phy_id, int devad, int regnum) in cavium_mdiobus_c45_addr() argument
44 smi_cmd.s.reg_adr = devad; in cavium_mdiobus_c45_addr()
90 int cavium_mdiobus_read_c45(struct mii_bus *bus, int phy_id, int devad, in cavium_mdiobus_read_c45() argument
99 r = cavium_mdiobus_c45_addr(p, phy_id, devad, regnum); in cavium_mdiobus_read_c45()
159 int cavium_mdiobus_write_c45(struct mii_bus *bus, int phy_id, int devad, in cavium_mdiobus_write_c45() argument
168 r = cavium_mdiobus_c45_addr(p, phy_id, devad, regnum); in cavium_mdiobus_write_c45()
179 smi_cmd.s.reg_adr = devad; in cavium_mdiobus_write_c45()
H A Dmdio-bitbang.c184 int mdiobb_read_c45(struct mii_bus *bus, int phy, int devad, int reg) in mdiobb_read_c45() argument
188 mdiobb_cmd_addr(ctrl, phy, devad, reg); in mdiobb_read_c45()
189 mdiobb_cmd(ctrl, MDIO_C45_READ, phy, devad); in mdiobb_read_c45()
220 int mdiobb_write_c45(struct mii_bus *bus, int phy, int devad, int reg, u16 val) in mdiobb_write_c45() argument
224 mdiobb_cmd_addr(ctrl, phy, devad, reg); in mdiobb_write_c45()
225 mdiobb_cmd(ctrl, MDIO_C45_WRITE, phy, devad); in mdiobb_write_c45()
H A Dmdio-cavium.h120 int cavium_mdiobus_read_c45(struct mii_bus *bus, int phy_id, int devad,
122 int cavium_mdiobus_write_c45(struct mii_bus *bus, int phy_id, int devad,
/linux/drivers/net/ethernet/samsung/sxgbe/
H A Dsxgbe_mdio.c53 int devad, int phyreg, u16 phydata) in sxgbe_mdio_c45() argument
58 reg = (devad & 0x1f) << 21; in sxgbe_mdio_c45()
99 int phyaddr, int devad, int phyreg, in sxgbe_mdio_access_c45() argument
109 sxgbe_mdio_c45(sp, cmd, phyaddr, devad, phyreg, phydata); in sxgbe_mdio_access_c45()
143 static int sxgbe_mdio_read_c45(struct mii_bus *bus, int phyaddr, int devad, in sxgbe_mdio_read_c45() argument
151 devad, phyreg, 0); in sxgbe_mdio_read_c45()
185 static int sxgbe_mdio_write_c45(struct mii_bus *bus, int phyaddr, int devad, in sxgbe_mdio_write_c45() argument
192 devad, phyreg, phydata); in sxgbe_mdio_write_c45()
/linux/include/linux/fsl/
H A Denetc_mdio.h43 int enetc_mdio_read_c45(struct mii_bus *bus, int phy_id, int devad, int regnum);
44 int enetc_mdio_write_c45(struct mii_bus *bus, int phy_id, int devad, int regnum,
57 int devad, int regnum) in enetc_mdio_read_c45() argument
60 int devad, int regnum, u16 value) in enetc_mdio_write_c45() argument
/linux/drivers/net/phy/
H A Dmdio_bus.c976 int __mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum) in __mdiobus_c45_read() argument
983 retval = bus->read_c45(bus, addr, devad, regnum); in __mdiobus_c45_read()
1006 int __mdiobus_c45_write(struct mii_bus *bus, int addr, int devad, u32 regnum, in __mdiobus_c45_write() argument
1014 err = bus->write_c45(bus, addr, devad, regnum, val); in __mdiobus_c45_write()
1040 int devad, u32 regnum, u16 mask, in __mdiobus_c45_modify_changed() argument
1045 ret = __mdiobus_c45_read(bus, addr, devad, regnum); in __mdiobus_c45_modify_changed()
1053 ret = __mdiobus_c45_write(bus, addr, devad, regnum, new); in __mdiobus_c45_modify_changed()
1116 int mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum) in mdiobus_c45_read() argument
1121 retval = __mdiobus_c45_read(bus, addr, devad, regnum); in mdiobus_c45_read()
1142 int mdiobus_c45_read_nested(struct mii_bus *bus, int addr, int devad, in mdiobus_c45_read_nested() argument
[all …]
H A Dphy.c333 int prtad, devad; in phy_mii_ioctl() local
344 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl()
345 ret = mdiobus_c45_read(phydev->mdio.bus, prtad, devad, in phy_mii_ioctl()
363 devad = mdio_phy_id_devad(mii_data->phy_id); in phy_mii_ioctl()
366 devad = mii_data->reg_num; in phy_mii_ioctl()
369 switch (devad) { in phy_mii_ioctl()
407 mdiobus_c45_write(phydev->mdio.bus, prtad, devad, in phy_mii_ioctl()
410 mdiobus_write(phydev->mdio.bus, prtad, devad, val); in phy_mii_ioctl()
413 devad == MII_BMCR && in phy_mii_ioctl()
/linux/drivers/net/ethernet/sfc/siena/
H A Dmcdi_port.c21 int prtad, int devad, u16 addr) in efx_mcdi_mdio_read() argument
31 MCDI_SET_DWORD(inbuf, MDIO_READ_IN_DEVAD, devad); in efx_mcdi_mdio_read()
47 int prtad, int devad, u16 addr, u16 value) in efx_mcdi_mdio_write() argument
57 MCDI_SET_DWORD(inbuf, MDIO_WRITE_IN_DEVAD, devad); in efx_mcdi_mdio_write()
/linux/drivers/net/ethernet/sfc/
H A Dmcdi_port.c21 int prtad, int devad, u16 addr) in efx_mcdi_mdio_read() argument
31 MCDI_SET_DWORD(inbuf, MDIO_READ_IN_DEVAD, devad); in efx_mcdi_mdio_read()
47 int prtad, int devad, u16 addr, u16 value) in efx_mcdi_mdio_write() argument
57 MCDI_SET_DWORD(inbuf, MDIO_WRITE_IN_DEVAD, devad); in efx_mcdi_mdio_write()
/linux/rust/kernel/net/phy/
H A Dreg.rs183 devad: Mmd, field
189 pub fn new(devad: Mmd, regnum: u16) -> Self { in new()
190 Self { devad, regnum } in new()
202 unsafe { bindings::phy_read_mmd(phydev, self.devad.0.into(), self.regnum.into()) }; in read()
212 bindings::phy_write_mmd(phydev, self.devad.0.into(), self.regnum.into(), val) in write()
/linux/include/linux/
H A Dphy.h1381 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1421 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
1427 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1433 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
1442 int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1444 int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
1446 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1448 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
1510 static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, in __phy_set_bits_mmd() argument
1513 return __phy_modify_mmd(phydev, devad, regnum, 0, val); in __phy_set_bits_mmd()
[all …]
H A Dmdio-bitbang.h43 int mdiobb_read_c45(struct mii_bus *bus, int devad, int phy, int reg);
44 int mdiobb_write_c45(struct mii_bus *bus, int devad, int phy, int reg, u16 val);
/linux/drivers/net/ethernet/hisilicon/
H A Dhns_mdio.c259 static int hns_mdio_write_c45(struct mii_bus *bus, int phy_id, int devad, in hns_mdio_write_c45() argument
271 phy_id, devad, reg, data); in hns_mdio_write_c45()
284 hns_mdio_cmd_write(mdio_dev, true, MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_write_c45()
294 cmd_reg_cfg = devad; in hns_mdio_write_c45()
363 static int hns_mdio_read_c45(struct mii_bus *bus, int phy_id, int devad, in hns_mdio_read_c45() argument
374 phy_id, devad, reg); in hns_mdio_read_c45()
387 hns_mdio_cmd_write(mdio_dev, true, MDIO_C45_WRITE_ADDR, phy_id, devad); in hns_mdio_read_c45()
396 hns_mdio_cmd_write(mdio_dev, true, MDIO_C45_READ, phy_id, devad); in hns_mdio_read_c45()
/linux/drivers/net/dsa/mv88e6xxx/
H A Dphy.c58 int mv88e6xxx_phy_read_c45(struct mv88e6xxx_chip *chip, int phy, int devad, in mv88e6xxx_phy_read_c45() argument
71 return chip->info->ops->phy_read_c45(chip, bus, addr, devad, reg, val); in mv88e6xxx_phy_read_c45()
74 int mv88e6xxx_phy_write_c45(struct mv88e6xxx_chip *chip, int phy, int devad, in mv88e6xxx_phy_write_c45() argument
87 return chip->info->ops->phy_write_c45(chip, bus, addr, devad, reg, val); in mv88e6xxx_phy_write_c45()
H A Dphy.h31 int mv88e6xxx_phy_read_c45(struct mv88e6xxx_chip *chip, int phy, int devad,
33 int mv88e6xxx_phy_write_c45(struct mv88e6xxx_chip *chip, int phy, int devad,
H A Dglobal2.c743 bool external, int port, int devad, in _mv88e6xxx_g2_smi_phy_read_c45() argument
748 err = mv88e6xxx_g2_smi_phy_write_addr_c45(chip, external, port, devad, in _mv88e6xxx_g2_smi_phy_read_c45()
753 return mv88e6xxx_g2_smi_phy_read_data_c45(chip, external, port, devad, in _mv88e6xxx_g2_smi_phy_read_c45()
773 bool external, int port, int devad, in _mv88e6xxx_g2_smi_phy_write_c45() argument
778 err = mv88e6xxx_g2_smi_phy_write_addr_c45(chip, external, port, devad, in _mv88e6xxx_g2_smi_phy_write_c45()
783 return mv88e6xxx_g2_smi_phy_write_data_c45(chip, external, port, devad, in _mv88e6xxx_g2_smi_phy_write_c45()
799 struct mii_bus *bus, int addr, int devad, in mv88e6xxx_g2_smi_phy_read_c45() argument
805 return _mv88e6xxx_g2_smi_phy_read_c45(chip, external, addr, devad, reg, in mv88e6xxx_g2_smi_phy_read_c45()
821 struct mii_bus *bus, int addr, int devad, in mv88e6xxx_g2_smi_phy_write_c45() argument
827 return _mv88e6xxx_g2_smi_phy_write_c45(chip, external, addr, devad, reg, in mv88e6xxx_g2_smi_phy_write_c45()
H A Dglobal2.h325 int addr, int devad, int reg, u16 *val);
328 int addr, int devad, int reg, u16 val);
/linux/include/uapi/linux/
H A Dmdio.h149 #define MDIO_DEVS_PRESENT(devad) (1 << (devad)) argument
461 static inline __u16 mdio_phy_id_c45(int prtad, int devad) in mdio_phy_id_c45() argument
463 return MDIO_PHY_ID_C45 | (prtad << 5) | devad; in mdio_phy_id_c45()
/linux/drivers/net/ethernet/mellanox/mlxbf_gige/
H A Dmlxbf_gige_mdio.c45 .devad = {
77 .devad = {
195 gw_reg |= ((phy_reg << mdio_gw->devad.shift) & in mlxbf_gige_mdio_create_cmd()
196 mdio_gw->devad.mask); in mlxbf_gige_mdio_create_cmd()
/linux/drivers/net/ethernet/intel/ixgbe/
H A Dixgbe_phy.c722 int devad, int regnum, u32 gssr) in ixgbe_mii_bus_read_generic_c45() argument
731 hwaddr |= devad << 16 | regnum; in ixgbe_mii_bus_read_generic_c45()
791 int devad, int regnum, u16 val, in ixgbe_mii_bus_write_generic_c45() argument
803 hwaddr |= devad << 16 | regnum; in ixgbe_mii_bus_write_generic_c45()
840 static int ixgbe_mii_bus_read_c45(struct mii_bus *bus, int devad, int addr, in ixgbe_mii_bus_read_c45() argument
847 return ixgbe_mii_bus_read_generic_c45(hw, addr, devad, regnum, gssr); in ixgbe_mii_bus_read_c45()
875 static int ixgbe_mii_bus_write_c45(struct mii_bus *bus, int addr, int devad, in ixgbe_mii_bus_write_c45() argument
882 return ixgbe_mii_bus_write_generic_c45(hw, addr, devad, regnum, val, in ixgbe_mii_bus_write_c45()
911 int devad, int regnum) in ixgbe_x550em_a_mii_bus_read_c45() argument
918 return ixgbe_mii_bus_read_generic_c45(hw, addr, devad, regnum, gssr); in ixgbe_x550em_a_mii_bus_read_c45()
[all …]
/linux/drivers/net/ethernet/broadcom/bnx2x/
H A Dbnx2x_link.h145 u8 devad; member
394 u8 devad, u16 reg, u16 *ret_val);
397 u8 devad, u16 reg, u16 val);

12