Home | History | Annotate | Download | only in ic

Lines Matching defs:phase

56  * Gordon Ross integrated the message phase code, added lots of
125 #define ACT_CONTINUE 0x00 /* No flags: expect another phase */
195 /* This one is used when waiting for a phase change. (X100uS.) */
416 /* Ask the target for a MSG_OUT phase. */
431 sunscpal_pio_out(struct sunscpal_softc *sc, int phase, int count, uint8_t *data)
446 phase)
451 SUNSCPAL_BYTE_WRITE(sc, phase, *data++);
453 SUNSCPAL_BYTE_WRITE(sc, phase, 0);
464 sunscpal_pio_in(struct sunscpal_softc *sc, int phase, int count, uint8_t *data)
478 /* A phase change is not valid until AFTER REQ rises! */
480 phase)
485 *data++ = SUNSCPAL_BYTE_READ(sc, phase);
487 (void)SUNSCPAL_BYTE_READ(sc, phase);
1087 * Device reset is special (only uses MSG_OUT phase).
1088 * Normal commands start in MSG_OUT phase where we will
1089 * send and IDENDIFY message, and then expect CMD phase.
1126 * at the beginning of COMMAND phase.
1130 * the SCSI bus into any DATA phase.
1252 * Functions to handle each info. transfer phase:
1285 * The SCSI bus is already in the MSGI phase and there is a message byte
1289 * will expect to see another REQ (and possibly phase change).
1296 int n, phase;
1308 /* This is a new MESSAGE IN phase. Clean up our state. */
1318 * message, we have to assert ATN during the message transfer phase
1324 * First, check BSY, REQ, phase...
1337 phase = SUNSCPAL_BUS_PHASE(SUNSCPAL_READ_2(sc, sunscpal_icr));
1338 if (phase != SUNSCPAL_PHASE_MSG_IN) {
1346 /* Still in MESSAGE IN phase, and REQ is asserted. */
1485 * having changed phase in between it really asks for a
1507 * the target (the bus will never enter this MSG_OUT phase).
1513 printf("%s: bus is in MSG_OUT phase?\n", __func__);
1518 * Handle command phase.
1528 /* XXX: Do this using DMA, and get a phase change intr? */
1555 sunscpal_data_xfer(struct sunscpal_softc *sc, int phase)
1563 * When aborting a command, disallow any data phase.
1566 printf("%s: aborting, bus phase=%s (reset)\n",
1567 device_xname(sc->sc_dev), phase_names[(phase >> 8) & 7]);
1571 /* Validate expected phase (data_in or data_out) */
1574 if (phase != expected_phase) {
1575 printf("%s: data phase error\n", device_xname(sc->sc_dev));
1582 if (phase == SUNSCPAL_PHASE_DATA_IN)
1583 sunscpal_pio_in(sc, phase, 4096, NULL);
1585 sunscpal_pio_out(sc, phase, 4096, NULL);
1586 /* Make sure that caused a phase change. */
1588 phase) {
1605 * (Acknowledge the phase change there, not here.)
1618 if (phase == SUNSCPAL_PHASE_DATA_OUT) {
1619 len = sunscpal_pio_out(sc, phase,
1622 len = sunscpal_pio_in(sc, phase,
1657 * This is the big state machine that follows SCSI phase changes.
1670 int act_flags, phase, timo;
1704 * Wait for REQ before reading the phase.
1719 printf("%s: no REQ for next phase, abort\n",
1728 phase = SUNSCPAL_BUS_PHASE(SUNSCPAL_READ_2(sc, sunscpal_icr));
1729 SUNSCPAL_TRACE("machine: phase=%s\n",
1730 (long)phase_names[(phase >> 8) & 7]);
1734 * so any phase is good.
1737 switch (phase) {
1741 act_flags = sunscpal_data_xfer(sc, phase);
1761 printf("%s: Unexpected phase 0x%x\n", __func__, phase);
1767 sc->sc_prevphase = phase;
2214 * This function is called during the SELECT phase that
2215 * precedes a COMMAND phase, in case we need to setup the
2216 * DMA engine before the bus enters a DATA phase.