Lines Matching +full:0 +full:x50020000

46 0x0800-0x0fff can translated to the PIO FIFO.  Thus memory operations (faster
48 This is enabled by setting the 0x10 bit in the PCMCIA LAN COR.
51 This is configured by setting the 0x20 bit in the PCMCIA LAN COR.
55 configuration space registers. Window 0 is the regular Boomerang/Odie
106 #define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
112 INT_MODULE_PARM(full_duplex, 0);
127 #define EL3_DATA 0x00
128 #define EL3_CMD 0x0e
129 #define EL3_STATUS 0x0e
136 TotalReset = 0<<11, SelectWindow = 1<<11, StartCoax = 2<<11,
146 IntLatch = 0x0001, AdapterFailure = 0x0002, TxComplete = 0x0004,
147 TxAvailable = 0x0008, RxComplete = 0x0010, RxEarly = 0x0020,
148 IntReq = 0x0040, StatsFull = 0x0080, CmdBusy = 0x1000 };
157 IntrStatus=0x0E, /* Valid in all windows. */
161 EEPROM_Read = 0x200, EEPROM_WRITE = 0x100, EEPROM_ERASE = 0x300,
162 EEPROM_EWENB = 0x30, /* Enable erasing/writing for 10 msec. */
163 EEPROM_EWDIS = 0x00, /* Disable EWENB before 10 msec timeout. */
167 On the "Odie" this window is always mapped at offsets 0x10-0x1f.
170 TX_FIFO = 0x10, RX_FIFO = 0x10, RxErrors = 0x14,
171 RxStatus = 0x18, Timer=0x1A, TxStatus = 0x1B,
172 TxFree = 0x0C, /* Remaining free bytes in Tx buffer. */
173 RunnerRdCtrl = 0x16, RunnerWrCtrl = 0x1c,
177 Wn3_Config=0, Wn3_MAC_Ctrl=6, Wn3_Options=8,
182 Ram_speed = 0x30,
183 Rom_size = 0xc0,
188 Autoselect = 0x1000000,
195 #define MEDIA_TP 0x00C0 /* Enable link beat and jabber for 10baseT. */
213 static char mii_preamble_required = 0;
277 link->resource[0]->end = 32; in tc574_probe()
278 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; in tc574_probe()
319 for (i = j = 0; j < 0x400; j += 0x20) { in tc574_config()
320 link->resource[0]->start = j ^ 0x300; in tc574_config()
322 if (i == 0) in tc574_config()
325 if (i != 0) in tc574_config()
337 dev->base_addr = link->resource[0]->start; in tc574_config()
345 len = pcmcia_get_tuple(link, 0x88, &buf); in tc574_config()
347 for (i = 0; i < 3; i++) in tc574_config()
351 kfree(buf); /* 0 < len < 6 */ in tc574_config()
352 EL3WINDOW(0); in tc574_config()
353 for (i = 0; i < 3; i++) in tc574_config()
355 if (addr[0] == htons(0x6060)) { in tc574_config()
356 pr_notice("IO port conflict at 0x%03lx-0x%03lx\n", in tc574_config()
371 outw(0<<11, ioaddr + RunnerRdCtrl); in tc574_config()
376 lp->autoselect = config & Autoselect ? 1 : 0; in tc574_config()
379 timer_setup(&lp->media, media_check, 0); in tc574_config()
385 outw(0x8040, ioaddr + Wn3_Options); in tc574_config()
387 outw(0xc040, ioaddr + Wn3_Options); in tc574_config()
391 outw(0x8040, ioaddr + Wn3_Options); in tc574_config()
397 mii_status = mdio_read(ioaddr, phy & 0x1f, 1); in tc574_config()
398 if (mii_status != 0xffff) { in tc574_config()
399 lp->phys = phy & 0x1f; in tc574_config()
403 if ((mii_status & 0x0040) == 0) in tc574_config()
412 i = mdio_read(ioaddr, lp->phys, 16) | 0x40; in tc574_config()
417 lp->advertising &= ~0x02a0; in tc574_config()
424 if (register_netdev(dev) != 0) { in tc574_config()
436 return 0; in tc574_config()
456 return 0; in tc574_suspend()
468 return 0; in tc574_resume()
481 inw(ioaddr+0x04), inw(ioaddr+0x06), in dump_status()
482 inw(ioaddr+0x08), inw(ioaddr+0x0a)); in dump_status()
493 while (--i > 0) in tc574_wait_for_completion()
494 if (!(inw(dev->base_addr + EL3_STATUS) & 0x1000)) break; in tc574_wait_for_completion()
495 if (i == 0) in tc574_wait_for_completion()
496 netdev_notice(dev, "command 0x%04x did not complete!\n", cmd); in tc574_wait_for_completion()
507 for (timer = 1620; timer >= 0; timer--) { in read_eeprom()
508 if ((inw(ioaddr + Wn0EepromCmd) & 0x8000) == 0) in read_eeprom()
521 #define MDIO_SHIFT_CLK 0x01
522 #define MDIO_DIR_WRITE 0x04
523 #define MDIO_DATA_WRITE0 (0x00 | MDIO_DIR_WRITE)
524 #define MDIO_DATA_WRITE1 (0x02 | MDIO_DIR_WRITE)
525 #define MDIO_DATA_READ 0x02
526 #define MDIO_ENB_IN 0x00
535 while (-- bits >= 0) { in mdio_sync()
544 int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; in mdio_read()
545 unsigned int retval = 0; in mdio_read()
552 for (i = 14; i >= 0; i--) { in mdio_read()
558 for (i = 19; i > 0; i--) { in mdio_read()
560 retval = (retval << 1) | ((inw(mdio_addr) & MDIO_DATA_READ) ? 1 : 0); in mdio_read()
563 return (retval>>1) & 0xffff; in mdio_read()
568 int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value; in mdio_write()
576 for (i = 31; i >= 0; i--) { in mdio_write()
582 for (i = 1; i >= 0; i--) { in mdio_write()
596 tc574_wait_for_completion(dev, TotalReset|0x10); in tc574_reset()
600 outw(0, ioaddr + RunnerWrCtrl); in tc574_reset()
601 outw(0, ioaddr + RunnerRdCtrl); in tc574_reset()
605 for (i = 0; i < 6; i++) in tc574_reset()
608 outw(0, ioaddr + i); in tc574_reset()
612 outb((dev->mtu > 1500 ? 0x40 : 0), ioaddr + Wn3_MAC_Ctrl); in tc574_reset()
613 outl((lp->autoselect ? 0x01000000 : 0) | 0x0062001b, in tc574_reset()
616 outw(0x8040, ioaddr + Wn3_Options); in tc574_reset()
618 outw(0xc040, ioaddr + Wn3_Options); in tc574_reset()
627 outw(0x8040, ioaddr + Wn3_Options); in tc574_reset()
632 for (i = 0; i < 10; i++) in tc574_reset()
641 outw(0x0040, ioaddr + Wn4_NetDiag); in tc574_reset()
651 i = mdio_read(ioaddr, lp->phys, 16) | 0x20; in tc574_reset()
663 outw(SetStatusEnb | 0xff, ioaddr + EL3_CMD); in tc574_reset()
689 return 0; in el3_open()
712 for (i = 32; i > 0; i--) { in pop_tx_status()
714 if (!(tx_status & 0x84)) in pop_tx_status()
717 if (tx_status & 0x30) in pop_tx_status()
719 if (tx_status & 0x38) { in pop_tx_status()
720 pr_debug("%s: transmit error: status 0x%02x\n", in pop_tx_status()
725 outb(0x00, ioaddr + TxStatus); /* Pop the status stack. */ in pop_tx_status()
746 outw(0, ioaddr + TX_FIFO); in el3_start_xmit()
750 /* TxFree appears only in Window 1, not offset 0x1c. */ in el3_start_xmit()
772 int handled = 0; in el3_interrupt()
786 ((status & 0xe000) != 0x2000)) { in el3_interrupt()
821 if (fifo_diag & 0x0400) { in el3_interrupt()
826 if (fifo_diag & 0x2000) { in el3_interrupt()
836 if (--work_budget < 0) { in el3_interrupt()
840 outw(AckIntr | 0xFF, ioaddr + EL3_CMD); in el3_interrupt()
872 if ((inw(ioaddr + EL3_STATUS) & IntLatch) && (inb(ioaddr + Timer) == 0xff)) { in media_check()
896 if ((media ^ lp->media_status) & 0x0004) in media_check()
898 (lp->media_status & 0x0004) ? "lost" : "found"); in media_check()
899 if ((media ^ lp->media_status) & 0x0020) { in media_check()
900 lp->partner = 0; in media_check()
901 if (lp->media_status & 0x0020) { in media_check()
908 (partner & 0x0180) ? 100 : 10, in media_check()
909 (partner & 0x0140) ? 'F' : 'H'); in media_check()
915 outb((partner & 0x0140 ? 0x20 : 0) | in media_check()
916 (dev->mtu > 1500 ? 0x40 : 0), ioaddr + Wn3_MAC_Ctrl); in media_check()
920 if (media & 0x0010) in media_check()
922 if (media & 0x0002) in media_check()
957 if (inw(ioaddr+EL3_STATUS) == 0xffff) /* No card. */ in update_stats()
963 dev->stats.tx_carrier_errors += inb(ioaddr + 0); in update_stats()
971 dev->stats.tx_packets += (up&0x30) << 4; in update_stats()
991 while (!((rx_status = inw(ioaddr + RxStatus)) & 0x8000) && in el3_rx()
992 worklimit > 0) { in el3_rx()
994 if (rx_status & 0x4000) { /* Error, update stats. */ in el3_rx()
995 short error = rx_status & 0x3800; in el3_rx()
998 case 0x0000: dev->stats.rx_over_errors++; break; in el3_rx()
999 case 0x0800: dev->stats.rx_length_errors++; break; in el3_rx()
1000 case 0x1000: dev->stats.rx_frame_errors++; break; in el3_rx()
1001 case 0x1800: dev->stats.rx_length_errors++; break; in el3_rx()
1002 case 0x2000: dev->stats.rx_frame_errors++; break; in el3_rx()
1003 case 0x2800: dev->stats.rx_crc_errors++; break; in el3_rx()
1006 short pkt_len = rx_status & 0x7ff; in el3_rx()
1039 int phy = lp->phys & 0x1f; in el3_ioctl()
1057 data->val_out = mdio_read(ioaddr, data->phy_id & 0x1f, in el3_ioctl()
1058 data->reg_num & 0x1f); in el3_ioctl()
1061 return 0; in el3_ioctl()
1071 mdio_write(ioaddr, data->phy_id & 0x1f, in el3_ioctl()
1072 data->reg_num & 0x1f, data->val_in); in el3_ioctl()
1075 return 0; in el3_ioctl()
1131 /* Note: Switching to window 0 may disable the IRQ. */ in el3_close()
1132 EL3WINDOW(0); in el3_close()
1138 outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD); in el3_close()
1145 return 0; in el3_close()
1149 PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0574),
1150 PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0556, "cis/3CCFEM556.cis"),