Home
last modified time | relevance | path

Searched refs:mdio (Results 1 – 25 of 56) sorted by relevance

123

/drivers/net/
Dmdio.c29 int mdio45_probe(struct mdio_if_info *mdio, int prtad) in mdio45_probe() argument
37 stat2 = mdio->mdio_read(mdio->dev, prtad, mmd, MDIO_STAT2); in mdio45_probe()
43 devs1 = mdio->mdio_read(mdio->dev, prtad, mmd, MDIO_DEVS1); in mdio45_probe()
44 devs2 = mdio->mdio_read(mdio->dev, prtad, mmd, MDIO_DEVS2); in mdio45_probe()
48 mdio->prtad = prtad; in mdio45_probe()
49 mdio->mmds = devs1 | (devs2 << 16); in mdio45_probe()
69 int mdio_set_flag(const struct mdio_if_info *mdio, in mdio_set_flag() argument
73 int old_val = mdio->mdio_read(mdio->dev, prtad, devad, addr); in mdio_set_flag()
84 return mdio->mdio_write(mdio->dev, prtad, devad, addr, new_val); in mdio_set_flag()
97 int mdio45_links_ok(const struct mdio_if_info *mdio, u32 mmd_mask) in mdio45_links_ok() argument
[all …]
/drivers/of/
Dof_mdio.c33 int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) in of_mdiobus_register() argument
41 mdio->phy_mask = ~0; in of_mdiobus_register()
44 if (mdio->irq) in of_mdiobus_register()
46 mdio->irq[i] = PHY_POLL; in of_mdiobus_register()
49 rc = mdiobus_register(mdio); in of_mdiobus_register()
62 dev_err(&mdio->dev, "%s has invalid PHY address\n", in of_mdiobus_register()
69 dev_err(&mdio->dev, "%s PHY address %i is too large\n", in of_mdiobus_register()
74 if (mdio->irq) { in of_mdiobus_register()
75 mdio->irq[addr] = irq_of_parse_and_map(child, 0); in of_mdiobus_register()
76 if (!mdio->irq[addr]) in of_mdiobus_register()
[all …]
/drivers/net/ethernet/chelsio/cxgb/
Dcphy.h106 struct mdio_if_info mdio; member
114 int rc = cphy->mdio.mdio_read(cphy->mdio.dev, cphy->mdio.prtad, mmd, in cphy_mdio_read()
123 return cphy->mdio.mdio_write(cphy->mdio.dev, cphy->mdio.prtad, mmd, in cphy_mdio_write()
148 phy->mdio.prtad = phy_addr; in cphy_init()
149 phy->mdio.mmds = phy_ops->mmds; in cphy_init()
150 phy->mdio.mode_support = mdio_ops->mode_support; in cphy_init()
151 phy->mdio.mdio_read = mdio_ops->read; in cphy_init()
152 phy->mdio.mdio_write = mdio_ops->write; in cphy_init()
154 phy->mdio.dev = dev; in cphy_init()
/drivers/net/phy/
Dmdio-gpio.c39 int mdc, mdio; member
48 gpio_direction_output(bitbang->mdio, 1); in mdio_dir()
50 gpio_direction_input(bitbang->mdio); in mdio_dir()
58 return gpio_get_value(bitbang->mdio); in mdio_get()
66 gpio_set_value(bitbang->mdio, what); in mdio_set()
100 bitbang->mdio = pdata->mdio; in mdio_gpio_bus_init()
124 if (gpio_request(bitbang->mdio, "mdio")) in mdio_gpio_bus_init()
149 gpio_free(bitbang->mdio); in mdio_gpio_bus_deinit()
210 pdata->mdio = ret; in mdio_ofgpio_probe()
DMakefile19 obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
20 obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o
25 obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o
Drealtek.c88 MODULE_DEVICE_TABLE(mdio, realtek_tbl);
Damd.c102 MODULE_DEVICE_TABLE(mdio, amd_tbl);
Dqsemi.c146 MODULE_DEVICE_TABLE(mdio, qs6612_tbl);
Det1011c.c119 MODULE_DEVICE_TABLE(mdio, et1011c_tbl);
/drivers/net/ethernet/sfc/
Dmdio_10g.h27 return efx->mdio.mdio_read(efx->net_dev, efx->mdio.prtad, devad, addr); in efx_mdio_read()
33 efx->mdio.mdio_write(efx->net_dev, efx->mdio.prtad, devad, addr, value); in efx_mdio_write()
106 mdio_set_flag(&efx->mdio, efx->mdio.prtad, devad, addr, mask, state); in efx_mdio_set_flag()
Dmdio_10g.c178 return mdio45_links_ok(&efx->mdio, mmd_mask); in efx_mdio_links_ok()
268 WARN_ON(!(efx->mdio.mmds & MDIO_DEVS_AN)); in efx_mdio_an_reconfigure()
294 WARN_ON(!(efx->mdio.mmds & MDIO_DEVS_AN)); in efx_mdio_get_pause()
304 int devad = __ffs(efx->mdio.mmds); in efx_mdio_test_alive()
315 "no MDIO PHY present with ID %d\n", efx->mdio.prtad); in efx_mdio_test_alive()
318 rc = efx_mdio_check_mmds(efx, efx->mdio.mmds); in efx_mdio_test_alive()
Dqt202x_phy.c354 efx->mdio.mmds = QT202X_REQUIRED_DEVS; in qt202x_phy_probe()
355 efx->mdio.mode_support = MDIO_SUPPORTS_C45 | MDIO_EMULATE_C22; in qt202x_phy_probe()
418 &efx->mdio, efx->mdio.prtad, MDIO_MMD_PMAPMD, in qt202x_phy_reconfigure()
442 mdio45_ethtool_gset(&efx->mdio, ecmd); in qt202x_phy_get_settings()
Dmcdi_phy.c335 efx->mdio.prtad = phy_data->port; in efx_mcdi_phy_probe()
336 efx->mdio.mmds = phy_data->mmd_mask & ~(1 << MC_CMD_MMD_CLAUSE22); in efx_mcdi_phy_probe()
337 efx->mdio.mode_support = 0; in efx_mcdi_phy_probe()
339 efx->mdio.mode_support |= MDIO_SUPPORTS_C22; in efx_mcdi_phy_probe()
341 efx->mdio.mode_support |= MDIO_SUPPORTS_C45 | MDIO_EMULATE_C22; in efx_mcdi_phy_probe()
522 ecmd->mdio_support = (efx->mdio.mode_support & in efx_mcdi_phy_get_settings()
Dtenxpress.c177 efx->mdio.mmds = TENXPRESS_REQUIRED_DEVS; in tenxpress_phy_probe()
178 efx->mdio.mode_support = MDIO_SUPPORTS_C45; in tenxpress_phy_probe()
458 mdio45_ethtool_gset_npage(&efx->mdio, ecmd, adv, lpa); in tenxpress_get_settings()
Dtxc43128_phy.c335 efx->mdio.mmds = TXC_REQUIRED_DEVS; in txc43128_phy_probe()
336 efx->mdio.mode_support = MDIO_SUPPORTS_C45 | MDIO_EMULATE_C22; in txc43128_phy_probe()
545 mdio45_ethtool_gset(&efx->mdio, ecmd); in txc43128_get_settings()
Dsiena.c99 efx->mdio.mode_support = MDIO_SUPPORTS_C45 | MDIO_EMULATE_C22; in siena_probe_port()
100 efx->mdio.mdio_read = siena_mdio_read; in siena_probe_port()
101 efx->mdio.mdio_write = siena_mdio_write; in siena_probe_port()
340 efx->mdio.prtad = MDIO_PRTAD_NONE; in siena_probe_nic()
/drivers/net/ethernet/
Dethoc.c218 struct mii_bus *mdio; member
675 phy = priv->mdio->phy_map[priv->phy_id]; in ethoc_mdio_probe()
677 phy = phy_find_first(priv->mdio); in ethoc_mdio_probe()
749 struct mii_ioctl_data *mdio = if_mii(ifr); in ethoc_ioctl() local
756 if (mdio->phy_id >= PHY_MAX_ADDR) in ethoc_ioctl()
759 phy = priv->mdio->phy_map[mdio->phy_id]; in ethoc_ioctl()
1074 priv->mdio = mdiobus_alloc(); in ethoc_probe()
1075 if (!priv->mdio) { in ethoc_probe()
1080 priv->mdio->name = "ethoc-mdio"; in ethoc_probe()
1081 snprintf(priv->mdio->id, MII_BUS_ID_SIZE, "%s-%d", in ethoc_probe()
[all …]
/drivers/net/ethernet/chelsio/cxgb3/
Daq100x.c75 phy->mdio.prtad, err); in aq100x_reset()
122 return mdio_set_flag(&phy->mdio, phy->mdio.prtad, in aq100x_power_down()
133 err = mdio_set_flag(&phy->mdio, phy->mdio.prtad, in aq100x_autoneg_enable()
146 err = mdio_set_flag(&phy->mdio, phy->mdio.prtad, in aq100x_autoneg_restart()
196 return mdio_set_flag(&phy->mdio, phy->mdio.prtad, in aq100x_set_loopback()
Dcommon.h558 struct mdio_if_info mdio; member
566 int rc = phy->mdio.mdio_read(phy->mdio.dev, phy->mdio.prtad, mmd, reg); in t3_mdio_read()
574 return phy->mdio.mdio_write(phy->mdio.dev, phy->mdio.prtad, mmd, in t3_mdio_write()
589 phy->mdio.prtad = phy_addr; in cphy_init()
590 phy->mdio.mmds = phy_ops->mmds; in cphy_init()
591 phy->mdio.mode_support = mdio_ops->mode_support; in cphy_init()
592 phy->mdio.mdio_read = mdio_ops->read; in cphy_init()
593 phy->mdio.mdio_write = mdio_ops->write; in cphy_init()
Dael1002.c103 phy->mdio.prtad == 0 ? F_GPIO7_OUT_VAL : F_GPIO2_OUT_VAL; in ael100x_txon()
137 phy->mdio.prtad, dev_addr, word_addr); in ael_i2c_rd()
147 err = mdio_set_flag(&phy->mdio, phy->mdio.prtad, in ael1002_power_down()
886 phy->mdio.prtad = 1; in t3_qt2045_phy_prep()
900 int prtad = phy->mdio.prtad; in xaui_direct_get_link_status()
/drivers/net/ethernet/aeroflex/
Dgreth.c1171 while (GRETH_REGLOAD(greth->regs->mdio) & GRETH_MII_BUSY) { in wait_for_mdio()
1186 GRETH_REGSAVE(greth->regs->mdio, ((phy & 0x1F) << 11) | ((reg & 0x1F) << 6) | 2); in greth_mdio_read()
1191 if (!(GRETH_REGLOAD(greth->regs->mdio) & GRETH_MII_NVALID)) { in greth_mdio_read()
1192 data = (GRETH_REGLOAD(greth->regs->mdio) >> 16) & 0xFFFF; in greth_mdio_read()
1207 GRETH_REGSAVE(greth->regs->mdio, in greth_mdio_write()
1281 phy = phy_find_first(greth->mdio); in greth_mdio_probe()
1328 greth->mdio = mdiobus_alloc(); in greth_mdio_init()
1329 if (!greth->mdio) { in greth_mdio_init()
1333 greth->mdio->name = "greth-mdio"; in greth_mdio_init()
1334 snprintf(greth->mdio->id, MII_BUS_ID_SIZE, "%s-%d", greth->mdio->name, greth->irq); in greth_mdio_init()
[all …]
Dgreth.h86 u32 mdio; member
127 struct mii_bus *mdio; member
/drivers/net/ethernet/freescale/fs_enet/
Dmii-bitbang.c77 static inline void mdio(struct mdiobb_ctrl *ctrl, int what) in mdio() function
107 .set_mdio_data = mdio,
/drivers/net/ethernet/intel/ixgbe/
Dixgbe_phy.c64 hw->phy.mdio.prtad = phy_addr; in ixgbe_identify_phy_generic()
65 if (mdio45_probe(&hw->phy.mdio, phy_addr) == 0) { in ixgbe_identify_phy_generic()
91 hw->phy.mdio.prtad = 0; in ixgbe_identify_phy_generic()
233 (hw->phy.mdio.prtad << IXGBE_MSCA_PHY_ADDR_SHIFT) | in ixgbe_read_phy_reg_generic()
264 (hw->phy.mdio.prtad << in ixgbe_read_phy_reg_generic()
334 (hw->phy.mdio.prtad << IXGBE_MSCA_PHY_ADDR_SHIFT) | in ixgbe_write_phy_reg_generic()
365 (hw->phy.mdio.prtad << in ixgbe_write_phy_reg_generic()
/drivers/staging/octeon/
DMakefile15 octeon-ethernet-y += ethernet-mdio.o

123