/linux-6.6.21/drivers/net/mdio/ |
D | mdio-ipq4019.c | 56 static int ipq4019_mdio_read_c45(struct mii_bus *bus, int mii_id, int mmd, in ipq4019_mdio_read_c45() argument 73 writel((mii_id << 8) | mmd, priv->membase + MDIO_ADDR_REG); in ipq4019_mdio_read_c45() 98 static int ipq4019_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum) in ipq4019_mdio_read_c22() argument 114 writel((mii_id << 8) | regnum, priv->membase + MDIO_ADDR_REG); in ipq4019_mdio_read_c22() 129 static int ipq4019_mdio_write_c45(struct mii_bus *bus, int mii_id, int mmd, in ipq4019_mdio_write_c45() argument 146 writel((mii_id << 8) | mmd, priv->membase + MDIO_ADDR_REG); in ipq4019_mdio_write_c45() 171 static int ipq4019_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum, in ipq4019_mdio_write_c22() argument 189 writel((mii_id << 8) | regnum, priv->membase + MDIO_ADDR_REG); in ipq4019_mdio_write_c22()
|
D | mdio-hisi-femac.c | 36 static int hisi_femac_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in hisi_femac_mdio_read() argument 45 writel((mii_id << BIT_PHY_ADDR_OFFSET) | regnum, in hisi_femac_mdio_read() 55 static int hisi_femac_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in hisi_femac_mdio_write() argument 66 (mii_id << BIT_PHY_ADDR_OFFSET) | regnum, in hisi_femac_mdio_write()
|
D | mdio-moxart.c | 33 static int moxart_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in moxart_mdio_read() argument 41 ctrl |= MIIRD | ((mii_id << 16) & PHYAD_MASK) | in moxart_mdio_read() 61 static int moxart_mdio_write(struct mii_bus *bus, int mii_id, in moxart_mdio_write() argument 70 ctrl |= MIIWR | ((mii_id << 16) & PHYAD_MASK) | in moxart_mdio_write()
|
D | mdio-sun4i.c | 36 static int sun4i_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in sun4i_mdio_read() argument 43 writel((mii_id << 8) | regnum, data->membase + EMAC_MAC_MADR_REG); in sun4i_mdio_read() 63 static int sun4i_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in sun4i_mdio_write() argument 70 writel((mii_id << 8) | regnum, data->membase + EMAC_MAC_MADR_REG); in sun4i_mdio_write()
|
D | mdio-mscc-miim.c | 106 static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum) in mscc_miim_read() argument 119 (mii_id << MSCC_MIIM_CMD_PHYAD_SHIFT) | in mscc_miim_read() 149 static int mscc_miim_write(struct mii_bus *bus, int mii_id, in mscc_miim_write() argument 162 (mii_id << MSCC_MIIM_CMD_PHYAD_SHIFT) | in mscc_miim_write()
|
/linux-6.6.21/include/linux/ |
D | sungem_phy.h | 45 int mii_id; member 59 int (*mdio_read) (struct net_device *dev, int mii_id, int reg); 60 void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val); 67 extern int sungem_phy_probe(struct mii_phy *phy, int mii_id);
|
/linux-6.6.21/drivers/net/ethernet/marvell/ |
D | mvmdio.c | 123 static int orion_mdio_smi_read(struct mii_bus *bus, int mii_id, in orion_mdio_smi_read() argument 134 writel(((mii_id << MVMDIO_SMI_PHY_ADDR_SHIFT) | in orion_mdio_smi_read() 152 static int orion_mdio_smi_write(struct mii_bus *bus, int mii_id, in orion_mdio_smi_write() argument 162 writel(((mii_id << MVMDIO_SMI_PHY_ADDR_SHIFT) | in orion_mdio_smi_write() 180 static int orion_mdio_xsmi_read_c45(struct mii_bus *bus, int mii_id, in orion_mdio_xsmi_read_c45() argument 191 writel((mii_id << MVMDIO_XSMI_PHYADDR_SHIFT) | in orion_mdio_xsmi_read_c45() 209 static int orion_mdio_xsmi_write_c45(struct mii_bus *bus, int mii_id, in orion_mdio_xsmi_write_c45() argument 220 writel((mii_id << MVMDIO_XSMI_PHYADDR_SHIFT) | in orion_mdio_xsmi_write_c45()
|
/linux-6.6.21/drivers/net/ethernet/freescale/ |
D | fsl_pq_mdio.c | 97 static int fsl_pq_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in fsl_pq_mdio_write() argument 105 iowrite32be((mii_id << 8) | regnum, ®s->miimadd); in fsl_pq_mdio_write() 130 static int fsl_pq_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in fsl_pq_mdio_read() argument 138 iowrite32be((mii_id << 8) | regnum, ®s->miimadd); in fsl_pq_mdio_read() 158 dev_dbg(&bus->dev, "read %04x from address %x/%x\n", value, mii_id, regnum); in fsl_pq_mdio_read()
|
D | fec_main.c | 2053 static int fec_enet_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum) in fec_enet_mdio_read_c22() argument 2070 FEC_MMFR_PA(mii_id) | FEC_MMFR_RA(frame_addr) | in fec_enet_mdio_read_c22() 2089 static int fec_enet_mdio_read_c45(struct mii_bus *bus, int mii_id, in fec_enet_mdio_read_c45() argument 2104 FEC_MMFR_PA(mii_id) | FEC_MMFR_RA(devad) | in fec_enet_mdio_read_c45() 2119 FEC_MMFR_PA(mii_id) | FEC_MMFR_RA(devad) | in fec_enet_mdio_read_c45() 2138 static int fec_enet_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum, in fec_enet_mdio_write_c22() argument 2155 FEC_MMFR_PA(mii_id) | FEC_MMFR_RA(frame_addr) | in fec_enet_mdio_write_c22() 2170 static int fec_enet_mdio_write_c45(struct mii_bus *bus, int mii_id, in fec_enet_mdio_write_c45() argument 2185 FEC_MMFR_PA(mii_id) | FEC_MMFR_RA(devad) | in fec_enet_mdio_write_c45() 2198 FEC_MMFR_PA(mii_id) | FEC_MMFR_RA(devad) | in fec_enet_mdio_write_c45()
|
/linux-6.6.21/drivers/net/ethernet/broadcom/ |
D | bgmac-bcma-mdio.c | 200 static int bcma_mdio_mii_read(struct mii_bus *bus, int mii_id, int regnum) in bcma_mdio_mii_read() argument 202 return bcma_mdio_phy_read(bus->priv, mii_id, 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() argument 208 return bcma_mdio_phy_write(bus->priv, mii_id, regnum, value); in bcma_mdio_mii_write()
|
D | bcm63xx_enet.c | 148 static int bcm_enet_mdio_read(struct bcm_enet_priv *priv, int mii_id, in bcm_enet_mdio_read() argument 155 tmp |= mii_id << ENET_MIIDATA_PHYID_SHIFT; in bcm_enet_mdio_read() 169 static int bcm_enet_mdio_write(struct bcm_enet_priv *priv, int mii_id, in bcm_enet_mdio_write() argument 177 tmp |= mii_id << ENET_MIIDATA_PHYID_SHIFT; in bcm_enet_mdio_write() 187 static int bcm_enet_mdio_read_phylib(struct mii_bus *bus, int mii_id, in bcm_enet_mdio_read_phylib() argument 190 return bcm_enet_mdio_read(bus->priv, mii_id, regnum); in bcm_enet_mdio_read_phylib() 196 static int bcm_enet_mdio_write_phylib(struct mii_bus *bus, int mii_id, in bcm_enet_mdio_write_phylib() argument 199 return bcm_enet_mdio_write(bus->priv, mii_id, regnum, value); in bcm_enet_mdio_write_phylib() 205 static int bcm_enet_mdio_read_mii(struct net_device *dev, int mii_id, in bcm_enet_mdio_read_mii() argument 208 return bcm_enet_mdio_read(netdev_priv(dev), mii_id, regnum); in bcm_enet_mdio_read_mii() [all …]
|
D | tg3.c | 1382 static int tg3_mdio_read(struct mii_bus *bp, int mii_id, int reg) in tg3_mdio_read() argument 1389 if (__tg3_readphy(tp, mii_id, reg, &val)) in tg3_mdio_read() 1397 static int tg3_mdio_write(struct mii_bus *bp, int mii_id, int reg, u16 val) in tg3_mdio_write() argument 1404 if (__tg3_writephy(tp, mii_id, reg, val)) in tg3_mdio_write()
|
/linux-6.6.21/drivers/net/ethernet/ |
D | dnet.c | 99 static int dnet_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in dnet_mdio_read() argument 109 mii_id &= 0x1f; in dnet_mdio_read() 113 value = (mii_id << 8); in dnet_mdio_read() 126 pr_debug("mdio_read %02x:%02x <- %04x\n", mii_id, regnum, value); in dnet_mdio_read() 131 static int dnet_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in dnet_mdio_write() argument 137 pr_debug("mdio_write %02x:%02x <- %04x\n", mii_id, regnum, value); in dnet_mdio_write() 147 mii_id &= 0x1f; in dnet_mdio_write() 154 tmp |= (mii_id << 8); in dnet_mdio_write()
|
/linux-6.6.21/drivers/net/ |
D | sungem_phy.c | 59 return phy->mdio_read(phy->dev, phy->mii_id, reg); in sungem_phy_read() 64 phy->mdio_write(phy->dev, phy->mii_id, reg, val); in sungem_phy_write() 1157 int sungem_phy_probe(struct mii_phy *phy, int mii_id) in sungem_phy_probe() argument 1167 phy->mii_id = mii_id; in sungem_phy_probe() 1170 rc = reset_one_mii_phy(phy, mii_id); in sungem_phy_probe() 1177 id, mii_id); in sungem_phy_probe()
|
/linux-6.6.21/drivers/net/ethernet/toshiba/ |
D | spider_net.c | 116 spider_net_write_phy(struct net_device *netdev, int mii_id, in spider_net_write_phy() argument 122 writevalue = ((u32)mii_id << 21) | in spider_net_write_phy() 140 spider_net_read_phy(struct net_device *netdev, int mii_id, int reg) in spider_net_read_phy() argument 145 readvalue = ((u32)mii_id << 21) | ((u32)reg << 16); in spider_net_read_phy() 172 bmsr = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMSR); in spider_net_setup_aneg() 173 estat = spider_net_read_phy(card->netdev, phy->mii_id, MII_ESTATUS); in spider_net_setup_aneg() 189 sungem_phy_probe(phy, phy->mii_id); in spider_net_setup_aneg() 2075 for (phy->mii_id = 1; phy->mii_id <= 31; phy->mii_id++) { in spider_net_setup_phy() 2077 id = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMSR); in spider_net_setup_phy() 2079 if (!sungem_phy_probe(phy, phy->mii_id)) { in spider_net_setup_phy()
|
D | tc35815.c | 502 static int tc_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in tc_mdio_read() argument 509 tc_writel(MD_CA_Busy | (mii_id << 5) | (regnum & 0x1f), &tr->MD_CA); in tc_mdio_read() 519 static int tc_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 val) in tc_mdio_write() argument 527 tc_writel(MD_CA_Busy | MD_CA_Wr | (mii_id << 5) | (regnum & 0x1f), in tc_mdio_write()
|
/linux-6.6.21/drivers/net/ethernet/altera/ |
D | altera_tse_main.c | 94 static int altera_tse_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in altera_tse_mdio_read() argument 100 csrwr32((mii_id & 0x1f), priv->mac_dev, in altera_tse_mdio_read() 108 static int altera_tse_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in altera_tse_mdio_write() argument 115 csrwr32((mii_id & 0x1f), priv->mac_dev, in altera_tse_mdio_write()
|
/linux-6.6.21/drivers/net/ethernet/cadence/ |
D | macb_main.c | 340 static int macb_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum) in macb_mdio_read_c22() argument 355 | MACB_BF(PHYA, mii_id) in macb_mdio_read_c22() 372 static int macb_mdio_read_c45(struct mii_bus *bus, int mii_id, int devad, in macb_mdio_read_c45() argument 390 | MACB_BF(PHYA, mii_id) in macb_mdio_read_c45() 401 | MACB_BF(PHYA, mii_id) in macb_mdio_read_c45() 418 static int macb_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum, in macb_mdio_write_c22() argument 434 | MACB_BF(PHYA, mii_id) in macb_mdio_write_c22() 450 static int macb_mdio_write_c45(struct mii_bus *bus, int mii_id, in macb_mdio_write_c45() argument 469 | MACB_BF(PHYA, mii_id) in macb_mdio_write_c45() 480 | MACB_BF(PHYA, mii_id) in macb_mdio_write_c45()
|
/linux-6.6.21/drivers/net/ethernet/sun/ |
D | sungem.c | 143 static inline int _sungem_phy_read(struct net_device *dev, int mii_id, int reg) in _sungem_phy_read() argument 146 return __sungem_phy_read(gp, mii_id, reg); in _sungem_phy_read() 176 static inline void _sungem_phy_write(struct net_device *dev, int mii_id, int reg, int val) in _sungem_phy_write() argument 179 __sungem_phy_write(gp, mii_id, reg, val & 0xffff); in _sungem_phy_write()
|
/linux-6.6.21/Documentation/networking/ |
D | phy.rst | 44 int write(struct mii_bus *bus, int mii_id, int regnum, u16 value); 45 int read(struct mii_bus *bus, int mii_id, int regnum); 47 mii_id is the address on the bus for the PHY, and regnum is the register
|