| /OK3568_Linux_fs/kernel/drivers/net/phy/ |
| H A D | mdio_device.c | 25 void mdio_device_free(struct mdio_device *mdiodev) in mdio_device_free() argument 27 put_device(&mdiodev->dev); in mdio_device_free() 38 struct mdio_device *mdiodev = to_mdio_device(dev); in mdio_device_bus_match() local 44 return strcmp(mdiodev->modalias, drv->name) == 0; in mdio_device_bus_match() 49 struct mdio_device *mdiodev; in mdio_device_create() local 52 mdiodev = kzalloc(sizeof(*mdiodev), GFP_KERNEL); in mdio_device_create() 53 if (!mdiodev) in mdio_device_create() 56 mdiodev->dev.release = mdio_device_release; in mdio_device_create() 57 mdiodev->dev.parent = &bus->dev; in mdio_device_create() 58 mdiodev->dev.bus = &mdio_bus_type; in mdio_device_create() [all …]
|
| H A D | mdio_bus.c | 43 static int mdiobus_register_gpiod(struct mdio_device *mdiodev) in mdiobus_register_gpiod() argument 46 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod() 48 if (IS_ERR(mdiodev->reset_gpio)) in mdiobus_register_gpiod() 49 return PTR_ERR(mdiodev->reset_gpio); in mdiobus_register_gpiod() 51 if (mdiodev->reset_gpio) in mdiobus_register_gpiod() 52 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); in mdiobus_register_gpiod() 57 static int mdiobus_register_reset(struct mdio_device *mdiodev) in mdiobus_register_reset() argument 61 reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy"); in mdiobus_register_reset() 65 mdiodev->reset_ctrl = reset; in mdiobus_register_reset() 70 int mdiobus_register_device(struct mdio_device *mdiodev) in mdiobus_register_device() argument [all …]
|
| H A D | xilinx_gmii2rgmii.c | 60 static int xgmiitorgmii_probe(struct mdio_device *mdiodev) in xgmiitorgmii_probe() argument 62 struct device *dev = &mdiodev->dev; in xgmiitorgmii_probe() 88 priv->mdio = mdiodev; in xgmiitorgmii_probe()
|
| /OK3568_Linux_fs/kernel/drivers/phy/broadcom/ |
| H A D | phy-bcm-ns2-pcie.c | 28 struct mdio_device *mdiodev = phy_get_drvdata(p); in ns2_pci_phy_init() local 32 rc = mdiobus_write(mdiodev->bus, mdiodev->addr, in ns2_pci_phy_init() 38 rc = mdiobus_write(mdiodev->bus, mdiodev->addr, in ns2_pci_phy_init() 46 dev_err(&mdiodev->dev, "Error %d writing to phy\n", rc); in ns2_pci_phy_init() 55 static int ns2_pci_phy_probe(struct mdio_device *mdiodev) in ns2_pci_phy_probe() argument 57 struct device *dev = &mdiodev->dev; in ns2_pci_phy_probe() 67 phy_set_drvdata(phy, mdiodev); in ns2_pci_phy_probe()
|
| H A D | phy-bcm-ns-usb3.c | 55 struct mdio_device *mdiodev; member 193 struct mdio_device *mdiodev = usb3->mdiodev; in bcm_ns_usb3_mdiodev_phy_write() local 195 return mdiobus_write(mdiodev->bus, mdiodev->addr, reg, value); in bcm_ns_usb3_mdiodev_phy_write() 198 static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev) in bcm_ns_usb3_mdio_probe() argument 200 struct device *dev = &mdiodev->dev; in bcm_ns_usb3_mdio_probe() 213 usb3->mdiodev = mdiodev; in bcm_ns_usb3_mdio_probe()
|
| /OK3568_Linux_fs/kernel/drivers/net/dsa/ |
| H A D | lan9303_mdio.c | 99 static int lan9303_mdio_probe(struct mdio_device *mdiodev) in lan9303_mdio_probe() argument 104 sw_dev = devm_kzalloc(&mdiodev->dev, sizeof(struct lan9303_mdio), in lan9303_mdio_probe() 109 sw_dev->chip.regmap = devm_regmap_init(&mdiodev->dev, NULL, sw_dev, in lan9303_mdio_probe() 113 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); in lan9303_mdio_probe() 118 sw_dev->device = mdiodev; in lan9303_mdio_probe() 119 dev_set_drvdata(&mdiodev->dev, sw_dev); in lan9303_mdio_probe() 120 sw_dev->chip.dev = &mdiodev->dev; in lan9303_mdio_probe() 124 ret = lan9303_probe(&sw_dev->chip, mdiodev->dev.of_node); in lan9303_mdio_probe() 128 dev_info(&mdiodev->dev, "LAN9303 MDIO driver loaded successfully\n"); in lan9303_mdio_probe() 133 static void lan9303_mdio_remove(struct mdio_device *mdiodev) in lan9303_mdio_remove() argument [all …]
|
| H A D | dsa_loop.c | 317 static int dsa_loop_drv_probe(struct mdio_device *mdiodev) in dsa_loop_drv_probe() argument 319 struct dsa_loop_pdata *pdata = mdiodev->dev.platform_data; in dsa_loop_drv_probe() 327 ds = devm_kzalloc(&mdiodev->dev, sizeof(*ds), GFP_KERNEL); in dsa_loop_drv_probe() 331 ds->dev = &mdiodev->dev; in dsa_loop_drv_probe() 334 ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL); in dsa_loop_drv_probe() 344 ds->dev = &mdiodev->dev; in dsa_loop_drv_probe() 348 ps->bus = mdiodev->bus; in dsa_loop_drv_probe() 350 dev_set_drvdata(&mdiodev->dev, ds); in dsa_loop_drv_probe() 354 dev_info(&mdiodev->dev, "%s: 0x%0x\n", in dsa_loop_drv_probe() 360 static void dsa_loop_drv_remove(struct mdio_device *mdiodev) in dsa_loop_drv_remove() argument [all …]
|
| H A D | mv88e6060.c | 257 static int mv88e6060_probe(struct mdio_device *mdiodev) in mv88e6060_probe() argument 259 struct device *dev = &mdiodev->dev; in mv88e6060_probe() 268 priv->bus = mdiodev->bus; in mv88e6060_probe() 269 priv->sw_addr = mdiodev->addr; in mv88e6060_probe() 292 static void mv88e6060_remove(struct mdio_device *mdiodev) in mv88e6060_remove() argument 294 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6060_remove()
|
| /OK3568_Linux_fs/kernel/drivers/net/dsa/b53/ |
| H A D | b53_mdio.c | 290 static int b53_mdio_probe(struct mdio_device *mdiodev) in b53_mdio_probe() argument 299 if (mdiodev->addr != BRCM_PSEUDO_PHY_ADDR && mdiodev->addr != 0) { in b53_mdio_probe() 300 dev_err(&mdiodev->dev, "leaving address %d to PHY\n", in b53_mdio_probe() 301 mdiodev->addr); in b53_mdio_probe() 306 phy_id = mdiobus_read(mdiodev->bus, 0, 2) << 16; in b53_mdio_probe() 307 phy_id |= mdiobus_read(mdiodev->bus, 0, 3); in b53_mdio_probe() 317 dev_err(&mdiodev->dev, "Unsupported device: 0x%08x\n", phy_id); in b53_mdio_probe() 329 strcmp(mdiodev->bus->name, "sf2 slave mii")) in b53_mdio_probe() 332 dev = b53_switch_alloc(&mdiodev->dev, &b53_mdio_ops, mdiodev->bus); in b53_mdio_probe() 338 dev->bus = mdiodev->bus; in b53_mdio_probe() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/net/mdio/ |
| H A D | of_mdio.c | 154 struct mdio_device *mdiodev; in of_mdiobus_register_device() local 157 mdiodev = mdio_device_create(mdio, addr); in of_mdiobus_register_device() 158 if (IS_ERR(mdiodev)) in of_mdiobus_register_device() 159 return PTR_ERR(mdiodev); in of_mdiobus_register_device() 165 mdiodev->dev.of_node = child; in of_mdiobus_register_device() 166 mdiodev->dev.fwnode = of_fwnode_handle(child); in of_mdiobus_register_device() 169 rc = mdio_device_register(mdiodev); in of_mdiobus_register_device() 171 mdio_device_free(mdiodev); in of_mdiobus_register_device() 373 struct mdio_device *mdiodev; in of_phy_find_device() local 375 mdiodev = of_mdio_find_device(phy_np); in of_phy_find_device() [all …]
|
| /OK3568_Linux_fs/kernel/include/linux/ |
| H A D | mdio.h | 41 void (*device_free)(struct mdio_device *mdiodev); 42 void (*device_remove)(struct mdio_device *mdiodev); 71 int (*probe)(struct mdio_device *mdiodev); 74 void (*remove)(struct mdio_device *mdiodev); 77 void (*shutdown)(struct mdio_device *mdiodev); 93 void mdio_device_free(struct mdio_device *mdiodev); 95 int mdio_device_register(struct mdio_device *mdiodev); 96 void mdio_device_remove(struct mdio_device *mdiodev); 97 void mdio_device_reset(struct mdio_device *mdiodev, int value); 370 int mdiobus_register_device(struct mdio_device *mdiodev); [all …]
|
| /OK3568_Linux_fs/u-boot/board/gdsys/mpc8308/ |
| H A D | strider.c | 183 struct mii_dev *mdiodev = mdio_alloc(); in last_stage_init() local 184 if (!mdiodev) in last_stage_init() 186 strncpy(mdiodev->name, bb_miiphy_buses[0].name, MDIO_NAME_LEN); in last_stage_init() 187 mdiodev->read = bb_miiphy_read; in last_stage_init() 188 mdiodev->write = bb_miiphy_write; in last_stage_init() 190 retval = mdio_register(mdiodev); in last_stage_init() 265 struct mii_dev *mdiodev = mdio_alloc(); in last_stage_init() local 266 if (!mdiodev) in last_stage_init() 268 strncpy(mdiodev->name, bb_miiphy_buses[k].name, in last_stage_init() 270 mdiodev->read = bb_miiphy_read; in last_stage_init() [all …]
|
| H A D | hrcon.c | 166 struct mii_dev *mdiodev = mdio_alloc(); in last_stage_init() local 167 if (!mdiodev) in last_stage_init() 169 strncpy(mdiodev->name, bb_miiphy_buses[0].name, MDIO_NAME_LEN); in last_stage_init() 170 mdiodev->read = bb_miiphy_read; in last_stage_init() 171 mdiodev->write = bb_miiphy_write; in last_stage_init() 173 retval = mdio_register(mdiodev); in last_stage_init() 212 struct mii_dev *mdiodev = mdio_alloc(); in last_stage_init() local 213 if (!mdiodev) in last_stage_init() 215 strncpy(mdiodev->name, bb_miiphy_buses[k].name, in last_stage_init() 217 mdiodev->read = bb_miiphy_read; in last_stage_init() [all …]
|
| /OK3568_Linux_fs/u-boot/scripts/coccinelle/net/ |
| H A D | mdio_register.cocci | 17 + struct mii_dev *mdiodev = mdio_alloc(); 18 + if (!mdiodev) return -ENOMEM; 19 + strncpy(mdiodev->name, devname, MDIO_NAME_LEN); 20 + mdiodev->read = readfunc; 21 + mdiodev->write = writefunc; 23 + retval = mdio_register(mdiodev);
|
| /OK3568_Linux_fs/u-boot/drivers/net/ |
| H A D | bcm-sf2-eth.c | 248 struct mii_dev *mdiodev = mdio_alloc(); in bcm_sf2_eth_register() local 250 if (!mdiodev) in bcm_sf2_eth_register() 252 strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN); in bcm_sf2_eth_register() 253 mdiodev->read = eth->miiphy_read; in bcm_sf2_eth_register() 254 mdiodev->write = eth->miiphy_write; in bcm_sf2_eth_register() 256 retval = mdio_register(mdiodev); in bcm_sf2_eth_register()
|
| H A D | smc911x.c | 287 struct mii_dev *mdiodev = mdio_alloc(); in smc911x_initialize() local 288 if (!mdiodev) in smc911x_initialize() 290 strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN); in smc911x_initialize() 291 mdiodev->read = smc911x_miiphy_read; in smc911x_initialize() 292 mdiodev->write = smc911x_miiphy_write; in smc911x_initialize() 294 retval = mdio_register(mdiodev); in smc911x_initialize()
|
| H A D | ravb.c | 475 struct mii_dev *mdiodev; in ravb_probe() local 486 mdiodev = mdio_alloc(); in ravb_probe() 487 if (!mdiodev) { in ravb_probe() 492 mdiodev->read = bb_miiphy_read; in ravb_probe() 493 mdiodev->write = bb_miiphy_write; in ravb_probe() 495 snprintf(mdiodev->name, sizeof(mdiodev->name), dev->name); in ravb_probe() 497 ret = mdio_register(mdiodev); in ravb_probe() 506 mdio_free(mdiodev); in ravb_probe()
|
| H A D | ftmac110.c | 475 struct mii_dev *mdiodev = mdio_alloc(); in ftmac110_initialize() local 476 if (!mdiodev) in ftmac110_initialize() 478 strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN); in ftmac110_initialize() 479 mdiodev->read = ftmac110_mdio_read; in ftmac110_initialize() 480 mdiodev->write = ftmac110_mdio_write; in ftmac110_initialize() 482 retval = mdio_register(mdiodev); in ftmac110_initialize()
|
| H A D | at91_emac.c | 506 struct mii_dev *mdiodev = mdio_alloc(); in at91emac_register() local 507 if (!mdiodev) in at91emac_register() 509 strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN); in at91emac_register() 510 mdiodev->read = at91emac_mii_read; in at91emac_register() 511 mdiodev->write = at91emac_mii_write; in at91emac_register() 513 retval = mdio_register(mdiodev); in at91emac_register()
|
| H A D | lpc32xx_eth.c | 633 struct mii_dev *mdiodev = mdio_alloc(); in lpc32xx_eth_initialize() local 634 if (!mdiodev) in lpc32xx_eth_initialize() 636 strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN); in lpc32xx_eth_initialize() 637 mdiodev->read = mii_reg_read; in lpc32xx_eth_initialize() 638 mdiodev->write = mii_reg_write; in lpc32xx_eth_initialize() 640 retval = mdio_register(mdiodev); in lpc32xx_eth_initialize()
|
| /OK3568_Linux_fs/kernel/drivers/net/dsa/qca/ |
| H A D | ar9331.c | 803 static int ar9331_sw_probe(struct mdio_device *mdiodev) in ar9331_sw_probe() argument 809 priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL); in ar9331_sw_probe() 813 priv->regmap = devm_regmap_init(&mdiodev->dev, &ar9331_sw_bus, priv, in ar9331_sw_probe() 817 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); in ar9331_sw_probe() 821 priv->sw_reset = devm_reset_control_get(&mdiodev->dev, "switch"); in ar9331_sw_probe() 823 dev_err(&mdiodev->dev, "missing switch reset\n"); in ar9331_sw_probe() 827 priv->sbus = mdiodev->bus; in ar9331_sw_probe() 828 priv->dev = &mdiodev->dev; in ar9331_sw_probe() 835 ds->dev = &mdiodev->dev; in ar9331_sw_probe() 840 dev_set_drvdata(&mdiodev->dev, priv); in ar9331_sw_probe() [all …]
|
| /OK3568_Linux_fs/u-boot/arch/mips/mach-au1x00/ |
| H A D | au1x00_eth.c | 294 struct mii_dev *mdiodev = mdio_alloc(); in au1x00_enet_initialize() local 295 if (!mdiodev) in au1x00_enet_initialize() 297 strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN); in au1x00_enet_initialize() 298 mdiodev->read = au1x00_miiphy_read; in au1x00_enet_initialize() 299 mdiodev->write = au1x00_miiphy_write; in au1x00_enet_initialize() 301 retval = mdio_register(mdiodev); in au1x00_enet_initialize()
|
| /OK3568_Linux_fs/u-boot/board/gdsys/a38x/ |
| H A D | ihs_phys.c | 106 struct mii_dev *mdiodev = mdio_alloc(); in register_miiphy_bus() local 109 if (!mdiodev) in register_miiphy_bus() 111 strncpy(mdiodev->name, in register_miiphy_bus() 114 mdiodev->read = bb_miiphy_read; in register_miiphy_bus() 115 mdiodev->write = bb_miiphy_write; in register_miiphy_bus() 117 retval = mdio_register(mdiodev); in register_miiphy_bus()
|
| /OK3568_Linux_fs/u-boot/arch/powerpc/cpu/mpc85xx/ |
| H A D | ether_fcc.c | 445 struct mii_dev *mdiodev = mdio_alloc(); in fec_initialize() local 446 if (!mdiodev) in fec_initialize() 448 strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN); in fec_initialize() 449 mdiodev->read = bb_miiphy_read; in fec_initialize() 450 mdiodev->write = bb_miiphy_write; in fec_initialize() 452 retval = mdio_register(mdiodev); in fec_initialize()
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/freescale/dpaa2/ |
| H A D | dpaa2-mac.c | 260 struct mdio_device *mdiodev; in dpaa2_pcs_create() local 276 mdiodev = of_mdio_find_device(node); in dpaa2_pcs_create() 278 if (!mdiodev) in dpaa2_pcs_create() 281 mac->pcs = lynx_pcs_create(mdiodev); in dpaa2_pcs_create() 284 put_device(&mdiodev->dev); in dpaa2_pcs_create()
|