/linux-6.12.1/drivers/net/mdio/ |
D | mdio-mux.c | 18 struct mii_bus *mii_bus; member 29 struct mii_bus *mii_bus; member 38 static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum) in mdio_mux_read() 44 mutex_lock_nested(&pb->mii_bus->mdio_lock, MDIO_MUTEX_MUX); in mdio_mux_read() 51 r = pb->mii_bus->read(pb->mii_bus, phy_id, regnum); in mdio_mux_read() 53 mutex_unlock(&pb->mii_bus->mdio_lock); in mdio_mux_read() 58 static int mdio_mux_read_c45(struct mii_bus *bus, int phy_id, int dev_addr, in mdio_mux_read_c45() 65 mutex_lock_nested(&pb->mii_bus->mdio_lock, MDIO_MUTEX_MUX); in mdio_mux_read_c45() 72 r = pb->mii_bus->read_c45(pb->mii_bus, phy_id, dev_addr, regnum); in mdio_mux_read_c45() 74 mutex_unlock(&pb->mii_bus->mdio_lock); in mdio_mux_read_c45() [all …]
|
D | mdio-octeon.c | 19 struct mii_bus *mii_bus; in octeon_mdiobus_probe() local 26 mii_bus = devm_mdiobus_alloc_size(&pdev->dev, sizeof(*bus)); in octeon_mdiobus_probe() 27 if (!mii_bus) in octeon_mdiobus_probe() 36 bus = mii_bus->priv; in octeon_mdiobus_probe() 37 bus->mii_bus = mii_bus; in octeon_mdiobus_probe() 57 bus->mii_bus->name = KBUILD_MODNAME; in octeon_mdiobus_probe() 58 snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%px", bus->register_base); in octeon_mdiobus_probe() 59 bus->mii_bus->parent = &pdev->dev; in octeon_mdiobus_probe() 61 bus->mii_bus->read = cavium_mdiobus_read_c22; in octeon_mdiobus_probe() 62 bus->mii_bus->write = cavium_mdiobus_write_c22; in octeon_mdiobus_probe() [all …]
|
D | mdio-thunder.c | 59 struct mii_bus *mii_bus; in thunder_mdiobus_pci_probe() local 78 mii_bus = devm_mdiobus_alloc_size(&pdev->dev, sizeof(*bus)); in thunder_mdiobus_pci_probe() 79 if (!mii_bus) in thunder_mdiobus_pci_probe() 81 bus = mii_bus->priv; in thunder_mdiobus_pci_probe() 82 bus->mii_bus = mii_bus; in thunder_mdiobus_pci_probe() 93 bus->mii_bus->name = KBUILD_MODNAME; in thunder_mdiobus_pci_probe() 94 snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%llx", r.start); in thunder_mdiobus_pci_probe() 95 bus->mii_bus->parent = &pdev->dev; in thunder_mdiobus_pci_probe() 96 bus->mii_bus->read = cavium_mdiobus_read_c22; in thunder_mdiobus_pci_probe() 97 bus->mii_bus->write = cavium_mdiobus_write_c22; in thunder_mdiobus_pci_probe() [all …]
|
D | mdio-mux-bcm6368.c | 33 struct mii_bus *mii_bus; member 37 static int bcm6368_mdiomux_read(struct mii_bus *bus, int phy_id, int loc) in bcm6368_mdiomux_read() 58 static int bcm6368_mdiomux_write(struct mii_bus *bus, int phy_id, int loc, in bcm6368_mdiomux_write() 92 struct mii_bus *bus; in bcm6368_mdiomux_probe() 115 md->mii_bus = devm_mdiobus_alloc(&pdev->dev); in bcm6368_mdiomux_probe() 116 if (!md->mii_bus) { in bcm6368_mdiomux_probe() 121 bus = md->mii_bus; in bcm6368_mdiomux_probe() 141 md->mii_bus); in bcm6368_mdiomux_probe() 161 mdiobus_unregister(md->mii_bus); in bcm6368_mdiomux_remove()
|
D | mdio-bcm-iproc.c | 37 struct mii_bus *mii_bus; member 66 static int iproc_mdio_read(struct mii_bus *bus, int phy_id, int reg) in iproc_mdio_read() 94 static int iproc_mdio_write(struct mii_bus *bus, int phy_id, in iproc_mdio_write() 125 struct mii_bus *bus; in iproc_mdio_probe() 138 priv->mii_bus = mdiobus_alloc(); in iproc_mdio_probe() 139 if (!priv->mii_bus) { in iproc_mdio_probe() 144 bus = priv->mii_bus; in iproc_mdio_probe() 175 mdiobus_unregister(priv->mii_bus); in iproc_mdio_remove() 176 mdiobus_free(priv->mii_bus); in iproc_mdio_remove()
|
D | mdio-aspeed.c | 48 static int aspeed_mdio_op(struct mii_bus *bus, u8 st, u8 op, u8 phyad, u8 regad, in aspeed_mdio_op() 72 static int aspeed_mdio_get_data(struct mii_bus *bus) in aspeed_mdio_get_data() 88 static int aspeed_mdio_read_c22(struct mii_bus *bus, int addr, int regnum) in aspeed_mdio_read_c22() 100 static int aspeed_mdio_write_c22(struct mii_bus *bus, int addr, int regnum, in aspeed_mdio_write_c22() 107 static int aspeed_mdio_read_c45(struct mii_bus *bus, int addr, int devad, in aspeed_mdio_read_c45() 125 static int aspeed_mdio_write_c45(struct mii_bus *bus, int addr, int devad, in aspeed_mdio_write_c45() 142 struct mii_bus *bus; in aspeed_mdio_probe() 182 struct mii_bus *bus = (struct mii_bus *)platform_get_drvdata(pdev); in aspeed_mdio_remove()
|
D | mdio-mux-bcm-iproc.c | 55 struct mii_bus *mii_bus; member 136 static int iproc_mdiomux_read_c22(struct mii_bus *bus, int phyid, int reg) in iproc_mdiomux_read_c22() 148 static int iproc_mdiomux_read_c45(struct mii_bus *bus, int phyid, int devad, in iproc_mdiomux_read_c45() 162 static int iproc_mdiomux_write_c22(struct mii_bus *bus, in iproc_mdiomux_write_c22() 177 static int iproc_mdiomux_write_c45(struct mii_bus *bus, in iproc_mdiomux_write_c45() 213 struct mii_bus *bus; in mdio_mux_iproc_probe() 234 md->mii_bus = devm_mdiobus_alloc(&pdev->dev); in mdio_mux_iproc_probe() 235 if (!md->mii_bus) { in mdio_mux_iproc_probe() 253 bus = md->mii_bus; in mdio_mux_iproc_probe() 274 &md->mux_handle, md, md->mii_bus); in mdio_mux_iproc_probe() [all …]
|
D | mdio-bitbang.c | 148 static int mdiobb_read_common(struct mii_bus *bus, int phy) in mdiobb_read_common() 174 int mdiobb_read_c22(struct mii_bus *bus, int phy, int reg) in mdiobb_read_c22() 184 int mdiobb_read_c45(struct mii_bus *bus, int phy, int devad, int reg) in mdiobb_read_c45() 195 static int mdiobb_write_common(struct mii_bus *bus, u16 val) in mdiobb_write_common() 210 int mdiobb_write_c22(struct mii_bus *bus, int phy, int reg, u16 val) in mdiobb_write_c22() 220 int mdiobb_write_c45(struct mii_bus *bus, int phy, int devad, int reg, u16 val) in mdiobb_write_c45() 231 struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl) in alloc_mdio_bitbang() 233 struct mii_bus *bus; in alloc_mdio_bitbang() 256 void free_mdio_bitbang(struct mii_bus *bus) in free_mdio_bitbang()
|
D | mdio-bcm-unimac.c | 39 struct mii_bus *mii_bus; member 91 static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in unimac_mdio_read() 130 static int unimac_mdio_write(struct mii_bus *bus, int phy_id, in unimac_mdio_write() 169 static int unimac_mdio_reset(struct mii_bus *bus) in unimac_mdio_reset() 241 struct mii_bus *bus; in unimac_mdio_probe() 267 priv->mii_bus = mdiobus_alloc(); in unimac_mdio_probe() 268 if (!priv->mii_bus) in unimac_mdio_probe() 271 bus = priv->mii_bus; in unimac_mdio_probe() 322 mdiobus_unregister(priv->mii_bus); in unimac_mdio_remove() 323 mdiobus_free(priv->mii_bus); in unimac_mdio_remove()
|
/linux-6.12.1/drivers/net/ethernet/sunplus/ |
D | spl2sw_mdio.c | 60 static int spl2sw_mii_read(struct mii_bus *bus, int addr, int regnum) in spl2sw_mii_read() 67 static int spl2sw_mii_write(struct mii_bus *bus, int addr, int regnum, u16 val) in spl2sw_mii_write() 82 struct mii_bus *mii_bus; in spl2sw_mdio_init() local 93 mii_bus = devm_mdiobus_alloc(&comm->pdev->dev); in spl2sw_mdio_init() 94 if (!mii_bus) { in spl2sw_mdio_init() 99 mii_bus->name = "sunplus_mii_bus"; in spl2sw_mdio_init() 100 mii_bus->parent = &comm->pdev->dev; in spl2sw_mdio_init() 101 mii_bus->priv = comm; in spl2sw_mdio_init() 102 mii_bus->read = spl2sw_mii_read; in spl2sw_mdio_init() 103 mii_bus->write = spl2sw_mii_write; in spl2sw_mdio_init() [all …]
|
/linux-6.12.1/drivers/net/ethernet/qualcomm/emac/ |
D | emac-phy.c | 44 static int emac_mdio_read(struct mii_bus *bus, int addr, int regnum) in emac_mdio_read() 67 static int emac_mdio_write(struct mii_bus *bus, int addr, int regnum, u16 val) in emac_mdio_write() 95 struct mii_bus *mii_bus; in emac_phy_config() local 99 adpt->mii_bus = mii_bus = devm_mdiobus_alloc(&pdev->dev); in emac_phy_config() 100 if (!mii_bus) in emac_phy_config() 103 mii_bus->name = "emac-mdio"; in emac_phy_config() 104 snprintf(mii_bus->id, MII_BUS_ID_SIZE, "%s", pdev->name); in emac_phy_config() 105 mii_bus->read = emac_mdio_read; in emac_phy_config() 106 mii_bus->write = emac_mdio_write; in emac_phy_config() 107 mii_bus->parent = &pdev->dev; in emac_phy_config() [all …]
|
/linux-6.12.1/drivers/net/ethernet/wangxun/ngbe/ |
D | ngbe_mdio.c | 14 static int ngbe_phy_read_reg_internal(struct mii_bus *bus, int phy_addr, int regnum) in ngbe_phy_read_reg_internal() 23 static int ngbe_phy_write_reg_internal(struct mii_bus *bus, int phy_addr, int regnum, u16 value) in ngbe_phy_write_reg_internal() 32 static int ngbe_phy_read_reg_c22(struct mii_bus *bus, int phy_addr, int regnum) in ngbe_phy_read_reg_c22() 45 static int ngbe_phy_write_reg_c22(struct mii_bus *bus, int phy_addr, in ngbe_phy_write_reg_c22() 146 struct mii_bus *mii_bus; in ngbe_mdio_init() local 149 mii_bus = devm_mdiobus_alloc(&pdev->dev); in ngbe_mdio_init() 150 if (!mii_bus) in ngbe_mdio_init() 153 mii_bus->name = "ngbe_mii_bus"; in ngbe_mdio_init() 154 mii_bus->read = ngbe_phy_read_reg_c22; in ngbe_mdio_init() 155 mii_bus->write = ngbe_phy_write_reg_c22; in ngbe_mdio_init() [all …]
|
/linux-6.12.1/drivers/net/ethernet/broadcom/ |
D | bgmac-bcma-mdio.c | 179 static int bcma_mdio_phy_reset(struct mii_bus *bus) in bcma_mdio_phy_reset() 200 static int bcma_mdio_mii_read(struct mii_bus *bus, int mii_id, int regnum) in bcma_mdio_mii_read() 205 static int bcma_mdio_mii_write(struct mii_bus *bus, int mii_id, int regnum, in bcma_mdio_mii_write() 211 struct mii_bus *bcma_mdio_mii_register(struct bgmac *bgmac) in bcma_mdio_mii_register() 214 struct mii_bus *mii_bus; in bcma_mdio_mii_register() local 218 mii_bus = mdiobus_alloc(); in bcma_mdio_mii_register() 219 if (!mii_bus) { in bcma_mdio_mii_register() 224 mii_bus->name = "bcma_mdio mii bus"; in bcma_mdio_mii_register() 225 sprintf(mii_bus->id, "%s-%d-%d", "bcma_mdio", core->bus->num, in bcma_mdio_mii_register() 227 mii_bus->priv = bgmac; in bcma_mdio_mii_register() [all …]
|
/linux-6.12.1/drivers/net/phy/ |
D | fixed_phy.c | 29 struct mii_bus *mii_bus; member 73 static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) in fixed_mdio_read() 100 static int fixed_mdio_write(struct mii_bus *bus, int phy_addr, int reg_num, in fixed_mdio_write() 150 fmb->mii_bus->irq[phy_addr] = irq; in fixed_phy_add_gpiod() 236 if (!fmb->mii_bus || fmb->mii_bus->state != MDIOBUS_REGISTERED) in __fixed_phy_register() 257 phy = get_phy_device(fmb->mii_bus, phy_addr, false); in __fixed_phy_register() 344 fmb->mii_bus = mdiobus_alloc(); in fixed_mdio_bus_init() 345 if (fmb->mii_bus == NULL) { in fixed_mdio_bus_init() 350 snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "fixed-0"); in fixed_mdio_bus_init() 351 fmb->mii_bus->name = "Fixed MDIO Bus"; in fixed_mdio_bus_init() [all …]
|
D | mdio_bus.c | 108 static struct mdio_device *mdiobus_find_device(struct mii_bus *bus, int addr) in mdiobus_find_device() 118 struct phy_device *mdiobus_get_phy(struct mii_bus *bus, int addr) in mdiobus_get_phy() 133 bool mdiobus_is_registered_device(struct mii_bus *bus, int addr) in mdiobus_is_registered_device() 147 struct mii_bus *mdiobus_alloc_size(size_t size) in mdiobus_alloc_size() 149 struct mii_bus *bus; in mdiobus_alloc_size() 187 struct mii_bus *bus = to_mii_bus(d); in mdiobus_release() 220 static u64 mdio_bus_get_global_stat(struct mii_bus *bus, unsigned int offset) in mdio_bus_get_global_stat() 235 struct mii_bus *bus = to_mii_bus(dev); in mdio_bus_stat_field_show() 257 struct mii_bus *bus = mdiodev->bus; in mdio_bus_device_stat_field_show() 420 struct mii_bus *mdio_find_bus(const char *mdio_name) in mdio_find_bus() [all …]
|
/linux-6.12.1/include/linux/fsl/ |
D | enetc_mdio.h | 40 int enetc_mdio_read_c22(struct mii_bus *bus, int phy_id, int regnum); 41 int enetc_mdio_write_c22(struct mii_bus *bus, int phy_id, int regnum, 43 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, 50 static inline int enetc_mdio_read_c22(struct mii_bus *bus, int phy_id, in enetc_mdio_read_c22() 53 static inline int enetc_mdio_write_c22(struct mii_bus *bus, int phy_id, in enetc_mdio_write_c22() 56 static inline int enetc_mdio_read_c45(struct mii_bus *bus, int phy_id, in enetc_mdio_read_c45() 59 static inline int enetc_mdio_write_c45(struct mii_bus *bus, int phy_id, in enetc_mdio_write_c45()
|
/linux-6.12.1/include/linux/ |
D | of_mdio.h | 17 int __of_mdiobus_register(struct mii_bus *mdio, struct device_node *np, 20 static inline int of_mdiobus_register(struct mii_bus *mdio, in of_mdiobus_register() 26 int __devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio, 30 struct mii_bus *mdio, in devm_of_mdiobus_register() 46 struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); 50 int of_mdiobus_phy_device_register(struct mii_bus *mdio, struct phy_device *phy, 81 static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) in of_mdiobus_register() 92 struct mii_bus *mdio, in devm_of_mdiobus_register() 123 static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) in of_mdio_find_bus() 145 static inline int of_mdiobus_phy_device_register(struct mii_bus *mdio, in of_mdiobus_phy_device_register()
|
D | mdio-bitbang.h | 41 int mdiobb_read_c22(struct mii_bus *bus, int phy, int reg); 42 int mdiobb_write_c22(struct mii_bus *bus, int phy, int reg, u16 val); 43 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); 47 struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl); 50 void free_mdio_bitbang(struct mii_bus *bus);
|
D | mdio.h | 14 struct mii_bus; 31 struct mii_bus *bus; 95 struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr); 595 int __mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); 596 int __mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); 597 int __mdiobus_modify(struct mii_bus *bus, int addr, u32 regnum, u16 mask, 599 int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum, 602 int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); 603 int mdiobus_read_nested(struct mii_bus *bus, int addr, u32 regnum); 604 int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); [all …]
|
D | fwnode_mdio.h | 12 int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio, 16 int fwnode_mdiobus_register_phy(struct mii_bus *bus, 20 int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio, in fwnode_mdiobus_phy_device_register() 27 static inline int fwnode_mdiobus_register_phy(struct mii_bus *bus, in fwnode_mdiobus_register_phy()
|
/linux-6.12.1/arch/powerpc/platforms/pasemi/ |
D | gpio_mdio.c | 37 static inline void mdio_lo(struct mii_bus *bus) in mdio_lo() 42 static inline void mdio_hi(struct mii_bus *bus) in mdio_hi() 47 static inline void mdc_lo(struct mii_bus *bus) in mdc_lo() 52 static inline void mdc_hi(struct mii_bus *bus) in mdc_hi() 57 static inline void mdio_active(struct mii_bus *bus) in mdio_active() 62 static inline void mdio_tristate(struct mii_bus *bus) in mdio_tristate() 67 static inline int mdio_read(struct mii_bus *bus) in mdio_read() 72 static void clock_out(struct mii_bus *bus, int bit) in clock_out() 85 static void bitbang_pre(struct mii_bus *bus, int read, u8 addr, u8 reg) in bitbang_pre() 115 static int gpio_mdio_read(struct mii_bus *bus, int phy_id, int location) in gpio_mdio_read() [all …]
|
/linux-6.12.1/drivers/net/dsa/b53/ |
D | b53_mdio.c | 47 struct mii_bus *bus = dev->priv; in b53_mdio_op() 82 struct mii_bus *bus = dev->priv; in b53_mdio_read8() 97 struct mii_bus *bus = dev->priv; in b53_mdio_read16() 111 struct mii_bus *bus = dev->priv; in b53_mdio_read32() 127 struct mii_bus *bus = dev->priv; in b53_mdio_read48() 149 struct mii_bus *bus = dev->priv; in b53_mdio_read64() 171 struct mii_bus *bus = dev->priv; in b53_mdio_write8() 185 struct mii_bus *bus = dev->priv; in b53_mdio_write16() 199 struct mii_bus *bus = dev->priv; in b53_mdio_write32() 218 struct mii_bus *bus = dev->priv; in b53_mdio_write48() [all …]
|
/linux-6.12.1/drivers/net/ethernet/wangxun/txgbe/ |
D | txgbe_phy.c | 84 static int txgbe_pcs_read(struct mii_bus *bus, int addr, int devnum, int regnum) in txgbe_pcs_read() 103 static int txgbe_pcs_write(struct mii_bus *bus, int addr, int devnum, int regnum, u16 val) in txgbe_pcs_write() 124 struct mii_bus *mii_bus; in txgbe_mdio_pcs_init() local 133 mii_bus = devm_mdiobus_alloc(&pdev->dev); in txgbe_mdio_pcs_init() 134 if (!mii_bus) in txgbe_mdio_pcs_init() 137 mii_bus->name = "txgbe_pcs_mdio_bus"; in txgbe_mdio_pcs_init() 138 mii_bus->read_c45 = &txgbe_pcs_read; in txgbe_mdio_pcs_init() 139 mii_bus->write_c45 = &txgbe_pcs_write; in txgbe_mdio_pcs_init() 140 mii_bus->parent = &pdev->dev; in txgbe_mdio_pcs_init() 141 mii_bus->phy_mask = ~0; in txgbe_mdio_pcs_init() [all …]
|
/linux-6.12.1/drivers/net/ethernet/xilinx/ |
D | xilinx_axienet_mdio.c | 79 static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int reg) in axienet_mdio_read() 129 static int axienet_mdio_write(struct mii_bus *bus, int phy_id, int reg, in axienet_mdio_write() 283 struct mii_bus *bus; in axienet_mdio_setup() 298 lp->mii_bus = bus; in axienet_mdio_setup() 316 lp->mii_bus = NULL; in axienet_mdio_setup() 328 mdiobus_unregister(lp->mii_bus); in axienet_mdio_teardown() 329 mdiobus_free(lp->mii_bus); in axienet_mdio_teardown() 330 lp->mii_bus = NULL; in axienet_mdio_teardown()
|
/linux-6.12.1/drivers/net/ethernet/tehuti/ |
D | tn40_mdio.c | 102 static int tn40_mdio_read_c45(struct mii_bus *mii_bus, int addr, int devnum, in tn40_mdio_read_c45() argument 105 return tn40_mdio_read(mii_bus->priv, addr, devnum, regnum); in tn40_mdio_read_c45() 108 static int tn40_mdio_write_c45(struct mii_bus *mii_bus, int addr, int devnum, in tn40_mdio_write_c45() argument 111 return tn40_mdio_write(mii_bus->priv, addr, devnum, regnum, val); in tn40_mdio_write_c45() 117 struct mii_bus *bus; in tn40_mdiobus_init()
|