Lines Matching refs:ioaddr

392 static u32 ioaddr;
481 static int read_eeprom(unsigned long ioaddr, int location, int addr_len);
571 long mdio_addr = ioaddr + CSR9;
579 outl(0x60020000 + (phy_id<<23) + (location<<18), ioaddr + 0xA0);
580 inl(ioaddr + 0xA0);
581 inl(ioaddr + 0xA0);
583 if ( ! ((retval = inl(ioaddr + 0xA0)) & 0x80000000))
591 return inl(ioaddr + 0xB4 + (location<<2));
593 return inl(ioaddr + 0xD0);
595 return inl(ioaddr + 0xD4 + ((location-29)<<2));
631 long mdio_addr = ioaddr + CSR9;
639 outl(cmd, ioaddr + 0xA0);
641 if ( ! (inl(ioaddr + 0xA0) & 0x80000000))
651 outl(value, ioaddr + 0xB4 + (location<<2));
653 outl(value, ioaddr + 0xD0);
655 outl(value, ioaddr + 0xD4 + ((location-29)<<2));
690 static int read_eeprom(unsigned long ioaddr, int location, int addr_len)
694 long ee_addr = ioaddr + CSR9;
935 int csr6 = inl(ioaddr + CSR6) & ~0x00D5;
943 outl(csr6, ioaddr + CSR6);
962 outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
966 outl(0x814C0000, ioaddr + CSR6);
970 outl(0x00000001, ioaddr + CSR0);
974 outl(tp->csr0, ioaddr + CSR0);
987 ioaddr + 0xB0);
988 outl(addr_high + (addr_high<<16), ioaddr + 0xB8);
998 outl(0, ioaddr + CSR13);
999 outl(addr_low, ioaddr + CSR14);
1000 outl(1, ioaddr + CSR13);
1001 outl(addr_high, ioaddr + CSR14);
1002 outl(2, ioaddr + CSR13);
1003 outl(0, ioaddr + CSR14);
1004 outl(3, ioaddr + CSR13);
1005 outl(0, ioaddr + CSR14);
1007 outl(addr_low, ioaddr + 0xA4);
1008 outl(addr_high, ioaddr + 0xA8);
1009 outl(0, ioaddr + 0xAC);
1010 outl(0, ioaddr + 0xB0);
1034 outl(virt_to_le32desc(&rx_ring[0]), ioaddr + CSR3);
1035 outl(virt_to_le32desc(&tx_ring[0]), ioaddr + CSR4);
1040 outl((tp->csr6 & ~0x00002002), ioaddr + CSR6);
1045 outl(tp->csr6 | 0x00002000, ioaddr + CSR6);
1047 outl(0, ioaddr + CSR1);
1064 outl(tp->csr6 | 0x00002002, ioaddr + CSR6);
1075 u32 csr6 = inl(ioaddr + CSR6);
1082 outl(csr6 & ~0x00002000, ioaddr + CSR6);
1108 outl(virt_to_le32desc(&tx_ring[0]), ioaddr + CSR4);
1111 outl(csr6 | 0x00002000, ioaddr + CSR6);
1113 outl(0, ioaddr + CSR1);
1124 outl(csr6 & ~0x00002000, ioaddr + CSR6);
1181 outl(0x00000000, ioaddr + CSR7);
1184 outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
1187 (volatile unsigned long)inl(ioaddr + CSR8);
1218 if (pci->ioaddr == 0)
1221 ioaddr = pci->ioaddr;
1222 nic->ioaddr = pci->ioaddr & ~3;
1238 outl(0x00000000, ioaddr + CSR7);
1241 outl(inl(ioaddr + CSR6) & ~0x00002002, ioaddr + CSR6);
1244 (volatile unsigned long)inl(ioaddr + CSR8);
1293 if (inl(ioaddr + CSR5) == 0xFFFFFFFF) {
1295 tp->nic_name, ioaddr);
1302 tulip_tbl[chip_idx].chip_name, chip_rev, ioaddr);
1305 if (chip_idx == DC21041 && inl(ioaddr + CSR9) & 0x8000) {
1315 outl(0, ioaddr + CSR9); /* Reset the pointer with a dummy write. */
1319 value = inl(ioaddr + CSR9);
1327 outl(0x600 | i, ioaddr + 0x98);
1329 value = inl(ioaddr + CSR9);
1336 put_unaligned(inl(ioaddr + 0xA4), (u32 *)nic->node_addr);
1337 put_unaligned(inl(ioaddr + 0xA8), (u16 *)(nic->node_addr + 4));
1343 int ee_addr_size = read_eeprom(ioaddr, 0xff, 8) & 0x40000 ? 8 : 6;
1347 le16_to_cpu(read_eeprom(ioaddr, i, ee_addr_size));
1382 printf("%s: %! at ioaddr %hX\n", tp->nic_name, nic->node_addr, ioaddr);
1490 outl(0x00000000, ioaddr + CSR13);
1491 outl(0x00000004, ioaddr + CSR13);
1497 outl(0x00000000, ioaddr + CSR13);
1498 outl(0xFFFFFFFF, ioaddr + CSR14);
1499 outl(0x00000008, ioaddr + CSR15); /* Listen on AUI also. */
1500 outl(inl(ioaddr + CSR6) | 0x0200, ioaddr + CSR6);
1501 outl(0x0000EF01, ioaddr + CSR13);
1505 outl(tp->mtable->csr12dir | 0x100, ioaddr + CSR12);
1510 outl(0x82020000, ioaddr + CSR6);
1511 outl(0x0000, ioaddr + CSR13);
1512 outl(0x0000, ioaddr + CSR14);
1513 outl(0x820E0000, ioaddr + CSR6);
1521 outl(0x00420000, ioaddr + CSR6);
1522 outl(0x30, ioaddr + CSR12);
1523 outl(0x0001F078, ioaddr + 0xB8);
1524 outl(0x0201F078, ioaddr + 0xB8); /* Turn on autonegotiation. */
1528 outl(0x00000000, ioaddr + CSR6);
1529 outl(0x000711C0, ioaddr + CSR14); /* Turn on NWay. */
1530 outl(0x00000001, ioaddr + CSR13);
1533 outl(0x01a80000, ioaddr + CSR6);
1534 outl(0xFFFFFFFF, ioaddr + CSR14);
1535 outl(0x00001000, ioaddr + CSR12);
1564 outl(0x0001, ioaddr + CSR13);
1565 outl(csr14, ioaddr + CSR14);
1567 outl(tp->csr6, ioaddr + CSR6);
1569 outl(tp->mtable->csr15dir, ioaddr + CSR15);
1570 outl(tp->mtable->csr15val, ioaddr + CSR15);
1572 outw(0x0008, ioaddr + CSR15);
1574 outl(0xEF01, ioaddr + CSR12);
1576 outl(0x1301, ioaddr + CSR12);
1627 outl(0x0000, ioaddr + CSR13);
1628 outl(0x0000, ioaddr + CSR14);
1629 outl(0x0008, ioaddr + CSR15);
1647 outl(0x82020000, ioaddr + CSR6);
1650 outl(0x0000, ioaddr + CSR13);
1651 outl(0x0000, ioaddr + CSR14);
1662 outl(0x0001, ioaddr + CSR15);
1663 } else if (inl(ioaddr + CSR5) & TPLnkPass)
1667 outl(0x32, ioaddr + CSR12);
1669 outl(0x0001B078, ioaddr + 0xB8);
1670 outl(0x0201B078, ioaddr + 0xB8);
1676 outl(0x0f370000 | inw(ioaddr + 0x80), ioaddr + 0x80);
1682 outl(0x0f370000 | inw(ioaddr + 0x80), ioaddr + 0x80);
1683 outl(0x11000 | inw(ioaddr + 0xa0), ioaddr + 0xa0);
1699 u32 phy_reg = inl(ioaddr + 0xB8);
1713 outl(0x32 | (tp->if_port & 1), ioaddr + CSR12);
1715 outl(0x1F868, ioaddr + 0xB8);
1727 outl(tp->csr6 | 0x0002, ioaddr + CSR6); /* Restart Tx */
1728 outl(tp->csr6 | 0x2002, ioaddr + CSR6);
1757 outl(mtable->csr12dir | 0x100, ioaddr + CSR12);
1758 outl(p[1], ioaddr + CSR12);
1780 outl(get_u16(rst + 1 + (i<<1)) << 16, ioaddr + CSR15);
1793 outl(0, ioaddr + CSR13);
1794 outl(csr14val, ioaddr + CSR14);
1795 outl(csr15dir, ioaddr + CSR15); /* Direction */
1796 outl(csr15val, ioaddr + CSR15); /* Data */
1797 outl(csr13val, ioaddr + CSR13);
1806 outl(0, ioaddr + CSR13);
1807 outl(csr14val, ioaddr + CSR14);
1809 outl(csr15dir, ioaddr + CSR15); /* Direction */
1810 outl(csr15val, ioaddr + CSR15); /* Data */
1811 if (startup) outl(csr13val, ioaddr + CSR13);
1838 outl(get_u16(&reset_sequence[i]) << 16, ioaddr + CSR15);
1840 outl(get_u16(&init_sequence[i]) << 16, ioaddr + CSR15);
1847 outl(mtable->csr12dir | 0x100, ioaddr + CSR12);
1849 outl(reset_sequence[i], ioaddr + CSR12);
1852 outl(init_sequence[i], ioaddr + CSR12);
1876 inl(ioaddr + CSR12) & 0xff);
1884 inl(ioaddr + CSR12));
1886 outl(0x00000000, ioaddr + CSR13); /* Reset the serial interface */
1887 outl(t21041_csr14[port], ioaddr + CSR14);
1888 outl(t21041_csr15[port], ioaddr + CSR15);
1889 outl(t21041_csr13[port], ioaddr + CSR13);
1897 tp->nic_name, inl(ioaddr + 0xB8), medianame[tp->if_port]);
1901 outl(0x0001, ioaddr + CSR15);
1902 outl(0x0201B07A, ioaddr + 0xB8);
1905 outl(0x32, ioaddr + CSR12);
1907 outl(0x0001B078, ioaddr + 0xB8);
1908 outl(0x0201B078, ioaddr + 0xB8);
1910 outl(0x33, ioaddr + CSR12);
1913 outl(startup ? 0x0201F868 : 0x0001F868, ioaddr + 0xB8);
1915 outl(0x32, ioaddr + CSR12);
1917 outl(0x1F078, ioaddr + 0xB8);
1922 int csr12 = inl(ioaddr + CSR12);
1931 outl(FULL_DUPLEX_MAGIC, ioaddr + CSR11);
1932 outl(0x00000000, ioaddr + CSR13); /* Reset the serial interface */
1934 outl(0x0705, ioaddr + CSR14);
1935 outl(0x0006, ioaddr + CSR15);
1937 outl(0xffff, ioaddr + CSR14);
1938 outl(0x0000, ioaddr + CSR15);
1940 outl(0x8f01 | t21040_csr13[tp->if_port], ioaddr + CSR13);
1955 inl(ioaddr + CSR12));