Lines Matching refs:ax

170 	struct ax_device *ax = to_ax_dev(dev);
173 if (!ax->plat->check_irq(pdev))
331 struct ax_device *ax = to_ax_dev(dev);
335 if (phy_dev->link && ((ax->speed != phy_dev->speed) ||
336 (ax->duplex != phy_dev->duplex))) {
338 ax->speed = phy_dev->speed;
339 ax->duplex = phy_dev->duplex;
343 if (phy_dev->link != ax->link) {
345 ax->speed = 0;
346 ax->duplex = -1;
348 ax->link = phy_dev->link;
359 struct ax_device *ax = to_ax_dev(dev);
364 phy_dev = phy_find_first(ax->mii_bus);
388 struct ax_device *ax = to_ax_dev(dev);
390 u8 reg_gpoc = ax->plat->gpoc_val;
402 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl);
405 ax->reg_memr |= AX_MEMR_MDC;
407 ax->reg_memr &= ~AX_MEMR_MDC;
409 ei_outb(ax->reg_memr, ax->addr_memr);
414 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl);
417 ax->reg_memr &= ~AX_MEMR_MDIR;
419 ax->reg_memr |= AX_MEMR_MDIR;
421 ei_outb(ax->reg_memr, ax->addr_memr);
426 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl);
429 ax->reg_memr |= AX_MEMR_MDO;
431 ax->reg_memr &= ~AX_MEMR_MDO;
433 ei_outb(ax->reg_memr, ax->addr_memr);
438 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl);
439 int reg_memr = ei_inb(ax->addr_memr);
456 struct ax_device *ax = to_ax_dev(dev);
459 ax->bb_ctrl.ops = &bb_ops;
460 ax->addr_memr = ei_local->mem + AX_MEMR;
461 ax->mii_bus = alloc_mdio_bitbang(&ax->bb_ctrl);
462 if (!ax->mii_bus) {
467 ax->mii_bus->name = "ax88796_mii_bus";
468 ax->mii_bus->parent = dev->dev.parent;
469 snprintf(ax->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
472 err = mdiobus_register(ax->mii_bus);
479 free_mdio_bitbang(ax->mii_bus);
486 struct ax_device *ax = to_ax_dev(dev);
495 if (ax->plat->check_irq)
497 ax->irqflags, dev->name, dev);
499 ret = request_irq(dev->irq, ax_ei_interrupt, ax->irqflags,
516 ax->running = 1;
527 mdiobus_unregister(ax->mii_bus);
528 free_mdio_bitbang(ax->mii_bus);
535 struct ax_device *ax = to_ax_dev(dev);
539 ax->running = 0;
550 mdiobus_unregister(ax->mii_bus);
551 free_mdio_bitbang(ax->mii_bus);
656 struct ax_device *ax = to_ax_dev(dev);
662 ei_outb(ax->plat->dcr_val & ~1, ioaddr + EN0_DCFG);
663 ei_outb(ax->plat->gpoc_val, ioaddr + EI_SHIFT(0x17));
677 struct ax_device *ax = to_ax_dev(dev);
694 if (ax->plat->flags & AXFLG_HAS_EEPROM) {
708 if (ax->plat->wordlength == 2)
716 if (ax->plat->flags & AXFLG_HAS_93CX6) {
732 if (ax->plat->wordlength == 2) {
734 ei_outb(ax->plat->dcr_val, ei_local->mem + EN0_DCFG);
743 if (ax->plat->flags & AXFLG_MAC_FROMDEV) {
751 if ((ax->plat->flags & AXFLG_MAC_FROMPLATFORM) &&
752 ax->plat->mac_addr)
753 memcpy(dev->dev_addr, ax->plat->mac_addr, ETH_ALEN);
766 ei_local->word16 = (ax->plat->wordlength == 2);
775 if (ax->plat->block_input)
776 ei_local->block_input = ax->plat->block_input;
779 if (ax->plat->block_output)
780 ei_local->block_output = ax->plat->block_output;
809 struct ax_device *ax = to_ax_dev(dev);
818 if (ax->map2) {
819 iounmap(ax->map2);
841 struct ax_device *ax;
853 ax = to_ax_dev(dev);
855 ax->plat = dev_get_platdata(&pdev->dev);
858 ei_local->rxcr_base = ax->plat->rcr_val;
869 ax->irqflags = irq->flags & IRQF_TRIGGER_MASK;
872 ax->irqflags |= IRQF_SHARED;
887 if (ax->plat->reg_offsets)
888 ei_local->reg_offset = ax->plat->reg_offsets;
890 ei_local->reg_offset = ax->reg_offsets;
892 ax->reg_offsets[ret] = (mem_size / 0x18) * ret;
914 if (!ax->plat->reg_offsets) {
916 ax->reg_offsets[ret] = (mem_size / 0x20) * ret;
927 ax->map2 = ioremap(mem2->start, mem2_size);
928 if (!ax->map2) {
934 ei_local->reg_offset[0x1f] = ax->map2 - ei_local->mem;
942 if (!ax->map2)
945 iounmap(ax->map2);
970 struct ax_device *ax = to_ax_dev(ndev);
972 ax->resume_open = ax->running;
983 struct ax_device *ax = to_ax_dev(ndev);
986 ax_NS8390_init(ndev, ax->resume_open);
989 if (ax->resume_open)