/kernel/linux/linux-5.10/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() 61 static int mdio_mux_write(struct mii_bus *bus, int phy_id, in mdio_mux_write() 69 mutex_lock_nested(&pb->mii_bus->mdio_lock, MDIO_MUTEX_MUX); in mdio_mux_write() 76 r = pb->mii_bus->write(pb->mii_bus, phy_id, regnum, val); in mdio_mux_write() 78 mutex_unlock(&pb->mii_bus->mdio_lock); in mdio_mux_write() [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; in octeon_mdiobus_probe() 62 bus->mii_bus->write = cavium_mdiobus_write; 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; in thunder_mdiobus_pci_probe() 97 bus->mii_bus->write = cavium_mdiobus_write; in thunder_mdiobus_pci_probe() [all …]
|
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-bcm-unimac.c | 41 struct mii_bus *mii_bus; member 98 static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in unimac_mdio_read() 128 static int unimac_mdio_write(struct mii_bus *bus, int phy_id, in unimac_mdio_write() 159 static int unimac_mdio_reset(struct mii_bus *bus) in unimac_mdio_reset() 222 struct mii_bus *bus; in unimac_mdio_probe() 258 priv->mii_bus = mdiobus_alloc(); in unimac_mdio_probe() 259 if (!priv->mii_bus) { in unimac_mdio_probe() 264 bus = priv->mii_bus; in unimac_mdio_probe() 305 mdiobus_unregister(priv->mii_bus); in unimac_mdio_remove() 306 mdiobus_free(priv->mii_bus); in unimac_mdio_remove()
|
D | mdio-mux-bcm-iproc.c | 53 struct mii_bus *mii_bus; member 134 static int iproc_mdiomux_read(struct mii_bus *bus, int phyid, int reg) in iproc_mdiomux_read() 146 static int iproc_mdiomux_write(struct mii_bus *bus, in iproc_mdiomux_write() 181 struct mii_bus *bus; in mdio_mux_iproc_probe() 205 md->mii_bus = devm_mdiobus_alloc(&pdev->dev); in mdio_mux_iproc_probe() 206 if (!md->mii_bus) { in mdio_mux_iproc_probe() 224 bus = md->mii_bus; in mdio_mux_iproc_probe() 243 &md->mux_handle, md, md->mii_bus); in mdio_mux_iproc_probe() 266 mdiobus_unregister(md->mii_bus); in mdio_mux_iproc_remove()
|
D | mdio-mscc-miim.c | 53 static int mscc_miim_wait_ready(struct mii_bus *bus) in mscc_miim_wait_ready() 63 static int mscc_miim_wait_pending(struct mii_bus *bus) in mscc_miim_wait_pending() 73 static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum) in mscc_miim_read() 102 static int mscc_miim_write(struct mii_bus *bus, int mii_id, in mscc_miim_write() 122 static int mscc_miim_reset(struct mii_bus *bus) in mscc_miim_reset() 138 struct mii_bus *bus; in mscc_miim_probe() 186 struct mii_bus *bus = platform_get_drvdata(pdev); in mscc_miim_remove()
|
D | mdio-moxart.c | 33 static int moxart_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in moxart_mdio_read() 61 static int moxart_mdio_write(struct mii_bus *bus, int mii_id, in moxart_mdio_write() 93 static int moxart_mdio_reset(struct mii_bus *bus) in moxart_mdio_reset() 113 struct mii_bus *bus; in moxart_mdio_probe() 160 struct mii_bus *bus = platform_get_drvdata(pdev); in moxart_mdio_remove()
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/broadcom/ |
D | bgmac-bcma-mdio.c | 178 static int bcma_mdio_phy_reset(struct mii_bus *bus) in bcma_mdio_phy_reset() 199 static int bcma_mdio_mii_read(struct mii_bus *bus, int mii_id, int regnum) in bcma_mdio_mii_read() 204 static int bcma_mdio_mii_write(struct mii_bus *bus, int mii_id, int regnum, in bcma_mdio_mii_write() 210 struct mii_bus *bcma_mdio_mii_register(struct bgmac *bgmac) in bcma_mdio_mii_register() 213 struct mii_bus *mii_bus; in bcma_mdio_mii_register() local 216 mii_bus = mdiobus_alloc(); in bcma_mdio_mii_register() 217 if (!mii_bus) { in bcma_mdio_mii_register() 222 mii_bus->name = "bcma_mdio mii bus"; in bcma_mdio_mii_register() 223 sprintf(mii_bus->id, "%s-%d-%d", "bcma_mdio", core->bus->num, in bcma_mdio_mii_register() 225 mii_bus->priv = bgmac; in bcma_mdio_mii_register() [all …]
|
D | bgmac-bcma.c | 90 snprintf(bus_id, sizeof(bus_id), PHY_ID_FMT, bgmac->mii_bus->id, in bcma_phy_connect() 116 struct mii_bus *mii_bus; in bgmac_probe() local 189 mii_bus = bcma_mdio_mii_register(bgmac); in bgmac_probe() 190 if (IS_ERR(mii_bus)) { in bgmac_probe() 191 err = PTR_ERR(mii_bus); in bgmac_probe() 194 bgmac->mii_bus = mii_bus; in bgmac_probe() 196 phydev = mdiobus_get_phy(bgmac->mii_bus, bgmac->phyaddr); in bgmac_probe() 300 if (bgmac->mii_bus) in bgmac_probe() 312 bcma_mdio_mii_unregister(bgmac->mii_bus); in bgmac_probe() 323 bcma_mdio_mii_unregister(bgmac->mii_bus); in bgmac_remove()
|
/kernel/linux/linux-5.10/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 | 109 struct phy_device *mdiobus_get_phy(struct mii_bus *bus, int addr) in mdiobus_get_phy() 123 bool mdiobus_is_registered_device(struct mii_bus *bus, int addr) in mdiobus_is_registered_device() 137 struct mii_bus *mdiobus_alloc_size(size_t size) in mdiobus_alloc_size() 139 struct mii_bus *bus; in mdiobus_alloc_size() 177 struct mii_bus *bus = to_mii_bus(d); in mdiobus_release() 203 static u64 mdio_bus_get_global_stat(struct mii_bus *bus, unsigned int offset) in mdio_bus_get_global_stat() 218 struct mii_bus *bus = to_mii_bus(dev); in mdio_bus_stat_field_show() 240 struct mii_bus *bus = mdiodev->bus; in mdio_bus_device_stat_field_show() 403 struct mii_bus *mdio_find_bus(const char *mdio_name) in mdio_find_bus() 426 struct mii_bus *of_mdio_find_bus(struct device_node *mdio_bus_np) in of_mdio_find_bus() [all …]
|
D | mdio_devres.c | 9 struct mii_bus *mii; 30 struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv) in devm_mdiobus_alloc_size() 60 struct mii_bus *mii = match_data; in mdiobus_devres_match() 73 int __devm_mdiobus_register(struct device *dev, struct mii_bus *bus, in __devm_mdiobus_register() 106 int devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio, in devm_of_mdiobus_register()
|
/kernel/linux/linux-5.10/include/linux/ |
D | mdio.h | 20 struct mii_bus; 37 struct mii_bus *bus; 94 struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr); 328 int __mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); 329 int __mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); 330 int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum, 333 int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); 334 int mdiobus_read_nested(struct mii_bus *bus, int addr, u32 regnum); 335 int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); 336 int mdiobus_write_nested(struct mii_bus *bus, int addr, u32 regnum, u16 val); [all …]
|
D | of_mdio.h | 17 int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np); 18 int devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio, 33 struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); 37 int of_mdiobus_phy_device_register(struct mii_bus *mdio, struct phy_device *phy, 68 static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) in of_mdiobus_register() 79 struct mii_bus *mdio, in devm_of_mdiobus_register() 117 static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) in of_mdio_find_bus() 139 static inline int of_mdiobus_phy_device_register(struct mii_bus *mdio, in of_mdiobus_phy_device_register()
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/xilinx/ |
D | xilinx_axienet_mdio.c | 45 static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int reg) in axienet_mdio_read() 88 static int axienet_mdio_write(struct mii_bus *bus, int phy_id, int reg, in axienet_mdio_write() 220 struct mii_bus *bus; in axienet_mdio_setup() 239 lp->mii_bus = bus; in axienet_mdio_setup() 246 lp->mii_bus = NULL; in axienet_mdio_setup() 260 mdiobus_unregister(lp->mii_bus); in axienet_mdio_teardown() 261 mdiobus_free(lp->mii_bus); in axienet_mdio_teardown() 262 lp->mii_bus = NULL; in axienet_mdio_teardown()
|
D | ll_temac_mdio.c | 24 static int temac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in temac_mdio_read() 44 static int temac_mdio_write(struct mii_bus *bus, int phy_id, int reg, u16 val) in temac_mdio_write() 67 struct mii_bus *bus; in temac_mdio_setup() 113 lp->mii_bus = bus; in temac_mdio_setup() 126 mdiobus_unregister(lp->mii_bus); in temac_mdio_teardown()
|
/kernel/linux/linux-5.10/drivers/net/dsa/b53/ |
D | b53_mdio.c | 46 struct mii_bus *bus = dev->priv; in b53_mdio_op() 81 struct mii_bus *bus = dev->priv; in b53_mdio_read8() 96 struct mii_bus *bus = dev->priv; in b53_mdio_read16() 110 struct mii_bus *bus = dev->priv; in b53_mdio_read32() 126 struct mii_bus *bus = dev->priv; in b53_mdio_read48() 148 struct mii_bus *bus = dev->priv; in b53_mdio_read64() 170 struct mii_bus *bus = dev->priv; in b53_mdio_write8() 184 struct mii_bus *bus = dev->priv; in b53_mdio_write16() 198 struct mii_bus *bus = dev->priv; in b53_mdio_write32() 217 struct mii_bus *bus = dev->priv; in b53_mdio_write48() [all …]
|
/kernel/linux/linux-5.10/include/linux/fsl/ |
D | enetc_mdio.h | 40 int enetc_mdio_read(struct mii_bus *bus, int phy_id, int regnum); 41 int enetc_mdio_write(struct mii_bus *bus, int phy_id, int regnum, u16 value); 46 static inline int enetc_mdio_read(struct mii_bus *bus, int phy_id, int regnum) in enetc_mdio_read() 48 static inline int enetc_mdio_write(struct mii_bus *bus, int phy_id, int regnum, in enetc_mdio_write()
|
/kernel/linux/linux-5.10/drivers/net/dsa/mv88e6xxx/ |
D | phy.h | 17 int mv88e6165_phy_read(struct mv88e6xxx_chip *chip, struct mii_bus *bus, 19 int mv88e6165_phy_write(struct mv88e6xxx_chip *chip, struct mii_bus *bus, 21 int mv88e6185_phy_ppu_read(struct mv88e6xxx_chip *chip, struct mii_bus *bus, 23 int mv88e6185_phy_ppu_write(struct mv88e6xxx_chip *chip, struct mii_bus *bus,
|
/kernel/linux/linux-5.10/drivers/net/ethernet/ |
D | lantiq_etop.c | 94 struct mii_bus *mii_bus; member 304 ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data) in ltq_etop_mdio_wr() 318 ltq_etop_mdio_rd(struct mii_bus *bus, int phy_addr, int phy_reg) in ltq_etop_mdio_rd() 345 phydev = phy_find_first(priv->mii_bus); in ltq_etop_mdio_probe() 373 priv->mii_bus = mdiobus_alloc(); in ltq_etop_mdio_init() 374 if (!priv->mii_bus) { in ltq_etop_mdio_init() 380 priv->mii_bus->priv = dev; in ltq_etop_mdio_init() 381 priv->mii_bus->read = ltq_etop_mdio_rd; in ltq_etop_mdio_init() 382 priv->mii_bus->write = ltq_etop_mdio_wr; in ltq_etop_mdio_init() 383 priv->mii_bus->name = "ltq_mii"; in ltq_etop_mdio_init() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/freescale/ |
D | fec_mpc52xx_phy.c | 27 static int mpc52xx_fec_mdio_transfer(struct mii_bus *bus, int phy_id, in mpc52xx_fec_mdio_transfer() 51 static int mpc52xx_fec_mdio_read(struct mii_bus *bus, int phy_id, int reg) in mpc52xx_fec_mdio_read() 56 static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg, in mpc52xx_fec_mdio_write() 67 struct mii_bus *bus; in mpc52xx_fec_mdio_probe() 122 struct mii_bus *bus = platform_get_drvdata(of); in mpc52xx_fec_mdio_remove()
|
/kernel/linux/linux-5.10/include/linux/mdio/ |
D | mdio-xgene.h | 91 struct mii_bus *mdio_bus; 126 int xgene_mdio_rgmii_read(struct mii_bus *bus, int phy_id, int reg); 127 int xgene_mdio_rgmii_write(struct mii_bus *bus, int phy_id, int reg, u16 data); 128 struct phy_device *xgene_enet_phy_register(struct mii_bus *bus, int phy_addr);
|