Lines Matching defs:mode
67 * Negotiation is a mechanism for moving between modes. Compatibility mode
68 * is a default mode, from which negotiations to other modes occur and
70 * Compatibility mode provides a unidirectional (forward) channel for
73 * Each mode has a number of phases. [Mode, phase] pair represents the
91 * - Compatibility mode: byte-wide forward channel ~50KB/sec;
93 * - Nibble mode: nibble-wide (4-bit) reverse channel ~30KB/sec;
94 * - ECP mode: byte-wide bidirectional channel (~1MB/sec);
99 * State is a combination of 1284 mode {ECPP_*_MODE}, 1284 phase {ECPP_PHASE_*}
104 * pp->current_mode -- 1284 mode used for forward transfers;
105 * pp->backchannel -- 1284 mode used for backward transfers;
108 * Bidirectional operation in Compatibility mode is provided by a combination:
118 * When opened, driver is in ECPP_IDLE state, current mode is ECPP_CENTRONICS
119 * Default negotiation tries to negotiate to the best mode supported by printer,
161 * This way Nibble and ECP mode backchannel are implemented.
177 int noecp = 0; /* flag not to use ECP mode */
317 /* IEEE 1284 mode transitions */
454 ECPP_CENTRONICS /* supported mode */
611 * Initialize the chip and restore current mode if needed
850 * peripherals ( Centronics peripherals) will operate in DMA mode.
909 * In PIO mode, ecpp_isr() will loop for wait for the busy signal
918 * In PIO mode, centronics transfers must hold the data signals
925 * In PIO mode, centronics transfers asserts the strobe signal
1080 * Get ready: check host/peripheral, negotiate into default mode
1121 "ecpp_open: mode=%x, phase=%x ecr=%x, dsr=%x, dcr=%x\n",
1207 /* set link to Compatible mode */
1525 pp->xfer_parms.mode = pp->current_mode;
1599 /* must be in diagnostic mode for these commands to work */
1739 /* DSR only makes sense in Centronics & Compat mode */
1765 /* status only makes sense in Centronics & Compat mode */
2135 if (!((xferp->mode == ECPP_CENTRONICS) ||
2136 (xferp->mode == ECPP_COMPAT_MODE) ||
2137 (xferp->mode == ECPP_NIBBLE_MODE) ||
2138 (xferp->mode == ECPP_ECP_MODE) ||
2139 (xferp->mode == ECPP_DIAG_MODE))) {
2147 ecpp_error(pp->dip, "srvioc: current_mode =%x new mode=%x\n",
2148 pp->current_mode, pp->xfer_parms.mode);
2150 if (ecpp_mode_negotiation(pp, pp->xfer_parms.mode) == FAILURE) {
2154 * mode nego was a success. If nibble mode check
2176 pp->xfer_parms.mode = pp->current_mode;
2187 /* must be in diagnostic mode for these commands to work */
2216 /* must be in diagnostic mode for these commands to work */
2224 /* put superio into PIO mode */
2234 /* change to mode 110 */
2253 /* must be in diagnostic mode for these commands to work */
2292 id.mode = dp32->mode;
2317 id.mode = ECPP_NIBBLE_MODE;
2401 int mode;
2407 mode = id->mode;
2410 if ((mode < ECPP_CENTRONICS) || (mode > ECPP_ECP_MODE)) {
2411 ecpp_error(pp->dip, "ecpp_srvioc_devid: mode=%x, len=%x\n",
2412 mode, id->len);
2417 /* Currently only Nibble mode is supported */
2418 if (mode != ECPP_NIBBLE_MODE) {
2429 if (error = ecpp_getdevid(pp, NULL, &len, mode)) {
2457 error = ecpp_getdevid(pp, datamp->b_rptr, &len, mode);
2667 /* in DIAG mode clear TFIFO if needed */
2737 /* PIO mode */
2748 /* put superio into TFIFO mode, if not already */
2853 /* pport must be in PIO mode */
2928 /* set the right ECR mode and disable DMA */
3105 * delay is not needed for PIO mode
3112 /* on 97317 in Extended mode IRQ_ST of DSR is deasserted when read */
3129 * as a result, we can miss a service interrupt in PIO mode
3135 * also, nErr interrupt (ECP mode) not always reflected in DCSR
3293 /* Intr generated while invoking TFIFO mode. Exit */
3409 ecpp_error(pp->dip, "ecpp_nErr_ihdlr: mode=%x, phase=%x\n",
3447 ecpp_error(pp->dip, "ecpp_nErr_ihdlr: wrong mode!\n");
3480 * Sent next byte in PIO mode
3635 * PIO mode timeout
3657 * DMA mode timeout
3971 * In Compatibility mode, check if the peripheral is ready to accept data
4122 * Interface initialization, abnormal termination into Compatibility mode
4124 * Peripheral may be non-1284, so we set current mode to ECPP_CENTRONICS
4151 * ECP mode negotiation
4158 /* ECP mode negotiation */
4189 /* successful negotiation into ECP mode */
4199 * Nibble mode negotiation
4220 /* successful negotiation into Nibble mode */
4248 * required mode is indicated by extensibility request value
4251 * current mode is set according to xreq,
4252 * otherwise FAILURE is returned and current mode is set to
4255 * Current phase must be set by the caller (mode-specific negotiation)
4266 /* negotiation should start in Compatibility mode */
4269 /* Set host into Compat mode */
4311 * For Nibble mode Xflag must be low, otherwise it must be high
4343 * 1284 Termination: Events 22..28 - set link to Compatibility mode
4347 * (in particular, in ECP mode current phase must be Forward Idle)
4353 * current mode is ECPP_CENTRONICS, current phase is ECPP_PHASE_C_IDLE
4368 /* Set host into Compat mode, interrupts disabled */
4377 * EPP mode uses simple nInit pulse for termination
4391 /* terminate peripheral to Compat mode */
4412 /* Event 26: the peripheral puts itself in Compatible mode */
4430 /* Compatible mode Idle Phase */
4563 * implements both backchannel watchdog and transfer timeout in ECP mode
4682 * Read one byte in the Nibble mode
4768 /* this routine will read the data in Nibble mode */
4838 /* place port into PS2 mode */
4886 /* place port into PS2 mode */
4903 * Default negotiation chooses the best mode supported by peripheral
4904 * Note that backchannel mode may be different from forward mode
4925 * Negotiate to the mode indicated by newmode
4930 /* any other mode is impossible */
4952 /* put superio into PIO mode */
5023 * In DIAG mode application can do nasty things(e.g drive pins)
5024 * To keep peripheral sane, terminate to Compatibility mode
5028 /* put superio into TFIFO mode */
5044 "ecpp_mode_negotiation: mode %d not supported\n", newmode);
5051 * the interface in a mode capable of peripheral-to-host data transfer.
5052 * This requires the host periodically to place the interface in such a mode.
5150 * to Compatibility mode and FAILURE is returned
5215 * 'Request Device ID using nibble mode' negotiation
5240 /* successful negotiation into Nibble mode */
5256 * After 2) port is in Compatible mode
5261 ecpp_getdevid(struct ecppunit *pp, uint8_t *id, int *lenp, int mode)
5267 switch (mode) {
5270 if ((pp->current_mode != mode) || (id == NULL)) {
5328 * required to return the link to the Compatibility mode
5486 * clear bits 3-0 in CTR (aka DCR) prior to enabling ECP mode
5487 * CTR5 can not be cleared in SPP mode, CTR5 will return 1.
5495 /* enable ECP mode, level intr (note that DCR bits 3-0 == 0x0) */
5510 /* we are in centronic mode */
5513 /* in compatible mode with no data transfer in progress */
5520 * A new mode was set, do some mode specific reconfiguration
5583 /* ECP mode */
5633 * A new mode was set, do some mode specific reconfiguration
5890 /* set FIFO threshold 1 and ECP mode, preserve bit 7 (IRQ polarity) */
5950 /* set mode to read-from-memory. */
6300 EK_NAMED_INIT(mode);