Lines Matching defs:ax

177 	struct ax_device *ax = to_ax_dev(dev);
180 if (!ax->plat->check_irq(pdev))
338 struct ax_device *ax = to_ax_dev(dev);
342 if (phy_dev->link && ((ax->speed != phy_dev->speed) ||
343 (ax->duplex != phy_dev->duplex))) {
345 ax->speed = phy_dev->speed;
346 ax->duplex = phy_dev->duplex;
350 if (phy_dev->link != ax->link) {
352 ax->speed = 0;
353 ax->duplex = -1;
355 ax->link = phy_dev->link;
366 struct ax_device *ax = to_ax_dev(dev);
371 phy_dev = phy_find_first(ax->mii_bus);
395 struct ax_device *ax = to_ax_dev(dev);
397 u8 reg_gpoc = ax->plat->gpoc_val;
409 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl);
412 ax->reg_memr |= AX_MEMR_MDC;
414 ax->reg_memr &= ~AX_MEMR_MDC;
416 ei_outb(ax->reg_memr, ax->addr_memr);
421 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl);
424 ax->reg_memr &= ~AX_MEMR_MDIR;
426 ax->reg_memr |= AX_MEMR_MDIR;
428 ei_outb(ax->reg_memr, ax->addr_memr);
433 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl);
436 ax->reg_memr |= AX_MEMR_MDO;
438 ax->reg_memr &= ~AX_MEMR_MDO;
440 ei_outb(ax->reg_memr, ax->addr_memr);
445 struct ax_device *ax = container_of(ctrl, struct ax_device, bb_ctrl);
446 int reg_memr = ei_inb(ax->addr_memr);
463 struct ax_device *ax = to_ax_dev(dev);
466 ax->bb_ctrl.ops = &bb_ops;
467 ax->addr_memr = ei_local->mem + AX_MEMR;
468 ax->mii_bus = alloc_mdio_bitbang(&ax->bb_ctrl);
469 if (!ax->mii_bus) {
474 ax->mii_bus->name = "ax88796_mii_bus";
475 ax->mii_bus->parent = dev->dev.parent;
476 snprintf(ax->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
479 err = mdiobus_register(ax->mii_bus);
486 free_mdio_bitbang(ax->mii_bus);
493 struct ax_device *ax = to_ax_dev(dev);
502 if (ax->plat->check_irq)
504 ax->irqflags, dev->name, dev);
506 ret = request_irq(dev->irq, ax_ei_interrupt, ax->irqflags,
523 ax->running = 1;
534 mdiobus_unregister(ax->mii_bus);
535 free_mdio_bitbang(ax->mii_bus);
542 struct ax_device *ax = to_ax_dev(dev);
546 ax->running = 0;
557 mdiobus_unregister(ax->mii_bus);
558 free_mdio_bitbang(ax->mii_bus);
663 struct ax_device *ax = to_ax_dev(dev);
669 ei_outb(ax->plat->dcr_val & ~1, ioaddr + EN0_DCFG);
670 ei_outb(ax->plat->gpoc_val, ioaddr + EI_SHIFT(0x17));
684 struct ax_device *ax = to_ax_dev(dev);
701 if (ax->plat->flags & AXFLG_HAS_EEPROM) {
715 if (ax->plat->wordlength == 2)
723 if (ax->plat->flags & AXFLG_HAS_93CX6) {
739 if (ax->plat->wordlength == 2) {
741 ei_outb(ax->plat->dcr_val, ei_local->mem + EN0_DCFG);
750 if (ax->plat->flags & AXFLG_MAC_FROMDEV) {
760 if ((ax->plat->flags & AXFLG_MAC_FROMPLATFORM) &&
761 ax->plat->mac_addr)
762 eth_hw_addr_set(dev, ax->plat->mac_addr);
775 ei_local->word16 = (ax->plat->wordlength == 2);
784 if (ax->plat->block_input)
785 ei_local->block_input = ax->plat->block_input;
788 if (ax->plat->block_output)
789 ei_local->block_output = ax->plat->block_output;
818 struct ax_device *ax = to_ax_dev(dev);
827 if (ax->map2) {
828 iounmap(ax->map2);
848 struct ax_device *ax;
860 ax = to_ax_dev(dev);
862 ax->plat = dev_get_platdata(&pdev->dev);
865 ei_local->rxcr_base = ax->plat->rcr_val;
876 ax->irqflags = irq->flags & IRQF_TRIGGER_MASK;
879 ax->irqflags |= IRQF_SHARED;
894 if (ax->plat->reg_offsets)
895 ei_local->reg_offset = ax->plat->reg_offsets;
897 ei_local->reg_offset = ax->reg_offsets;
899 ax->reg_offsets[ret] = (mem_size / 0x18) * ret;
921 if (!ax->plat->reg_offsets) {
923 ax->reg_offsets[ret] = (mem_size / 0x20) * ret;
934 ax->map2 = ioremap(mem2->start, mem2_size);
935 if (!ax->map2) {
941 ei_local->reg_offset[0x1f] = ax->map2 - ei_local->mem;
949 if (!ax->map2)
952 iounmap(ax->map2);
977 struct ax_device *ax = to_ax_dev(ndev);
979 ax->resume_open = ax->running;
990 struct ax_device *ax = to_ax_dev(ndev);
993 ax_NS8390_init(ndev, ax->resume_open);
996 if (ax->resume_open)