cy.c (9626) | cy.c (9639) |
---|---|
1/*- 2 * cyclades cyclom-y serial driver 3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993 4 * 5 * Copyright (c) 1993 Andrew Herbert. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * | 1/*- 2 * cyclades cyclom-y serial driver 3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993 4 * 5 * Copyright (c) 1993 Andrew Herbert. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * |
30 * $Id: cy.c,v 1.9 1995/07/21 22:51:31 bde Exp $ | 30 * $Id: cy.c,v 1.10 1995/07/22 01:29:58 bde Exp $ |
31 */ 32 33#include "cy.h" 34#if NCY > 0 35/* 36 * TODO: 37 * Check that cy16's work. 38 * Implement BREAK. --- 107 unchanged lines hidden (view full) --- 146#define sio_tty cy_tty 147 148#define CY_MAX_PORTS (CD1400_NO_OF_CHANNELS * CY_MAX_CD1400s) 149 150/* We encode the cyclom unit number (cyu) in spare bits in the IVR's. */ 151#define CD1400_xIVR_CHAN_SHIFT 3 152#define CD1400_xIVR_CHAN 0x0F /* XXX reduce to pack Cyclom-8Ys */ 153 | 31 */ 32 33#include "cy.h" 34#if NCY > 0 35/* 36 * TODO: 37 * Check that cy16's work. 38 * Implement BREAK. --- 107 unchanged lines hidden (view full) --- 146#define sio_tty cy_tty 147 148#define CY_MAX_PORTS (CD1400_NO_OF_CHANNELS * CY_MAX_CD1400s) 149 150/* We encode the cyclom unit number (cyu) in spare bits in the IVR's. */ 151#define CD1400_xIVR_CHAN_SHIFT 3 152#define CD1400_xIVR_CHAN 0x0F /* XXX reduce to pack Cyclom-8Ys */ 153 |
154/* 155 * XXX temporary kludges for 2.0 (XXX TK2.0). 156 */ 157#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq) 158 | |
159#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */ 160#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE) 161#define RS_IBUFSIZE 256 162 163#define CALLOUT_MASK 0x80 164#define CONTROL_MASK 0x60 165#define CONTROL_INIT_STATE 0x20 166#define CONTROL_LOCK_STATE 0x40 --- 224 unchanged lines hidden (view full) --- 391#endif 392 393static int comconsole = CONUNIT; 394static speed_t comdefaultrate = TTYDEF_SPEED; 395static u_int com_events; /* input chars + weighted output completions */ 396static int commajor; 397static int sio_timeout; 398static int sio_timeouts_until_log; | 154#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */ 155#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE) 156#define RS_IBUFSIZE 256 157 158#define CALLOUT_MASK 0x80 159#define CONTROL_MASK 0x60 160#define CONTROL_INIT_STATE 0x20 161#define CONTROL_LOCK_STATE 0x40 --- 224 unchanged lines hidden (view full) --- 386#endif 387 388static int comconsole = CONUNIT; 389static speed_t comdefaultrate = TTYDEF_SPEED; 390static u_int com_events; /* input chars + weighted output completions */ 391static int commajor; 392static int sio_timeout; 393static int sio_timeouts_until_log; |
399#if 0 /* XXX TK2.0 */ | 394#if 0 /* XXX */ |
400static struct tty *sio_tty[NSIO]; 401#else 402static struct tty sio_tty[NSIO]; 403static int nsio_tty = NSIO; 404#endif 405 406#ifdef KGDB 407#include <machine/remote-sl.h> --- 209 unchanged lines hidden (view full) --- 617 int unit; 618 619 mynor = minor(dev); 620 unit = MINOR_TO_UNIT(mynor); 621 if ((u_int) unit >= NSIO || (com = com_addr(unit)) == NULL) 622 return (ENXIO); 623 if (mynor & CONTROL_MASK) 624 return (0); | 395static struct tty *sio_tty[NSIO]; 396#else 397static struct tty sio_tty[NSIO]; 398static int nsio_tty = NSIO; 399#endif 400 401#ifdef KGDB 402#include <machine/remote-sl.h> --- 209 unchanged lines hidden (view full) --- 612 int unit; 613 614 mynor = minor(dev); 615 unit = MINOR_TO_UNIT(mynor); 616 if ((u_int) unit >= NSIO || (com = com_addr(unit)) == NULL) 617 return (ENXIO); 618 if (mynor & CONTROL_MASK) 619 return (0); |
625#if 0 /* XXX TK2.0 */ | 620#if 0 /* XXX */ |
626 tp = com->tp = sio_tty[unit] = ttymalloc(sio_tty[unit]); 627#else 628 tp = com->tp = &sio_tty[unit]; 629#endif 630 s = spltty(); 631 /* 632 * We jump to this label after all non-interrupted sleeps to pick 633 * up any changes of the device state. --- 1943 unchanged lines hidden --- | 621 tp = com->tp = sio_tty[unit] = ttymalloc(sio_tty[unit]); 622#else 623 tp = com->tp = &sio_tty[unit]; 624#endif 625 s = spltty(); 626 /* 627 * We jump to this label after all non-interrupted sleeps to pick 628 * up any changes of the device state. --- 1943 unchanged lines hidden --- |