/Linux-v6.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() 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-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 regnum) in aspeed_mdio_read_c45() 126 static int aspeed_mdio_write_c45(struct mii_bus *bus, int addr, int regnum, in aspeed_mdio_write_c45() 142 static int aspeed_mdio_read(struct mii_bus *bus, int addr, int regnum) in aspeed_mdio_read() 153 static int aspeed_mdio_write(struct mii_bus *bus, int addr, int regnum, u16 val) in aspeed_mdio_write() 167 struct mii_bus *bus; in aspeed_mdio_probe() 206 struct mii_bus *bus = (struct mii_bus *)platform_get_drvdata(pdev); in aspeed_mdio_remove()
|
D | mdio-bcm-unimac.c | 39 struct mii_bus *mii_bus; member 96 static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg) in unimac_mdio_read() 126 static int unimac_mdio_write(struct mii_bus *bus, int phy_id, in unimac_mdio_write() 157 static int unimac_mdio_reset(struct mii_bus *bus) in unimac_mdio_reset() 220 struct mii_bus *bus; in unimac_mdio_probe() 256 priv->mii_bus = mdiobus_alloc(); in unimac_mdio_probe() 257 if (!priv->mii_bus) { in unimac_mdio_probe() 262 bus = priv->mii_bus; in unimac_mdio_probe() 303 mdiobus_unregister(priv->mii_bus); in unimac_mdio_remove() 304 mdiobus_free(priv->mii_bus); in unimac_mdio_remove()
|
D | mdio-mscc-miim.c | 72 static int mscc_miim_status(struct mii_bus *bus) in mscc_miim_status() 87 static int mscc_miim_wait_ready(struct mii_bus *bus) in mscc_miim_wait_ready() 96 static int mscc_miim_wait_pending(struct mii_bus *bus) in mscc_miim_wait_pending() 105 static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum) in mscc_miim_read() 151 static int mscc_miim_write(struct mii_bus *bus, int mii_id, in mscc_miim_write() 178 static int mscc_miim_reset(struct mii_bus *bus) in mscc_miim_reset() 220 int mscc_miim_setup(struct device *dev, struct mii_bus **pbus, const char *name, in mscc_miim_setup() 224 struct mii_bus *bus; in mscc_miim_setup() 250 static int mscc_miim_clk_set(struct mii_bus *bus) in mscc_miim_clk_set() 278 struct mii_bus *bus; in mscc_miim_probe() [all …]
|
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() 202 md->mii_bus = devm_mdiobus_alloc(&pdev->dev); in mdio_mux_iproc_probe() 203 if (!md->mii_bus) { in mdio_mux_iproc_probe() 221 bus = md->mii_bus; in mdio_mux_iproc_probe() 240 &md->mux_handle, md, md->mii_bus); in mdio_mux_iproc_probe() 263 mdiobus_unregister(md->mii_bus); in mdio_mux_iproc_remove()
|
/Linux-v6.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() 70 static int spl2sw_mii_write(struct mii_bus *bus, int addr, int regnum, u16 val) in spl2sw_mii_write() 88 struct mii_bus *mii_bus; in spl2sw_mdio_init() local 99 mii_bus = devm_mdiobus_alloc(&comm->pdev->dev); in spl2sw_mdio_init() 100 if (!mii_bus) { in spl2sw_mdio_init() 105 mii_bus->name = "sunplus_mii_bus"; in spl2sw_mdio_init() 106 mii_bus->parent = &comm->pdev->dev; in spl2sw_mdio_init() 107 mii_bus->priv = comm; in spl2sw_mdio_init() 108 mii_bus->read = spl2sw_mii_read; in spl2sw_mdio_init() 109 mii_bus->write = spl2sw_mii_write; in spl2sw_mdio_init() [all …]
|
/Linux-v6.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-v6.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 …]
|
D | bgmac-bcma.c | 97 if (bgmac->mii_bus && bgmac->phyaddr != BGMAC_PHY_NOREGS) { in bcma_phy_connect() 98 snprintf(bus_id, sizeof(bus_id), PHY_ID_FMT, bgmac->mii_bus->id, in bcma_phy_connect() 128 struct mii_bus *mii_bus; in bgmac_probe() local 201 mii_bus = bcma_mdio_mii_register(bgmac); in bgmac_probe() 202 if (IS_ERR(mii_bus)) { in bgmac_probe() 203 err = PTR_ERR(mii_bus); in bgmac_probe() 206 bgmac->mii_bus = mii_bus; in bgmac_probe() 208 phydev = mdiobus_get_phy(bgmac->mii_bus, bgmac->phyaddr); in bgmac_probe() 321 bcma_mdio_mii_unregister(bgmac->mii_bus); in bgmac_probe() 332 bcma_mdio_mii_unregister(bgmac->mii_bus); in bgmac_remove()
|
/Linux-v6.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 | 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() 206 static u64 mdio_bus_get_global_stat(struct mii_bus *bus, unsigned int offset) in mdio_bus_get_global_stat() 221 struct mii_bus *bus = to_mii_bus(dev); in mdio_bus_stat_field_show() 243 struct mii_bus *bus = mdiodev->bus; in mdio_bus_device_stat_field_show() 406 struct mii_bus *mdio_find_bus(const char *mdio_name) in mdio_find_bus() 429 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()
|
/Linux-v6.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-v6.1/include/linux/ |
D | mdio.h | 22 struct mii_bus; 39 struct mii_bus *bus; 109 struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr); 413 int __mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); 414 int __mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); 415 int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum, 418 int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); 419 int mdiobus_read_nested(struct mii_bus *bus, int addr, u32 regnum); 420 int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); 421 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, 30 struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); 34 int of_mdiobus_phy_device_register(struct mii_bus *mdio, struct phy_device *phy, 65 static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) in of_mdiobus_register() 76 struct mii_bus *mdio, in devm_of_mdiobus_register() 107 static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) in of_mdio_find_bus() 129 static inline int of_mdiobus_phy_device_register(struct mii_bus *mdio, in of_mdiobus_phy_device_register()
|
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()
|
D | mdio-bitbang.h | 41 int mdiobb_read(struct mii_bus *bus, int phy, int reg); 42 int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val); 45 struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl); 48 void free_mdio_bitbang(struct mii_bus *bus);
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/drivers/net/ethernet/xilinx/ |
D | xilinx_axienet_mdio.c | 62 static int axienet_mdio_read(struct mii_bus *bus, int phy_id, int reg) in axienet_mdio_read() 112 static int axienet_mdio_write(struct mii_bus *bus, int phy_id, int reg, in axienet_mdio_write() 253 struct mii_bus *bus; in axienet_mdio_setup() 272 lp->mii_bus = bus; in axienet_mdio_setup() 279 lp->mii_bus = NULL; in axienet_mdio_setup() 294 mdiobus_unregister(lp->mii_bus); in axienet_mdio_teardown() 295 mdiobus_free(lp->mii_bus); in axienet_mdio_teardown() 296 lp->mii_bus = NULL; in axienet_mdio_teardown()
|
/Linux-v6.1/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()
|
/Linux-v6.1/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,
|