int t1pci_detect(avmcard *card) { int ret; if ((ret = b1dma_detect(card)) != 0) return ret; /* Transputer test */ if ( WriteReg(card, 0x80001000, 0x11) != 0 || WriteReg(card, 0x80101000, 0x22) != 0 || WriteReg(card, 0x80201000, 0x33) != 0 || WriteReg(card, 0x80301000, 0x44) != 0) return 6; if ( ReadReg(card, 0x80001000) != 0x11 || ReadReg(card, 0x80101000) != 0x22 || ReadReg(card, 0x80201000) != 0x33 || ReadReg(card, 0x80301000) != 0x44) return 7; if ( WriteReg(card, 0x80001000, 0x55) != 0 || WriteReg(card, 0x80101000, 0x66) != 0 || WriteReg(card, 0x80201000, 0x77) != 0 || WriteReg(card, 0x80301000, 0x88) != 0) return 8; if ( ReadReg(card, 0x80001000) != 0x55 || ReadReg(card, 0x80101000) != 0x66 || ReadReg(card, 0x80201000) != 0x77 || ReadReg(card, 0x80301000) != 0x88) return 9; return 0; }
int t1_detect(iavc_softc_t *sc) { int ret = b1dma_detect(sc); if (ret) return ret; if ((WriteReg(sc, 0x80001000, 0x11) != 0) || (WriteReg(sc, 0x80101000, 0x22) != 0) || (WriteReg(sc, 0x80201000, 0x33) != 0) || (WriteReg(sc, 0x80301000, 0x44) != 0)) return 6; if ((ReadReg(sc, 0x80001000) != 0x11) || (ReadReg(sc, 0x80101000) != 0x22) || (ReadReg(sc, 0x80201000) != 0x33) || (ReadReg(sc, 0x80301000) != 0x44)) return 7; if ((WriteReg(sc, 0x80001000, 0x55) != 0) || (WriteReg(sc, 0x80101000, 0x66) != 0) || (WriteReg(sc, 0x80201000, 0x77) != 0) || (WriteReg(sc, 0x80301000, 0x88) != 0)) return 8; if ((ReadReg(sc, 0x80001000) != 0x55) || (ReadReg(sc, 0x80101000) != 0x66) || (ReadReg(sc, 0x80201000) != 0x77) || (ReadReg(sc, 0x80301000) != 0x88)) return 9; return 0; /* found */ }
int b1pciv4_detect(avmcard *card) { int ret, i; if ((ret = b1dma_detect(card)) != 0) return ret; for (i=0; i < 5 ; i++) { if (WriteReg(card, 0x80A00000, 0x21) != 0) return 6; if ((ReadReg(card, 0x80A00000) & 0x01) != 0x01) return 7; } for (i=0; i < 5 ; i++) { if (WriteReg(card, 0x80A00000, 0x20) != 0) return 8; if ((ReadReg(card, 0x80A00000) & 0x01) != 0x00) return 9; } return 0; }