/drivers/net/ |
D | mdio.c | 26 int mdio45_probe(struct mdio_if_info *mdio, int prtad) in mdio45_probe() argument 34 stat2 = mdio->mdio_read(mdio->dev, prtad, mmd, MDIO_STAT2); in mdio45_probe() 40 devs1 = mdio->mdio_read(mdio->dev, prtad, mmd, MDIO_DEVS1); in mdio45_probe() 41 devs2 = mdio->mdio_read(mdio->dev, prtad, mmd, MDIO_DEVS2); in mdio45_probe() 45 mdio->prtad = prtad; in mdio45_probe() 46 mdio->mmds = devs1 | (devs2 << 16); in mdio45_probe() 66 int mdio_set_flag(const struct mdio_if_info *mdio, in mdio_set_flag() argument 70 int old_val = mdio->mdio_read(mdio->dev, prtad, devad, addr); in mdio_set_flag() 81 return mdio->mdio_write(mdio->dev, prtad, devad, addr, new_val); in mdio_set_flag() 94 int mdio45_links_ok(const struct mdio_if_info *mdio, u32 mmd_mask) in mdio45_links_ok() argument [all …]
|
/drivers/net/mdio/ |
D | Makefile | 6 obj-$(CONFIG_MDIO_ASPEED) += mdio-aspeed.o 7 obj-$(CONFIG_MDIO_BCM_IPROC) += mdio-bcm-iproc.o 8 obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o 9 obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o 10 obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium.o 11 obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o 12 obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o 13 obj-$(CONFIG_MDIO_I2C) += mdio-i2c.o 14 obj-$(CONFIG_MDIO_IPQ4019) += mdio-ipq4019.o 15 obj-$(CONFIG_MDIO_IPQ8064) += mdio-ipq8064.o [all …]
|
D | of_mdio.c | 63 int of_mdiobus_phy_device_register(struct mii_bus *mdio, struct phy_device *phy, in of_mdiobus_phy_device_register() argument 74 mdio->irq[addr] = rc; in of_mdiobus_phy_device_register() 76 phy->irq = mdio->irq[addr]; in of_mdiobus_phy_device_register() 80 mdio->phy_ignore_ta_mask |= 1 << addr; in of_mdiobus_phy_device_register() 83 &phy->mdio.reset_assert_delay); in of_mdiobus_phy_device_register() 85 &phy->mdio.reset_deassert_delay); in of_mdiobus_phy_device_register() 90 phy->mdio.dev.of_node = child; in of_mdiobus_phy_device_register() 91 phy->mdio.dev.fwnode = of_fwnode_handle(child); in of_mdiobus_phy_device_register() 101 dev_dbg(&mdio->dev, "registered phy %pOFn at address %i\n", in of_mdiobus_phy_device_register() 107 static int of_mdiobus_register_phy(struct mii_bus *mdio, in of_mdiobus_register_phy() argument [all …]
|
D | mdio-mvusb.c | 27 struct mii_bus *mdio; member 32 static int mvusb_mdio_read(struct mii_bus *mdio, int dev, int reg) in mvusb_mdio_read() argument 34 struct mvusb_mdio *mvusb = mdio->priv; in mvusb_mdio_read() 55 static int mvusb_mdio_write(struct mii_bus *mdio, int dev, int reg, u16 val) in mvusb_mdio_write() argument 57 struct mvusb_mdio *mvusb = mdio->priv; in mvusb_mdio_write() 75 struct mii_bus *mdio; in mvusb_mdio_probe() local 78 mdio = devm_mdiobus_alloc_size(dev, sizeof(*mvusb)); in mvusb_mdio_probe() 79 if (!mdio) in mvusb_mdio_probe() 82 mvusb = mdio->priv; in mvusb_mdio_probe() 83 mvusb->mdio = mdio; in mvusb_mdio_probe() [all …]
|
D | mdio-gpio.c | 32 struct gpio_desc *mdc, *mdio, *mdo; member 43 bitbang->mdio = devm_gpiod_get_index(dev, NULL, MDIO_GPIO_MDIO, in mdio_gpio_get_data() 45 if (IS_ERR(bitbang->mdio)) in mdio_gpio_get_data() 46 return PTR_ERR(bitbang->mdio); in mdio_gpio_get_data() 69 gpiod_direction_output(bitbang->mdio, 1); in mdio_dir() 71 gpiod_direction_input(bitbang->mdio); in mdio_dir() 79 return gpiod_get_value_cansleep(bitbang->mdio); in mdio_get() 90 gpiod_set_value_cansleep(bitbang->mdio, what); in mdio_set()
|
/drivers/net/ethernet/chelsio/cxgb/ |
D | cphy.h | 105 struct mdio_if_info mdio; member 113 int rc = cphy->mdio.mdio_read(cphy->mdio.dev, cphy->mdio.prtad, mmd, in cphy_mdio_read() 122 return cphy->mdio.mdio_write(cphy->mdio.dev, cphy->mdio.prtad, mmd, in cphy_mdio_write() 147 phy->mdio.prtad = phy_addr; in cphy_init() 148 phy->mdio.mmds = phy_ops->mmds; in cphy_init() 149 phy->mdio.mode_support = mdio_ops->mode_support; in cphy_init() 150 phy->mdio.mdio_read = mdio_ops->read; in cphy_init() 151 phy->mdio.mdio_write = mdio_ops->write; in cphy_init() 153 phy->mdio.dev = dev; in cphy_init()
|
/drivers/net/usb/ |
D | ax88172a.c | 19 struct mii_bus *mdio; member 80 priv->mdio = mdiobus_alloc(); in ax88172a_init_mdio() 81 if (!priv->mdio) { in ax88172a_init_mdio() 86 priv->mdio->priv = (void *)dev; in ax88172a_init_mdio() 87 priv->mdio->read = &asix_mdio_bus_read; in ax88172a_init_mdio() 88 priv->mdio->write = &asix_mdio_bus_write; in ax88172a_init_mdio() 89 priv->mdio->name = "Asix MDIO Bus"; in ax88172a_init_mdio() 91 snprintf(priv->mdio->id, MII_BUS_ID_SIZE, "usb-%03d:%03d", in ax88172a_init_mdio() 94 ret = mdiobus_register(priv->mdio); in ax88172a_init_mdio() 100 netdev_info(dev->net, "registered mdio bus %s\n", priv->mdio->id); in ax88172a_init_mdio() [all …]
|
/drivers/net/pcs/ |
D | pcs-lynx.c | 88 phylink_mii_c22_pcs_get_state(lynx->mdio, state); in lynx_pcs_get_state() 91 lynx_pcs_get_state_2500basex(lynx->mdio, state); in lynx_pcs_get_state() 94 lynx_pcs_get_state_usxgmii(lynx->mdio, state); in lynx_pcs_get_state() 97 phylink_mii_c45_pcs_get_state(lynx->mdio, state); in lynx_pcs_get_state() 103 dev_dbg(&lynx->mdio->dev, in lynx_pcs_get_state() 168 return lynx_pcs_config_sgmii(lynx->mdio, mode, advertising); in lynx_pcs_config() 171 dev_err(&lynx->mdio->dev, in lynx_pcs_config() 177 return lynx_pcs_config_usxgmii(lynx->mdio, mode, advertising); in lynx_pcs_config() 275 lynx_pcs_link_up_sgmii(lynx->mdio, mode, speed, duplex); in lynx_pcs_link_up() 278 lynx_pcs_link_up_2500basex(lynx->mdio, mode, speed, duplex); in lynx_pcs_link_up() [all …]
|
/drivers/net/phy/ |
D | icplus.c | 72 err = mdiobus_write(phydev->mdio.bus, 30, 0, 0x175c); in ip175c_config_init() 77 err = mdiobus_read(phydev->mdio.bus, 30, 0); in ip175c_config_init() 83 err = mdiobus_write(phydev->mdio.bus, 29, 31, 0x175c); in ip175c_config_init() 88 err = mdiobus_write(phydev->mdio.bus, 29, 22, 0x420); in ip175c_config_init() 94 err = mdiobus_write(phydev->mdio.bus, i, in ip175c_config_init() 101 err = mdiobus_read(phydev->mdio.bus, i, MII_BMCR); in ip175c_config_init() 108 if (phydev->mdio.addr != 4) { in ip175c_config_init() 183 if (phydev->mdio.addr == 4) /* WAN port */ in ip175c_read_status() 194 if (phydev->mdio.addr == 4) /* WAN port */ in ip175c_config_aneg() 202 struct device *dev = &phydev->mdio.dev; in ip101a_g_probe() [all …]
|
D | xilinx_gmii2rgmii.c | 27 struct mdio_device *mdio; member 32 struct gmii2rgmii *priv = mdiodev_get_drvdata(&phydev->mdio); in xgmiitorgmii_read_status() 33 struct mii_bus *bus = priv->mdio->bus; in xgmiitorgmii_read_status() 34 int addr = priv->mdio->addr; in xgmiitorgmii_read_status() 85 put_device(&priv->phy_dev->mdio.dev); in xgmiitorgmii_probe() 89 priv->mdio = mdiodev; in xgmiitorgmii_probe() 94 mdiodev_set_drvdata(&priv->phy_dev->mdio, priv); in xgmiitorgmii_probe()
|
D | phy_led_triggers.c | 64 phy->mdio.bus->id, phy->mdio.addr, suffix); in phy_led_trigger_format_name() 94 phy->led_link_trigger = devm_kzalloc(&phy->mdio.dev, in phy_led_triggers_register() 111 phy->phy_led_triggers = devm_kcalloc(&phy->mdio.dev, in phy_led_triggers_register() 134 devm_kfree(&phy->mdio.dev, phy->phy_led_triggers); in phy_led_triggers_register() 138 devm_kfree(&phy->mdio.dev, phy->led_link_trigger); in phy_led_triggers_register()
|
D | bcm54140.c | 419 hwmon = devm_hwmon_device_register_with_info(&phydev->mdio.dev, in bcm54140_probe_once() 499 struct mii_bus *bus = phydev->mdio.bus; in bcm54140_get_base_addr_and_port() 505 min_addr = phydev->mdio.addr; in bcm54140_get_base_addr_and_port() 506 max_addr = phydev->mdio.addr; in bcm54140_get_base_addr_and_port() 507 addr = phydev->mdio.addr; in bcm54140_get_base_addr_and_port() 531 addr = phydev->mdio.addr; in bcm54140_get_base_addr_and_port() 549 addr = phydev->mdio.addr; in bcm54140_get_base_addr_and_port() 559 dev_err(&phydev->mdio.dev, in bcm54140_get_base_addr_and_port() 565 priv->port = (phydev->mdio.addr - min_addr) % 4; in bcm54140_get_base_addr_and_port() 566 priv->base_addr = phydev->mdio.addr - priv->port; in bcm54140_get_base_addr_and_port() [all …]
|
D | mdio_devres.c | 106 int devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio, in devm_of_mdiobus_register() argument 113 mdiobus_devres_match, mdio))) in devm_of_mdiobus_register() 120 ret = of_mdiobus_register(mdio, np); in devm_of_mdiobus_register() 126 dr->mii = mdio; in devm_of_mdiobus_register()
|
D | fixed_phy.c | 54 if (!phydev || !phydev->mdio.bus) in fixed_phy_change_carrier() 58 if (fp->addr == phydev->mdio.addr) { in fixed_phy_change_carrier() 118 if (!phydev || !phydev->mdio.bus) in fixed_phy_set_link_update() 122 if (fp->addr == phydev->mdio.addr) { in fixed_phy_set_link_update() 273 phy->mdio.dev.of_node = np; in __fixed_phy_register() 330 of_node_put(phy->mdio.dev.of_node); in fixed_phy_unregister() 331 fixed_phy_del(phy->mdio.addr); in fixed_phy_unregister()
|
D | phy_device.c | 203 put_device(&phydev->mdio.dev); in phy_device_free() 211 phydev = container_of(mdiodev, struct phy_device, mdio); in phy_mdio_device_free() 224 phydev = container_of(mdiodev, struct phy_device, mdio); in phy_mdio_device_remove() 235 struct device_driver *drv = phydev->mdio.dev.driver; in mdio_bus_phy_may_suspend() 563 mdiodev = &dev->mdio; in phy_device_create() 868 err = mdiobus_register_device(&phydev->mdio); in phy_device_register() 882 err = device_add(&phydev->mdio.dev); in phy_device_register() 894 mdiobus_unregister_device(&phydev->mdio); in phy_device_register() 912 device_del(&phydev->mdio.dev); in phy_device_remove() 917 mdiobus_unregister_device(&phydev->mdio); in phy_device_remove() [all …]
|
D | marvell10g.c | 213 struct device *dev = &phydev->mdio.dev; in mv3310_hwmon_probe() 214 struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev); in mv3310_hwmon_probe() 260 struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev); in mv3310_power_up() 359 dev_err(&phydev->mdio.dev, "incompatible SFP module inserted\n"); in mv3310_sfp_insert() 386 dev_warn(&phydev->mdio.dev, in mv3310_probe() 391 priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); in mv3310_probe() 395 dev_set_drvdata(&phydev->mdio.dev, priv); in mv3310_probe() 465 struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev); in mv3310_config_init() 596 struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev); in mv3310_update_interface() 816 MODULE_DEVICE_TABLE(mdio, mv3310_tbl);
|
D | cortina.c | 20 return mdiobus_c45_read(phydev->mdio.bus, phydev->mdio.addr, 0, regnum); in cortina_read_reg() 95 MODULE_DEVICE_TABLE(mdio, cortina_tbl);
|
/drivers/net/dsa/ |
D | realtek-smi-core.c | 60 gpiod_direction_output(smi->mdio, 1); in realtek_smi_start() 72 gpiod_set_value(smi->mdio, 0); in realtek_smi_start() 76 gpiod_set_value(smi->mdio, 1); in realtek_smi_start() 82 gpiod_set_value(smi->mdio, 0); in realtek_smi_stop() 85 gpiod_set_value(smi->mdio, 1); in realtek_smi_stop() 100 gpiod_direction_input(smi->mdio); in realtek_smi_stop() 110 gpiod_set_value(smi->mdio, !!(data & (1 << (len - 1)))); in realtek_smi_write_bits() 122 gpiod_direction_input(smi->mdio); in realtek_smi_read_bits() 132 u = !!gpiod_get_value(smi->mdio); in realtek_smi_read_bits() 138 gpiod_direction_output(smi->mdio, 0); in realtek_smi_read_bits() [all …]
|
D | lan9303_mdio.c | 25 static void lan9303_mdio_real_write(struct mdio_device *mdio, int reg, u16 val) in lan9303_mdio_real_write() argument 27 mdio->bus->write(mdio->bus, PHY_ADDR(reg), PHY_REG(reg), val); in lan9303_mdio_real_write() 43 static u16 lan9303_mdio_real_read(struct mdio_device *mdio, int reg) in lan9303_mdio_real_read() argument 45 return mdio->bus->read(mdio->bus, PHY_ADDR(reg), PHY_REG(reg)); in lan9303_mdio_real_read()
|
/drivers/net/ethernet/sfc/falcon/ |
D | mdio_10g.h | 24 return efx->mdio.mdio_read(efx->net_dev, efx->mdio.prtad, devad, addr); in ef4_mdio_read() 30 efx->mdio.mdio_write(efx->net_dev, efx->mdio.prtad, devad, addr, value); in ef4_mdio_write() 102 mdio_set_flag(&efx->mdio, efx->mdio.prtad, devad, addr, mask, state); in ef4_mdio_set_flag()
|
D | mdio_10g.c | 175 return mdio45_links_ok(&efx->mdio, mmd_mask); in ef4_mdio_links_ok() 277 WARN_ON(!(efx->mdio.mmds & MDIO_DEVS_AN)); in ef4_mdio_an_reconfigure() 303 WARN_ON(!(efx->mdio.mmds & MDIO_DEVS_AN)); in ef4_mdio_get_pause() 313 int devad = __ffs(efx->mdio.mmds); in ef4_mdio_test_alive() 324 "no MDIO PHY present with ID %d\n", efx->mdio.prtad); in ef4_mdio_test_alive() 327 rc = ef4_mdio_check_mmds(efx, efx->mdio.mmds); in ef4_mdio_test_alive()
|
/drivers/net/ethernet/chelsio/cxgb3/ |
D | aq100x.c | 75 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()
|
D | common.h | 556 struct mdio_if_info mdio; member 564 int rc = phy->mdio.mdio_read(phy->mdio.dev, phy->mdio.prtad, mmd, reg); in t3_mdio_read() 572 return phy->mdio.mdio_write(phy->mdio.dev, phy->mdio.prtad, mmd, in t3_mdio_write() 587 phy->mdio.prtad = phy_addr; in cphy_init() 588 phy->mdio.mmds = phy_ops->mmds; in cphy_init() 589 phy->mdio.mode_support = mdio_ops->mode_support; in cphy_init() 590 phy->mdio.mdio_read = mdio_ops->read; in cphy_init() 591 phy->mdio.mdio_write = mdio_ops->write; in cphy_init()
|
/drivers/net/ethernet/altera/ |
D | altera_tse_main.c | 146 struct mii_bus *mdio = NULL; in altera_tse_mdio_create() local 163 mdio = mdiobus_alloc(); in altera_tse_mdio_create() 164 if (mdio == NULL) { in altera_tse_mdio_create() 170 mdio->name = ALTERA_TSE_RESOURCE_NAME; in altera_tse_mdio_create() 171 mdio->read = &altera_tse_mdio_read; in altera_tse_mdio_create() 172 mdio->write = &altera_tse_mdio_write; in altera_tse_mdio_create() 173 snprintf(mdio->id, MII_BUS_ID_SIZE, "%s-%u", mdio->name, id); in altera_tse_mdio_create() 175 mdio->priv = dev; in altera_tse_mdio_create() 176 mdio->parent = priv->device; in altera_tse_mdio_create() 178 ret = of_mdiobus_register(mdio, mdio_node); in altera_tse_mdio_create() [all …]
|
/drivers/net/ethernet/ |
D | ethoc.c | 219 struct mii_bus *mdio; member 706 phy = mdiobus_get_phy(priv->mdio, priv->phy_id); in ethoc_mdio_probe() 708 phy = phy_find_first(priv->mdio); in ethoc_mdio_probe() 787 struct mii_ioctl_data *mdio = if_mii(ifr); in ethoc_ioctl() local 794 if (mdio->phy_id >= PHY_MAX_ADDR) in ethoc_ioctl() 797 phy = mdiobus_get_phy(priv->mdio, mdio->phy_id); in ethoc_ioctl() 1198 priv->mdio = mdiobus_alloc(); in ethoc_probe() 1199 if (!priv->mdio) { in ethoc_probe() 1204 priv->mdio->name = "ethoc-mdio"; in ethoc_probe() 1205 snprintf(priv->mdio->id, MII_BUS_ID_SIZE, "%s-%d", in ethoc_probe() [all …]
|