Home | History | Annotate | Download | only in isa

Lines Matching refs:iot

180 	bus_space_tag_t iot;
193 iot = ia->ia_iot;
198 if (bus_space_map(iot, ia->ia_io[0].ir_addr, 16, 0, &ioh))
203 c = bus_space_read_1(iot, ioh, ID_REG);
207 d = bus_space_read_1(iot, ioh, ID_REG);
214 d = bus_space_read_1(iot, ioh, ID_REG);
221 d = bus_space_read_1(iot, ioh, ID_REG);
228 d = bus_space_read_1(iot, ioh, ID_REG);
239 if (eepromreadall(iot, ioh, eaddr, 8))
255 bus_space_write_1(iot, ioh, COMMAND_REG, RESET_CMD);
267 bus_space_unmap(iot, ioh, 16);
270 bus_space_unmap(iot, ioh, 16);
280 bus_space_tag_t iot;
288 iot = ia->ia_iot;
290 if (bus_space_map(iot, ia->ia_io[0].ir_addr, 16, 0, &ioh)) {
295 sc->sc_iot = iot;
302 bus_space_write_1(iot, ioh, COMMAND_REG, RESET_CMD);
319 (void)eepromreadall(iot, ioh, eaddr, 8);
324 eepromread(iot, ioh, EEPPEther0a)) &&
326 eepromread(iot, ioh, EEPPEther1a)) &&
328 eepromread(iot, ioh, EEPPEther2a)))
366 temp = bus_space_read_1(iot, ioh, INT_NO_REG);
367 bus_space_write_1(iot, ioh, INT_NO_REG, (temp & 0xf8) | sc->mappedirq);
373 bus_space_tag_t iot;
379 iot = sc->sc_iot;
382 bus_space_write_1(iot, ioh, COMMAND_REG, RCV_DISABLE_CMD);
384 bus_space_write_1(iot, ioh, INT_MASK_REG, ALL_INTS);
385 bus_space_write_1(iot, ioh, STATUS_REG, ALL_INTS);
387 bus_space_write_1(iot, ioh, COMMAND_REG, RESET_CMD);
398 bus_space_write_2(iot, ioh, HOST_ADDR_REG, p);
400 v = le16toh(bus_space_read_stream_2(iot, ioh, MEM_PORT_REG));
404 v = le16toh(bus_space_read_stream_2(iot, ioh, MEM_PORT_REG));
410 p = le16toh(bus_space_read_stream_2(iot, ioh, MEM_PORT_REG));
413 v = le16toh(bus_space_read_stream_2(iot, ioh, MEM_PORT_REG));
441 bus_space_tag_t iot;
444 iot = sc->sc_iot;
452 bus_space_write_1(iot, ioh, 0, BANK_SEL(2));
454 temp = bus_space_read_1(iot, ioh, EEPROM_REG);
456 bus_space_write_1(iot, ioh, EEPROM_REG, temp & ~0x10);
459 bus_space_write_1(iot, ioh, I_ADD(i), CLLADDR(ifp->if_sadl)[i]);
462 temp = bus_space_read_1(iot, ioh, REG1);
463 bus_space_write_1(iot, ioh, REG1,
471 bus_space_write_1(iot, ioh, RECV_MODES_REG, temp);
486 temp = bus_space_read_1(iot, ioh, MEDIA_SELECT);
487 bus_space_write_1(iot, ioh, MEDIA_SELECT, temp);
493 temp = bus_space_read_1(iot, ioh, MEDIA_SELECT);
534 bus_space_write_1(iot, ioh, MEDIA_SELECT, temp);
546 bus_space_write_1(iot, ioh, 0, BANK_SEL(0));
547 bus_space_write_1(iot, ioh, INT_MASK_REG, ALL_INTS);
548 bus_space_write_1(iot, ioh, 0, BANK_SEL(1));
550 temp = bus_space_read_1(iot, ioh, INT_NO_REG);
551 bus_space_write_1(iot, ioh, INT_NO_REG, (temp & 0xf8) | sc->mappedirq);
562 temp = bus_space_read_1(iot, ioh, INT_NO_REG);
569 bus_space_write_1(iot, ioh, RCV_LOWER_LIMIT_REG, 0);
570 bus_space_write_1(iot, ioh, RCV_UPPER_LIMIT_REG, (sc->rx_size -2) >>8);
571 bus_space_write_1(iot, ioh, XMT_LOWER_LIMIT_REG, sc->rx_size >>8);
572 bus_space_write_1(iot, ioh, XMT_UPPER_LIMIT_REG, (sc->sram - 2) >>8);
574 temp = bus_space_read_1(iot, ioh, REG1);
585 bus_space_write_1(iot, ioh, REG1, temp | INT_ENABLE); /* XXX what about WORD_WIDTH? */
591 temp = bus_space_read_1(iot, ioh, REG1);
598 bus_space_write_1(iot, ioh, 0, BANK_SEL(0));
600 bus_space_write_1(iot, ioh, INT_MASK_REG,
602 bus_space_write_1(iot, ioh, STATUS_REG, ALL_INTS); /* clear ints */
604 bus_space_write_1(iot, ioh, RCV_COPY_THRESHOLD, 0);
606 bus_space_write_2(iot, ioh, RCV_START_LOW, 0);
607 bus_space_write_2(iot, ioh, RCV_STOP_LOW, sc->rx_size - 2);
610 bus_space_write_1(iot, ioh, 0, SEL_RESET_CMD);
613 bus_space_write_2(iot, ioh, XMT_ADDR_REG, sc->rx_size);
618 bus_space_write_1(iot, ioh, 0, RCV_ENABLE_CMD);
637 bus_space_tag_t iot;
653 iot = sc->sc_iot;
712 bus_space_write_1(iot, ioh, 0, BANK_SEL(2));
714 temp = bus_space_read_1(iot, ioh, REG1);
715 bus_space_write_1(iot, ioh, REG1,
718 bus_space_write_1(iot, ioh, 0, BANK_SEL(0));
738 bus_space_write_2(iot, ioh, HOST_ADDR_REG, last);
739 bus_space_write_stream_2(iot, ioh, MEM_PORT_REG,
742 bus_space_write_2(iot, ioh, MEM_PORT_REG, 0);
743 bus_space_write_2(iot, ioh, MEM_PORT_REG, 0);
745 bus_space_write_stream_2(iot, ioh, MEM_PORT_REG,
759 bus_space_write_stream_2(iot, ioh,
768 bus_space_write_multi_stream_2(iot, ioh,
784 bus_space_write_stream_2(iot, ioh, MEM_PORT_REG,
789 bus_space_write_stream_2(iot, ioh, MEM_PORT_REG, 0);
800 bus_space_write_2(iot, ioh, HOST_ADDR_REG,
807 stat = bus_space_read_stream_2(iot, ioh, MEM_PORT_REG);
809 bus_space_write_2(iot, ioh, HOST_ADDR_REG,
812 bus_space_write_stream_2(iot, ioh, MEM_PORT_REG,
815 bus_space_write_stream_2(iot, ioh, MEM_PORT_REG,
824 stat = bus_space_read_2(iot, ioh, MEM_PORT_REG);
831 bus_space_write_2(iot, ioh, XMT_ADDR_REG, last);
832 bus_space_write_1(iot, ioh, 0, XMT_CMD);
839 bus_space_write_1(iot, ioh, 0, RESUME_XMT_CMD);
849 bus_space_write_1(iot, ioh, 0, BANK_SEL(2));
851 temp = bus_space_read_1(iot, ioh, REG1);
852 bus_space_write_1(iot, ioh, REG1, temp | XMT_CHAIN_INT);
854 bus_space_write_1(iot, ioh, 0, BANK_SEL(0));
859 eepromwritebit(bus_space_tag_t iot, bus_space_handle_t ioh, int what)
861 bus_space_write_1(iot, ioh, EEPROM_REG, what);
863 bus_space_write_1(iot, ioh, EEPROM_REG, what | EESK);
865 bus_space_write_1(iot, ioh, EEPROM_REG, what);
870 eepromreadbit(bus_space_tag_t iot, bus_space_handle_t ioh)
874 bus_space_write_1(iot, ioh, EEPROM_REG, EECS | EESK);
876 b = bus_space_read_1(iot, ioh, EEPROM_REG);
877 bus_space_write_1(iot, ioh, EEPROM_REG, EECS);
884 eepromread(bus_space_tag_t iot, bus_space_handle_t ioh, int offset)
890 bus_space_write_1(iot, ioh, 0, BANK_SEL(2));
892 bus_space_write_1(iot, ioh, EEPROM_REG, EECS); /* XXXX??? */
895 eepromwritebit(iot, ioh, EECS | EEDI);
896 eepromwritebit(iot, ioh, EECS | EEDI);
897 eepromwritebit(iot, ioh, EECS);
901 eepromwritebit(iot, ioh, EECS | EEDI);
903 eepromwritebit(iot, ioh, EECS);
908 readval |= eepromreadbit(iot, ioh);
911 bus_space_write_1(iot, ioh, EEPROM_REG, 0 | EESK);
913 bus_space_write_1(iot, ioh, EEPROM_REG, 0);
915 bus_space_write_1(iot, ioh, COMMAND_REG, BANK_SEL(0));
942 bus_space_tag_t iot;
948 iot = sc->sc_iot;
953 status = bus_space_read_1(iot, ioh, STATUS_REG);
964 "\020\6ABORT", bus_space_read_1(iot, ioh, 0));
975 bus_space_write_1(iot, ioh, STATUS_REG, RX_INT);
982 bus_space_write_1(iot, ioh, STATUS_REG, TX_INT);
991 iyget(struct iy_softc *sc, bus_space_tag_t iot, bus_space_handle_t ioh,
1034 bus_space_read_multi_stream_2(iot, ioh, MEM_PORT_REG,
1041 *(mtod(m, char *)) = bus_space_read_stream_2(iot, ioh,
1064 bus_space_tag_t iot;
1069 iot = sc->sc_iot;
1073 bus_space_write_2(iot, ioh, HOST_ADDR_REG, rxadrs);
1074 rxevnt = le16toh(bus_space_read_stream_2(iot, ioh, MEM_PORT_REG));
1078 rxstatus = le16toh(bus_space_read_stream_2(iot, ioh,
1080 rxnext = le16toh(bus_space_read_stream_2(iot, ioh,
1082 rxlen = le16toh(bus_space_read_stream_2(iot, ioh,
1099 iyget(sc, iot, ioh, rxlen);
1102 bus_space_write_2(iot, ioh, RCV_STOP_LOW,
1105 bus_space_write_2(iot, ioh, HOST_ADDR_REG, rxnext);
1107 rxevnt = le16toh(bus_space_read_stream_2(iot, ioh,
1116 bus_space_tag_t iot;
1122 iot = sc->sc_iot;
1126 bus_space_write_2(iot, ioh, HOST_ADDR_REG, sc->tx_start);
1127 txstatus = le16toh(bus_space_read_stream_2(iot, ioh,
1133 txstat2 = le16toh(bus_space_read_stream_2(iot, ioh,
1135 txnext = le16toh(bus_space_read_stream_2(iot, ioh,
1137 txlen = le16toh(bus_space_read_stream_2(iot, ioh,
1300 bus_space_tag_t iot;
1311 iot = sc->sc_iot;
1327 bus_space_write_1(iot, ioh, 0, BANK_SEL(2));
1328 bus_space_write_1(iot, ioh, RECV_MODES_REG, MATCH_BRDCST);
1330 temp = bus_space_read_1(iot, ioh, MEDIA_SELECT);
1331 bus_space_write_1(iot, ioh, MEDIA_SELECT, temp);
1333 bus_space_write_1(iot, ioh, 0, BANK_SEL(0));
1334 bus_space_write_2(iot, ioh, HOST_ADDR_REG, last);
1335 bus_space_write_stream_2(iot, ioh, MEM_PORT_REG, htole16(MC_SETUP_CMD));
1336 bus_space_write_2(iot, ioh, MEM_PORT_REG, 0);
1337 bus_space_write_2(iot, ioh, MEM_PORT_REG, 0);
1338 bus_space_write_stream_2(iot, ioh, MEM_PORT_REG, htole16(len));
1345 bus_space_write_multi_stream_2(iot, ioh, MEM_PORT_REG,
1351 dum = bus_space_read_2(iot, ioh, MEM_PORT_REG); /* dummy read */
1353 bus_space_write_2(iot, ioh, XMT_ADDR_REG, last);
1354 bus_space_write_1(iot, ioh, 0, MC_SETUP_CMD);
1362 if ((bus_space_read_1(iot, ioh, STATUS_REG) & EXEC_INT) == 0)
1365 temp = bus_space_read_1(iot, ioh, 0);
1366 bus_space_write_1(iot, ioh, STATUS_REG, EXEC_INT);
1390 bus_space_tag_t iot;
1397 iot = sc->sc_iot;
1433 bus_space_write_1(iot, ioh, 0, BANK_SEL(2));
1439 bus_space_write_1(iot, ioh, RECV_MODES_REG, temp);
1441 temp = bus_space_read_1(iot, ioh, MEDIA_SELECT);
1442 bus_space_write_1(iot, ioh, MEDIA_SELECT, temp);
1446 bus_space_write_1(iot, ioh, 0, BANK_SEL(0));
1464 bus_space_tag_t iot;
1468 iot = sc->sc_iot;
1471 bus_space_write_1(iot, ioh, COMMAND_REG, BANK_SEL(0));
1473 bus_space_write_2(iot, ioh, HOST_ADDR_REG, 4096-2);
1474 bus_space_write_2(iot, ioh, MEM_PORT_REG, 0);
1477 bus_space_write_2(iot, ioh, HOST_ADDR_REG, testing-2);
1478 bus_space_write_2(iot, ioh, MEM_PORT_REG, 0xdead);
1479 bus_space_write_2(iot, ioh, HOST_ADDR_REG, testing-2);
1480 if (bus_space_read_2(iot, ioh, MEM_PORT_REG) != 0xdead) {
1488 bus_space_write_2(iot, ioh, HOST_ADDR_REG, testing-2);
1489 bus_space_write_2(iot, ioh, MEM_PORT_REG, 0xbeef);
1490 bus_space_write_2(iot, ioh, HOST_ADDR_REG, testing-2);
1491 if (bus_space_read_2(iot, ioh, MEM_PORT_REG) != 0xbeef) {
1499 bus_space_write_2(iot, ioh, HOST_ADDR_REG, 0);
1500 bus_space_write_2(iot, ioh, MEM_PORT_REG, 0);
1501 bus_space_write_2(iot, ioh, HOST_ADDR_REG, testing >> 1);
1502 bus_space_write_2(iot, ioh, MEM_PORT_REG, testing >> 1);
1503 bus_space_write_2(iot, ioh, HOST_ADDR_REG, 0);
1504 if (bus_space_read_2(iot, ioh, MEM_PORT_REG) == (testing >> 1)) {
1540 eepromreadall(bus_space_tag_t iot, bus_space_handle_t ioh, uint16_t *wordp,
1549 tmp = eepromread(iot, ioh, i);