• Home
  • Raw
  • Download

Lines Matching refs:ax

322 	struct ax_device  *ax = to_ax_dev(dev);  in ax_handle_link_change()  local
323 struct phy_device *phy_dev = ax->phy_dev; in ax_handle_link_change()
326 if (phy_dev->link && ((ax->speed != phy_dev->speed) || in ax_handle_link_change()
327 (ax->duplex != phy_dev->duplex))) { in ax_handle_link_change()
329 ax->speed = phy_dev->speed; in ax_handle_link_change()
330 ax->duplex = phy_dev->duplex; in ax_handle_link_change()
334 if (phy_dev->link != ax->link) { in ax_handle_link_change()
336 ax->speed = 0; in ax_handle_link_change()
337 ax->duplex = -1; in ax_handle_link_change()
339 ax->link = phy_dev->link; in ax_handle_link_change()
350 struct ax_device *ax = to_ax_dev(dev); in ax_mii_probe() local
355 phy_dev = phy_find_first(ax->mii_bus); in ax_mii_probe()
372 ax->phy_dev = phy_dev; in ax_mii_probe()
383 struct ax_device *ax = to_ax_dev(dev); in ax_phy_switch() local
385 u8 reg_gpoc = ax->plat->gpoc_val; in ax_phy_switch()
397 struct ax_device *ax = to_ax_dev(dev); in ax_open() local
402 ret = request_irq(dev->irq, ax_ei_interrupt, ax->irqflags, in ax_open()
413 phy_start(ax->phy_dev); in ax_open()
419 ax->running = 1; in ax_open()
424 phy_disconnect(ax->phy_dev); in ax_open()
434 struct ax_device *ax = to_ax_dev(dev); in ax_close() local
438 ax->running = 0; in ax_close()
445 phy_disconnect(ax->phy_dev); in ax_close()
453 struct ax_device *ax = to_ax_dev(dev); in ax_ioctl() local
454 struct phy_device *phy_dev = ax->phy_dev; in ax_ioctl()
479 struct ax_device *ax = to_ax_dev(dev); in ax_get_settings() local
480 struct phy_device *phy_dev = ax->phy_dev; in ax_get_settings()
490 struct ax_device *ax = to_ax_dev(dev); in ax_set_settings() local
491 struct phy_device *phy_dev = ax->phy_dev; in ax_set_settings()
573 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl); in ax_bb_mdc() local
576 ax->reg_memr |= AX_MEMR_MDC; in ax_bb_mdc()
578 ax->reg_memr &= ~AX_MEMR_MDC; in ax_bb_mdc()
580 ei_outb(ax->reg_memr, ax->addr_memr); in ax_bb_mdc()
585 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl); in ax_bb_dir() local
588 ax->reg_memr &= ~AX_MEMR_MDIR; in ax_bb_dir()
590 ax->reg_memr |= AX_MEMR_MDIR; in ax_bb_dir()
592 ei_outb(ax->reg_memr, ax->addr_memr); in ax_bb_dir()
597 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl); in ax_bb_set_data() local
600 ax->reg_memr |= AX_MEMR_MDO; in ax_bb_set_data()
602 ax->reg_memr &= ~AX_MEMR_MDO; in ax_bb_set_data()
604 ei_outb(ax->reg_memr, ax->addr_memr); in ax_bb_set_data()
609 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl); in ax_bb_get_data() local
610 int reg_memr = ei_inb(ax->addr_memr); in ax_bb_get_data()
629 struct ax_device *ax = to_ax_dev(dev); in ax_mii_init() local
632 ax->bb_ctrl.ops = &bb_ops; in ax_mii_init()
633 ax->addr_memr = ei_local->mem + AX_MEMR; in ax_mii_init()
634 ax->mii_bus = alloc_mdio_bitbang(&ax->bb_ctrl); in ax_mii_init()
635 if (!ax->mii_bus) { in ax_mii_init()
640 ax->mii_bus->name = "ax88796_mii_bus"; in ax_mii_init()
641 ax->mii_bus->parent = dev->dev.parent; in ax_mii_init()
642 snprintf(ax->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", in ax_mii_init()
645 ax->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); in ax_mii_init()
646 if (!ax->mii_bus->irq) { in ax_mii_init()
652 ax->mii_bus->irq[i] = PHY_POLL; in ax_mii_init()
654 err = mdiobus_register(ax->mii_bus); in ax_mii_init()
661 kfree(ax->mii_bus->irq); in ax_mii_init()
663 free_mdio_bitbang(ax->mii_bus); in ax_mii_init()
671 struct ax_device *ax = to_ax_dev(dev); in ax_initial_setup() local
677 ei_outb(ax->plat->dcr_val & ~1, ioaddr + EN0_DCFG); in ax_initial_setup()
678 ei_outb(ax->plat->gpoc_val, ioaddr + EI_SHIFT(0x17)); in ax_initial_setup()
692 struct ax_device *ax = to_ax_dev(dev); in ax_init_dev() local
709 if (ax->plat->flags & AXFLG_HAS_EEPROM) { in ax_init_dev()
717 if (ax->plat->wordlength == 2) in ax_init_dev()
725 if (ax->plat->flags & AXFLG_HAS_93CX6) { in ax_init_dev()
741 if (ax->plat->wordlength == 2) { in ax_init_dev()
743 ei_outb(ax->plat->dcr_val, ei_local->mem + EN0_DCFG); in ax_init_dev()
752 if (ax->plat->flags & AXFLG_MAC_FROMDEV) { in ax_init_dev()
760 if ((ax->plat->flags & AXFLG_MAC_FROMPLATFORM) && in ax_init_dev()
761 ax->plat->mac_addr) in ax_init_dev()
762 memcpy(dev->dev_addr, ax->plat->mac_addr, ETH_ALEN); in ax_init_dev()
769 ei_local->word16 = (ax->plat->wordlength == 2); in ax_init_dev()
814 struct ax_device *ax = to_ax_dev(dev); in ax_remove() local
824 if (ax->map2) { in ax_remove()
825 iounmap(ax->map2); in ax_remove()
846 struct ax_device *ax; in ax_probe() local
858 ax = to_ax_dev(dev); in ax_probe()
860 ax->plat = dev_get_platdata(&pdev->dev); in ax_probe()
863 ei_local->rxcr_base = ax->plat->rcr_val; in ax_probe()
874 ax->irqflags = irq->flags & IRQF_TRIGGER_MASK; in ax_probe()
889 if (ax->plat->reg_offsets) in ax_probe()
890 ei_local->reg_offset = ax->plat->reg_offsets; in ax_probe()
892 ei_local->reg_offset = ax->reg_offsets; in ax_probe()
894 ax->reg_offsets[ret] = (mem_size / 0x18) * ret; in ax_probe()
916 if (!ax->plat->reg_offsets) { in ax_probe()
918 ax->reg_offsets[ret] = (mem_size / 0x20) * ret; in ax_probe()
929 ax->map2 = ioremap(mem2->start, mem2_size); in ax_probe()
930 if (!ax->map2) { in ax_probe()
936 ei_local->reg_offset[0x1f] = ax->map2 - ei_local->mem; in ax_probe()
944 if (!ax->map2) in ax_probe()
947 iounmap(ax->map2); in ax_probe()
970 struct ax_device *ax = to_ax_dev(ndev); in ax_suspend() local
972 ax->resume_open = ax->running; in ax_suspend()
983 struct ax_device *ax = to_ax_dev(ndev); in ax_resume() local
986 ax_NS8390_init(ndev, ax->resume_open); in ax_resume()
989 if (ax->resume_open) in ax_resume()