Home | History | Annotate | Download | only in dev

Lines Matching refs:rp

287 	siop_regmap_p rp = sc->sc_siopp;
306 while (((istat = rp->siop_istat) &
312 rp->siop_sbcl, istat, rp->siop_sbdl, rp->siop_dsp,
313 rp->siop_dsp - sc->sc_scriptspa,
314 *((volatile long *)&rp->siop_dcmd), &acb->ds, acb->xs->timeout);
325 sist = rp->siop_sist;
326 dstat = rp->siop_dstat;
333 rp->siop_sien = sc->sc_sien;
334 rp->siop_dien = sc->sc_dien;
484 siopngabort(register struct siop_softc *sc, siop_regmap_p rp, const char *where)
492 where, rp->siop_dstat, rp->siop_istat, rp->siop_sist,
493 rp->siop_sien, rp->siop_sbcl);
498 SET_SBIC_cmd (rp, SBIC_CMD_ABORT);
499 WAIT_CIP (rp);
501 GET_SBIC_asr (rp, asr);
506 SET_SBIC_cmd (rp, SBIC_CMD_RESET);
508 SBIC_WAIT(rp, SBIC_ASR_INT, 0);
509 GET_SBIC_csr (rp, csr); /* clears interrupt also */
516 SBIC_WAIT (rp, SBIC_ASR_INT, 0);
517 GET_SBIC_csr (rp, csr);
621 siop_regmap_p rp;
626 rp = sc->sc_siopp;
629 siopngabort(sc, rp, "reset");
639 rp->siop_istat |= SIOP_ISTAT_ABRT; /* abort current script */
640 rp->siop_istat |= SIOP_ISTAT_RST; /* reset chip */
641 rp->siop_istat &= ~SIOP_ISTAT_RST;
645 rp->siop_sien = 0;
646 rp->siop_scntl1 |= SIOP_SCNTL1_RST;
648 rp->siop_scntl1 &= ~SIOP_SCNTL1_RST;
653 rp->siop_stest1 |= SIOP_STEST1_DBLEN; /* SCLK doubler enable */
655 rp->siop_stest3 |= SIOP_STEST3_HSC; /* Halt SCSI clock */
656 rp->siop_scntl3 = 0x15; /* SCF/CCF*/
657 rp->siop_stest1 |= SIOP_STEST1_DBLSEL; /* SCLK doubler select */
658 rp->siop_stest3 &= ~SIOP_STEST3_HSC; /* Clear Halt SCSI clock */
659 rp->siop_scntl0 = SIOP_ARB_FULL | /*SIOP_SCNTL0_EPC |*/ SIOP_SCNTL0_EPG;
660 rp->siop_dcntl = sc->sc_dcntl;
661 rp->siop_dmode = 0xc0; /* XXX burst length */
662 rp->siop_sien = 0x00; /* don't enable interrupts yet */
663 rp->siop_dien = 0x00; /* don't enable interrupts yet */
664 rp->siop_scid = sc->sc_channel.chan_id |
666 rp->siop_respid = 1 << sc->sc_channel.chan_id;
667 rp->siop_dwt = 0x00;
668 rp->siop_stime0 = 0x0c; /* XXXXX check */
673 i = rp->siop_istat;
675 dummy = rp->siop_sist;
677 dummy = rp->siop_dstat;
687 if ((rp->siop_sbdl & 0x00ff) == 0x00ff) {
694 rp->siop_sien = sc->sc_sien;
695 rp->siop_dien = sc->sc_dien;
704 if ((rp->siop_sbdl & 0xff00) == 0xff00) {
715 siopng_chips[rp->siop_macntl>>4],
717 rp->siop_ctest3 >> 4);
750 rp->siop_sien = sc->sc_sien;
751 rp->siop_dien = sc->sc_dien;
763 siop_regmap_p rp = sc->sc_siopp;
773 if (siopng_debug & 0x100 && rp->siop_sbcl & SIOP_BSY) {
774 printf ("ACK! siopng was busy: rp %p script %p dsa %p active %ld\n",
775 rp, &siopng_scripts, &acb->ds, sc->sc_active);
777 rp->siop_istat, rp->siop_sfbr, rp->siop_respid,
778 rp->siop_sien, rp->siop_dien);
927 if (siopng_debug & 0x100 && rp->siop_sbcl & SIOP_BSY) {
928 printf ("ACK! siopng was busy at start: rp %p script %p dsa %p active %ld\n",
929 rp, &siopng_scripts, &acb->ds, sc->sc_active);
938 if (rp->siop_istat & SIOP_ISTAT_CON)
941 rp->siop_temp = 0;
943 rp->siop_scntl3 = sc->sc_sync[target].scntl3;
946 rp->siop_dsa = kvtop((void *)&acb->ds);
948 rp->siop_dsp = sc->sc_scriptspa;
952 if ((rp->siop_istat & SIOP_ISTAT_CON) == 0) {
953 rp->siop_istat = SIOP_ISTAT_SIGP;
957 SIOP_TRACE('s',3,rp->siop_istat,0);
973 siop_regmap_p rp = sc->sc_siopp;
978 dfifo = rp->siop_dfifo;
979 dbc = rp->siop_dbc0;
980 sstat0 = rp->siop_sstat0;
981 sstat1 = rp->siop_sstat1;
983 sstat2 = rp->siop_sstat2;
984 rp->siop_ctest3 |= SIOP_CTEST8_CLF;
985 while ((rp->siop_ctest1 & SIOP_CTEST1_FMT) != SIOP_CTEST1_FMT)
987 rp->siop_ctest3 &= ~SIOP_CTEST8_CLF;
994 istat, dstat, sist, rp->siop_dsps, rp->siop_sbcl, acb->stat[0], acb->msg[0]);
1000 if (rp->siop_dsp && (rp->siop_dsp < sc->sc_scriptspa ||
1001 rp->siop_dsp >= sc->sc_scriptspa + sizeof(siopng_scripts))) {
1003 device_xname(sc->sc_dev), rp->siop_dsp, sc->sc_scriptspa,
1012 SIOP_TRACE('i',dstat,istat,(istat&SIOP_ISTAT_DIP)?rp->siop_dsps&0xff:sist);
1013 if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff00) {
1016 if (rp->siop_dsa != kvtop((void *)&acb->ds)) {
1017 printf ("siopng: invalid dsa: %lx %x\n", rp->siop_dsa,
1060 if (rp->siop_sbcl & SIOP_BSY) {
1061 /*printf ("ACK! siop was busy at end: rp %x script %x dsa %x\n",
1062 rp, &siopng_scripts, &acb->ds);*/
1072 rp->siop_dcntl |= SIOP_DCNTL_STD;
1075 if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff0b) {
1094 rp->siop_scntl3 = sc->sc_sync[target].scntl3;
1098 rp->siop_dsp = sc->sc_scriptspa + Ent_clear_ack;
1102 rp->siop_dcntl |= SIOP_DCNTL_STD;
1149 rp->siop_sxfer = sc->sc_sync[target].sxfer;
1150 rp->siop_scntl3 = sc->sc_sync[target].scntl3;
1154 rp->siop_dsp = sc->sc_scriptspa + Ent_clear_ack;
1158 rp->siop_dcntl |= SIOP_DCNTL_STD;
1184 *((long *)__UNVOLATILE(&rp->siop_dcmd)) & 0xffffff;
1187 *((long *)__UNVOLATILE(&rp->siop_dnad)) - adjust;
1193 dbc, sstat1, adjust, rp->siop_sbcl, siopngstarts, acb);
1205 SIOP_TRACE('m',rp->siop_sbcl,(rp->siop_dsp>>8),rp->siop_dsp);
1208 rp->siop_sbcl,
1209 rp->siop_dsp - sc->sc_scriptspa,
1210 *((volatile long *)&rp->siop_dcmd));
1212 if ((rp->siop_sbcl & SIOP_REQ) == 0) {
1214 rp->siop_sbcl, rp->siop_dsp);
1219 switch (rp->siop_sbcl & 7) {
1226 rp->siop_dsp = sc->sc_scriptspa + Ent_switch;
1239 if (rp->siop_sbcl & SIOP_BSY) {
1240 printf ("ACK! siop was busy at timeout: rp %p script %p dsa %p\n",
1241 rp, &siopng_scripts, &acb->ds);
1243 rp->siop_sbcl, rp->siop_sdid, istat, dstat, sist);
1244 if (!(rp->siop_sbcl & SIOP_BSY)) {
1249 rp->siop_dsp = sc->sc_scriptspa + Ent_wait_reselect;
1255 /* rp->siop_dcntl |= SIOP_DCNTL_STD;*/
1262 rp->siop_dsp = sc->sc_scriptspa + Ent_wait_reselect;
1282 siopngabort (sc, rp, "siopngchkintr");
1286 rp->siop_dsp = sc->sc_scriptspa + Ent_wait_reselect;
1291 if (dstat & SIOP_DSTAT_SIR && (rp->siop_dsps == 0xff01 ||
1292 rp->siop_dsps == 0xff02)) {
1296 device_xname(sc->sc_dev), 1 << target, rp->siop_temp,
1297 rp->siop_temp ? rp->siop_temp - sc->sc_scriptspa : 0,
1314 if (acb->iob_len && rp->siop_temp) {
1315 int n = rp->siop_temp - sc->sc_scriptspa;
1353 if (rp->siop_dsps == 0xff02)
1410 rp->siop_dsp = sc->sc_scriptspa + Ent_wait_reselect;
1418 rp->siop_dcntl |= SIOP_DCNTL_STD;
1422 if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff03) {
1423 int reselid = rp->siop_scratcha & 0x7f;
1424 int reselun = rp->siop_sfbr & 0x07;
1426 sc->sc_sstat1 = rp->siop_sbcl; /* XXXX save current SBCL */
1431 rp->siop_dsps);
1432 if ((rp->siop_sfbr & 0x80) == 0)
1434 device_xname(sc->sc_dev), rp->siop_sfbr);
1461 rp->siop_dsa = kvtop((void *)&acb->ds);
1463 rp->siop_sxfer =
1466 rp->siop_scntl3 =
1479 rp->siop_temp = 0;
1480 rp->siop_dcntl |= SIOP_DCNTL_STD;
1484 if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff04) {
1486 u_short ctest2 = rp->siop_ctest2;
1492 device_xname(sc->sc_dev), rp->siop_scntl1,
1493 ctest2, rp->siop_sfbr, istat, rp->siop_istat);
1507 rp->siop_dcntl |= SIOP_DCNTL_STD;
1511 rp->siop_temp = 0;
1512 rp->siop_dsa = kvtop((void *)&sc->sc_nexus->ds);
1514 rp->siop_sxfer = sc->sc_sync[target].sxfer;
1516 rp->siop_scntl3 = sc->sc_sync[target].scntl3;
1519 rp->siop_dsp = sc->sc_scriptspa;
1523 if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff06) {
1530 device_xname(sc->sc_dev), rp->siop_sfbr, acb->msg[1], rp->siop_sbcl);
1533 rp->siop_dsp = sc->sc_scriptspa + Ent_clear_ack;
1537 if (dstat & SIOP_DSTAT_SIR && rp->siop_dsps == 0xff0a) {
1540 device_xname(sc->sc_dev), rp->siop_sbcl, rp->siop_sbdl);
1541 if (rp->siop_sbcl == 0xa7) {
1543 rp->siop_dcntl |= SIOP_DCNTL_STD;
1551 rp->siop_dsps, acb->stat[0], acb->msg[0], acb->msg[1],
1552 rp->siop_sbcl);
1571 printf ("scripts %lx ds %x rp %x dsp %lx dcmd %lx\n",
1573 (unsigned)kvtop((void *)__UNVOLATILE(rp)), rp->siop_dsp,
1574 *((long *)__UNVOLATILE(&rp->siop_dcmd)));
1576 istat, dstat, sist, rp->siop_dsps, rp->siop_dsa,
1577 rp->siop_sbcl, acb->stat[0], acb->msg[0], acb->msg[1], rp->siop_sfbr);
1593 siop_regmap_p rp;
1601 rp = sc->sc_siopp;
1605 if ((rp->siop_istat & 0x08) == 0) {
1606 rp->siop_sien = 0;
1607 rp->siop_dien = 0;
1612 if ((rp->siop_istat & 0x08) == 0) {
1613 rp->siop_sien = sc->sc_sien;
1614 rp->siop_dien = sc->sc_dien;
1639 siop_regmap_p rp;
1652 rp = sc->sc_siopp;
1656 sc->sc_intcode = rp->siop_dsps;
1674 rp->siop_dsps, rp->siop_sbcl,
1680 rp->siop_sien = sc->sc_sien;
1681 rp->siop_dien = sc->sc_dien;
1690 if (rp->siop_sbcl & SIOP_BSY) {
1695 rp->siop_sbcl, rp->siop_sfbr, rp->siop_respid,
1696 rp->siop_dsp - sc->sc_scriptspa);
1768 siop_regmap_p rp = sc->sc_siopp;
1771 rp->siop_scntl0, rp->siop_scntl1, rp->siop_scntl2, rp->siop_scntl3);
1773 rp->siop_scid, rp->siop_sxfer, rp->siop_sdid, rp->siop_gpreg);
1775 rp->siop_sfbr, rp->siop_socl, rp->siop_ssid, rp->siop_sbcl);
1777 rp->siop_dstat, rp->siop_sstat0, rp->siop_sstat1, rp->siop_sstat2);
1779 rp->siop_ctest0, rp->siop_ctest1, rp->siop_ctest2, rp->siop_ctest3);
1781 0, rp->siop_ctest4, rp->siop_ctest5, rp->siop_ctest6);
1783 rp->siop_dcmd, rp->siop_dbc2, rp->siop_dbc1, rp->siop_dbc0);
1785 rp->siop_dmode, rp->siop_dien, rp->siop_dwt, rp->siop_dcntl);
1787 rp->siop_stest0, rp->siop_stest1, rp->siop_stest2, rp->siop_stest3);
1789 rp->siop_istat, rp->siop_sien, rp->siop_sist, rp->siop_respid);
1791 rp->siop_sidl, rp->siop_sodl, rp->siop_sbdl);
1793 rp->siop_dsps, rp->siop_dsp, rp->siop_dsp > sc->sc_scriptspa ?
1794 rp->siop_dsp - sc->sc_scriptspa : 0);
1796 rp->siop_dsa, rp->siop_temp, rp->siop_dnad);
1798 rp->siop_scratcha, rp->siop_scratchb, rp->siop_adder);
1846 siop_regmap_p rp = sc->sc_siopp;
1855 device_xname(sc->sc_dev), sc, rp, rp->siop_istat);