Home
last modified time | relevance | path

Searched refs:mii (Results 1 – 25 of 248) sorted by relevance

12345678910

/linux-6.6.21/drivers/net/
Dmii.c36 static u32 mii_get_an(struct mii_if_info *mii, u16 addr) in mii_get_an() argument
40 advert = mii->mdio_read(mii->dev, mii->phy_id, addr); in mii_get_an()
53 void mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) in mii_ethtool_gset() argument
55 struct net_device *dev = mii->dev; in mii_ethtool_gset()
63 if (mii->supports_gmii) in mii_ethtool_gset()
74 ecmd->phy_address = mii->phy_id; in mii_ethtool_gset()
79 bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); in mii_ethtool_gset()
80 bmsr = mii->mdio_read(dev, mii->phy_id, MII_BMSR); in mii_ethtool_gset()
81 if (mii->supports_gmii) { in mii_ethtool_gset()
82 ctrl1000 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000); in mii_ethtool_gset()
[all …]
/linux-6.6.21/drivers/net/mdio/
Dmdio-regmap.c56 struct mii_bus *mii; in devm_mdio_regmap_register() local
62 mii = devm_mdiobus_alloc_size(config->parent, sizeof(*mr)); in devm_mdio_regmap_register()
63 if (!mii) in devm_mdio_regmap_register()
66 mr = mii->priv; in devm_mdio_regmap_register()
70 mii->name = DRV_NAME; in devm_mdio_regmap_register()
71 strscpy(mii->id, config->name, MII_BUS_ID_SIZE); in devm_mdio_regmap_register()
72 mii->parent = config->parent; in devm_mdio_regmap_register()
73 mii->read = mdio_regmap_read_c22; in devm_mdio_regmap_register()
74 mii->write = mdio_regmap_write_c22; in devm_mdio_regmap_register()
77 mii->phy_mask = ~BIT(config->valid_addr); in devm_mdio_regmap_register()
[all …]
Dmdio-i2c.c384 struct mii_bus *mii; in mdio_i2c_alloc() local
390 mii = mdiobus_alloc(); in mdio_i2c_alloc()
391 if (!mii) in mdio_i2c_alloc()
394 snprintf(mii->id, MII_BUS_ID_SIZE, "i2c:%s", dev_name(parent)); in mdio_i2c_alloc()
395 mii->parent = parent; in mdio_i2c_alloc()
396 mii->priv = i2c; in mdio_i2c_alloc()
405 mdiobus_free(mii); in mdio_i2c_alloc()
409 mii->read_c45 = i2c_mii_read_rollball; in mdio_i2c_alloc()
410 mii->write_c45 = i2c_mii_write_rollball; in mdio_i2c_alloc()
413 mii->read = i2c_mii_read_default_c22; in mdio_i2c_alloc()
[all …]
/linux-6.6.21/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_mdio.c84 unsigned int mii_address = priv->hw->mii.addr; in stmmac_xgmac2_mdio_read()
85 unsigned int mii_data = priv->hw->mii.data; in stmmac_xgmac2_mdio_read()
100 value |= (priv->clk_csr << priv->hw->mii.clk_csr_shift) in stmmac_xgmac2_mdio_read()
101 & priv->hw->mii.clk_csr_mask; in stmmac_xgmac2_mdio_read()
167 unsigned int mii_address = priv->hw->mii.addr; in stmmac_xgmac2_mdio_write()
168 unsigned int mii_data = priv->hw->mii.data; in stmmac_xgmac2_mdio_write()
183 value |= (priv->clk_csr << priv->hw->mii.clk_csr_shift) in stmmac_xgmac2_mdio_write()
184 & priv->hw->mii.clk_csr_mask; in stmmac_xgmac2_mdio_write()
246 unsigned int mii_address = priv->hw->mii.addr; in stmmac_mdio_read()
247 unsigned int mii_data = priv->hw->mii.data; in stmmac_mdio_read()
[all …]
Ddwmac100_core.c183 mac->mii.addr = MAC_MII_ADDR; in dwmac100_setup()
184 mac->mii.data = MAC_MII_DATA; in dwmac100_setup()
185 mac->mii.addr_shift = 11; in dwmac100_setup()
186 mac->mii.addr_mask = 0x0000F800; in dwmac100_setup()
187 mac->mii.reg_shift = 6; in dwmac100_setup()
188 mac->mii.reg_mask = 0x000007C0; in dwmac100_setup()
189 mac->mii.clk_csr_shift = 2; in dwmac100_setup()
190 mac->mii.clk_csr_mask = GENMASK(5, 2); in dwmac100_setup()
Ddwmac-intel.c68 val_rd = mdiobus_read(priv->mii, phyaddr, phyreg); in serdes_status_poll()
90 data = mdiobus_read(priv->mii, serdes_phy_addr, in intel_serdes_powerup()
103 mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data); in intel_serdes_powerup()
106 data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0); in intel_serdes_powerup()
108 mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data); in intel_serdes_powerup()
122 data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0); in intel_serdes_powerup()
124 mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data); in intel_serdes_powerup()
138 data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0); in intel_serdes_powerup()
143 mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data); in intel_serdes_powerup()
158 mdiobus_modify(priv->mii, serdes_phy_addr, SERDES_GCR0, in intel_serdes_powerup()
[all …]
/linux-6.6.21/drivers/bcma/
Ddriver_chipcommon_b.c36 void __iomem *mii = ccb->mii; in bcma_chipco_b_mii_write() local
38 writel(offset, mii + BCMA_CCB_MII_MNG_CTL); in bcma_chipco_b_mii_write()
39 bcma_wait_reg(bus, mii + BCMA_CCB_MII_MNG_CTL, 0x0100, 0x0000, 100); in bcma_chipco_b_mii_write()
40 writel(value, mii + BCMA_CCB_MII_MNG_CMD_DATA); in bcma_chipco_b_mii_write()
41 bcma_wait_reg(bus, mii + BCMA_CCB_MII_MNG_CTL, 0x0100, 0x0000, 100); in bcma_chipco_b_mii_write()
51 ccb->mii = ioremap(ccb->core->addr_s[1], BCMA_CORE_SIZE); in bcma_core_chipcommon_b_init()
52 if (!ccb->mii) in bcma_core_chipcommon_b_init()
60 if (ccb->mii) in bcma_core_chipcommon_b_free()
61 iounmap(ccb->mii); in bcma_core_chipcommon_b_free()
/linux-6.6.21/drivers/net/phy/
Dmdio_devres.c9 struct mii_bus *mii; member
16 mdiobus_free(dr->mii); in devm_mdiobus_free()
38 dr->mii = mdiobus_alloc_size(sizeof_priv); in devm_mdiobus_alloc_size()
39 if (!dr->mii) { in devm_mdiobus_alloc_size()
45 return dr->mii; in devm_mdiobus_alloc_size()
53 mdiobus_unregister(dr->mii); in devm_mdiobus_unregister()
60 struct mii_bus *mii = match_data; in mdiobus_devres_match() local
62 return mii == res->mii; in mdiobus_devres_match()
93 dr->mii = bus; in __devm_mdiobus_register()
127 dr->mii = mdio; in __devm_of_mdiobus_register()
/linux-6.6.21/drivers/net/ethernet/samsung/sxgbe/
Dsxgbe_mdio.c49 writel(reg, sp->ioaddr + sp->hw->mii.data); in sxgbe_mdio_ctrl_data()
60 writel(reg, sp->ioaddr + sp->hw->mii.addr); in sxgbe_mdio_c45()
74 writel(reg, sp->ioaddr + sp->hw->mii.addr); in sxgbe_mdio_c22()
82 const struct mii_regs *mii = &sp->hw->mii; in sxgbe_mdio_access_c22() local
85 rc = sxgbe_mdio_busy_wait(sp->ioaddr, mii->data); in sxgbe_mdio_access_c22()
95 return sxgbe_mdio_busy_wait(sp->ioaddr, mii->data); in sxgbe_mdio_access_c22()
102 const struct mii_regs *mii = &sp->hw->mii; in sxgbe_mdio_access_c45() local
105 rc = sxgbe_mdio_busy_wait(sp->ioaddr, mii->data); in sxgbe_mdio_access_c45()
111 return sxgbe_mdio_busy_wait(sp->ioaddr, mii->data); in sxgbe_mdio_access_c45()
132 return readl(priv->ioaddr + priv->hw->mii.data) & 0xffff; in sxgbe_mdio_read_c22()
[all …]
/linux-6.6.21/drivers/net/ethernet/ti/icssg/
Dicssg_mii_cfg.c15 void icssg_mii_update_ipg(struct regmap *mii_rt, int mii, u32 ipg) in icssg_mii_update_ipg() argument
19 if (mii == ICSS_MII0) { in icssg_mii_update_ipg()
28 void icssg_mii_update_mtu(struct regmap *mii_rt, int mii, int mtu) in icssg_mii_update_mtu() argument
31 if (mii == ICSS_MII0) { in icssg_mii_update_mtu()
70 void icssg_miig_set_interface_mode(struct regmap *miig_rt, int mii, phy_interface_t phy_if) in icssg_miig_set_interface_mode() argument
74 mask = mii == ICSS_MII0 ? ICSSG_CFG_MII0_MODE : ICSSG_CFG_MII1_MODE; in icssg_miig_set_interface_mode()
75 shift = mii == ICSS_MII0 ? ICSSG_CFG_MII0_MODE_SHIFT : ICSSG_CFG_MII1_MODE_SHIFT; in icssg_miig_set_interface_mode()
97 u32 icssg_rgmii_get_speed(struct regmap *miig_rt, int mii) in icssg_rgmii_get_speed() argument
101 if (mii == ICSS_MII1) { in icssg_rgmii_get_speed()
109 u32 icssg_rgmii_get_fullduplex(struct regmap *miig_rt, int mii) in icssg_rgmii_get_fullduplex() argument
[all …]
Dicssg_mii_rt.h143 void icssg_mii_update_ipg(struct regmap *mii_rt, int mii, u32 ipg);
144 void icssg_mii_update_mtu(struct regmap *mii_rt, int mii, int mtu);
147 u32 icssg_rgmii_get_speed(struct regmap *miig_rt, int mii);
148 u32 icssg_rgmii_get_fullduplex(struct regmap *miig_rt, int mii);
149 void icssg_miig_set_interface_mode(struct regmap *miig_rt, int mii, phy_interface_t phy_if);
/linux-6.6.21/drivers/net/usb/
Dasix_devices.c78 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid()
91 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid()
104 return mii_link_ok(&dev->mii); in asix_get_link()
111 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in asix_ioctl()
176 mii_check_media(&dev->mii, 1, 1); in ax88172_link_reset()
177 mii_ethtool_gset(&dev->mii, &ecmd); in ax88172_link_reset()
208 asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, reset_bits); in asix_phy_reset()
215 if (asix_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR) in asix_phy_reset()
223 dev->mii.phy_id); in asix_phy_reset()
260 dev->mii.dev = dev->net; in ax88172_bind()
[all …]
Dsr9700.c243 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in sr9700_ioctl()
322 struct mii_if_info *mii; in sr9700_bind() local
339 mii = &dev->mii; in sr9700_bind()
340 mii->dev = netdev; in sr9700_bind()
341 mii->mdio_read = sr_mdio_read; in sr9700_bind()
342 mii->mdio_write = sr_mdio_write; in sr9700_bind()
343 mii->phy_id_mask = 0x1f; in sr9700_bind()
344 mii->reg_num_mask = 0x1f; in sr9700_bind()
372 sr_mdio_write(netdev, mii->phy_id, MII_BMCR, BMCR_RESET); in sr9700_bind()
373 sr_mdio_write(netdev, mii->phy_id, MII_ADVERTISE, ADVERTISE_ALL | in sr9700_bind()
[all …]
Dr8153_ecm.c106 dev->mii.dev = dev->net; in r8153_bind()
107 dev->mii.mdio_read = r8153_ecm_mdio_read; in r8153_bind()
108 dev->mii.mdio_write = r8153_ecm_mdio_write; in r8153_bind()
109 dev->mii.reg_num_mask = 0x1f; in r8153_bind()
110 dev->mii.supports_gmii = 1; in r8153_bind()
Dsmsc75xx.c198 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_read()
199 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_read()
252 phy_id &= dev->mii.phy_id_mask; in __smsc75xx_mdio_write()
253 idx &= dev->mii.reg_num_mask; in __smsc75xx_mdio_write()
630 struct mii_if_info *mii = &dev->mii; in smsc75xx_link_reset() local
636 smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC, in smsc75xx_link_reset()
645 mii_check_media(mii, 1, 1); in smsc75xx_link_reset()
646 mii_ethtool_gset(&dev->mii, &ecmd); in smsc75xx_link_reset()
647 lcladv = smsc75xx_mdio_read(dev->net, mii->phy_id, MII_ADVERTISE); in smsc75xx_link_reset()
648 rmtadv = smsc75xx_mdio_read(dev->net, mii->phy_id, MII_LPA); in smsc75xx_link_reset()
[all …]
Dch9200.c217 mii_check_media(&dev->mii, 1, 1); in ch9200_link_reset()
218 mii_ethtool_gset(&dev->mii, &ecmd); in ch9200_link_reset()
345 dev->mii.dev = dev->net; in ch9200_bind()
346 dev->mii.mdio_read = ch9200_mdio_read; in ch9200_bind()
347 dev->mii.mdio_write = ch9200_mdio_write; in ch9200_bind()
348 dev->mii.reg_num_mask = 0x1f; in ch9200_bind()
350 dev->mii.phy_id_mask = 0x1f; in ch9200_bind()
354 mii_nway_restart(&dev->mii); in ch9200_bind()
Ddm9601.c273 return mii_link_ok(&dev->mii); in dm9601_get_link()
280 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in dm9601_ioctl()
379 dev->mii.dev = dev->net; in dm9601_bind()
380 dev->mii.mdio_read = dm9601_mdio_read; in dm9601_bind()
381 dev->mii.mdio_write = dm9601_mdio_write; in dm9601_bind()
382 dev->mii.phy_id_mask = 0x1f; in dm9601_bind()
383 dev->mii.reg_num_mask = 0x1f; in dm9601_bind()
433 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in dm9601_bind()
434 dm9601_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in dm9601_bind()
436 mii_nway_restart(&dev->mii); in dm9601_bind()
[all …]
Dsr9800.c378 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in sr_get_phyid()
389 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in sr_get_phyid()
485 return mii_link_ok(&dev->mii); in sr_get_link()
492 return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); in sr_ioctl()
539 mii_check_media(&dev->mii, 1, 1); in sr9800_link_reset()
540 mii_ethtool_gset(&dev->mii, &ecmd); in sr9800_link_reset()
563 sr_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); in sr9800_set_default_mode()
564 sr_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, in sr9800_set_default_mode()
566 mii_nway_restart(&dev->mii); in sr9800_set_default_mode()
767 dev->mii.dev = dev->net; in sr9800_bind()
[all …]
/linux-6.6.21/arch/arm/boot/dts/ti/omap/
Dam335x-boneblack.dts139 "[mii col]",
140 "[mii crs]",
141 "[mii rx err]",
142 "[mii tx en]",
143 "[mii rx dv]",
148 "[mii tx clk]",
149 "[mii rx clk]",
/linux-6.6.21/Documentation/devicetree/bindings/pinctrl/
Dmarvell,kirkwood-pinctrl.txt33 mii(col)
35 mii(crs)
41 mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col)
43 mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs)
47 mpp35 35 gpio, mii(rxerr)
71 mii(col), mii-1(rxerr)
73 mii(crs), sata0(prsnt)
79 mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col)
81 mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs)
100 mpp35 35 gpio, ge1(rxerr), sata0(act), mii(rxerr)
[all …]
/linux-6.6.21/include/linux/
Dmii.h33 extern int mii_link_ok (struct mii_if_info *mii);
34 extern int mii_nway_restart (struct mii_if_info *mii);
35 extern void mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
37 struct mii_if_info *mii, struct ethtool_link_ksettings *cmd);
38 extern int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
40 struct mii_if_info *mii, const struct ethtool_link_ksettings *cmd);
41 extern int mii_check_gmii_support(struct mii_if_info *mii);
42 extern void mii_check_link (struct mii_if_info *mii);
43 extern unsigned int mii_check_media (struct mii_if_info *mii,
/linux-6.6.21/Documentation/devicetree/bindings/net/pcs/
Drenesas,rzn1-miic.yaml56 "^mii-conv@[0-5]$":
147 mii_conv1: mii-conv@1 {
152 mii_conv2: mii-conv@2 {
157 mii_conv3: mii-conv@3 {
162 mii_conv4: mii-conv@4 {
167 mii_conv5: mii-conv@5 {
/linux-6.6.21/drivers/net/ethernet/smsc/
Depic100.c284 struct mii_if_info mii; member
372 ep->mii.dev = dev; in epic_init_one()
373 ep->mii.mdio_read = mdio_read; in epic_init_one()
374 ep->mii.mdio_write = mdio_write; in epic_init_one()
375 ep->mii.phy_id_mask = 0x1f; in epic_init_one()
376 ep->mii.reg_num_mask = 0x1f; in epic_init_one()
455 ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE); in epic_init_one()
459 ep->mii.advertising, mdio_read(dev, phy, 5)); in epic_init_one()
466 ep->mii.phy_id = ep->phys[0]; in epic_init_one()
476 ep->mii.force_media = ep->mii.full_duplex = 1; in epic_init_one()
[all …]
/linux-6.6.21/drivers/net/ethernet/sgi/
Dioc3-eth.c98 struct mii_if_info mii; member
559 if (ip->mii.full_duplex) { in ioc3_setup_duplex()
576 mii_check_media(&ip->mii, 1, 0); in ioc3_timer()
593 word = ioc3_mdio_read(ip->mii.dev, i, MII_PHYSID1); in ioc3_mii_init()
596 ip->mii.phy_id = i; in ioc3_mii_init()
600 ip->mii.phy_id = -1; in ioc3_mii_init()
907 ip->mii.phy_id_mask = 0x1f; in ioc3eth_probe()
908 ip->mii.reg_num_mask = 0x1f; in ioc3eth_probe()
909 ip->mii.dev = dev; in ioc3eth_probe()
910 ip->mii.mdio_read = ioc3_mdio_read; in ioc3eth_probe()
[all …]
/linux-6.6.21/drivers/net/ethernet/intel/
De100.c575 struct mii_if_info mii; member
964 u16 advert = mdio_read(nic->netdev, nic->mii.phy_id, in mdio_ctrl_phy_82552_v()
1062 nic->mii.phy_id_mask = 0x1F; in e100_get_defaults()
1063 nic->mii.reg_num_mask = 0x1F; in e100_get_defaults()
1064 nic->mii.dev = nic->netdev; in e100_get_defaults()
1065 nic->mii.mdio_read = mdio_read; in e100_get_defaults()
1066 nic->mii.mdio_write = mdio_write; in e100_get_defaults()
1108 if (nic->mii.force_media && nic->mii.full_duplex) in e100_configure()
1414 nic->mii.phy_id = 0; /* is this ok for an MII-less PHY? */ in e100_phy_check_without_mii()
1441 nic->mii.phy_id = (addr == 0) ? 1 : (addr == 1) ? 0 : addr; in e100_phy_init()
[all …]

12345678910