summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio/siovar.h
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-11-26 07:39:51 +0000
committerimp <imp@FreeBSD.org>2001-11-26 07:39:51 +0000
commitb81d338044f3ac68d3c7a8a919932f5291954137 (patch)
tree22a359138de748f0c30c96f678a41c6ac8f3c1ca /sys/dev/sio/siovar.h
parent31e236c67382da93a93ae78dbeb8c445088b17bc (diff)
downloadFreeBSD-src-b81d338044f3ac68d3c7a8a919932f5291954137.zip
FreeBSD-src-b81d338044f3ac68d3c7a8a919932f5291954137.tar.gz
bde suggests that sio really wants to manage its own softc. This
allows us to move the sio softc data structure back into sio.c and reduce the complexity of the non sio.c sio files. Submitted by: bde # I didn't fix the locking issues that bruce also submitted.
Diffstat (limited to 'sys/dev/sio/siovar.h')
-rw-r--r--sys/dev/sio/siovar.h112
1 files changed, 0 insertions, 112 deletions
diff --git a/sys/dev/sio/siovar.h b/sys/dev/sio/siovar.h
index 7d95fe9..ebc2968 100644
--- a/sys/dev/sio/siovar.h
+++ b/sys/dev/sio/siovar.h
@@ -33,118 +33,6 @@
* $FreeBSD$
*/
-#define SET_FLAG(dev, bit) device_set_flags(dev, device_get_flags(dev) | (bit))
-#define CLR_FLAG(dev, bit) device_set_flags(dev, device_get_flags(dev) & ~(bit))
-
-#define CE_NTYPES 3
-
-/* types. XXX - should be elsewhere */
-typedef u_int Port_t; /* hardware port */
-typedef u_char bool_t; /* boolean */
-
-/* queue of linear buffers */
-struct lbq {
- u_char *l_head; /* next char to process */
- u_char *l_tail; /* one past the last char to process */
- struct lbq *l_next; /* next in queue */
- bool_t l_queued; /* nonzero if queued */
-};
-
-/* com device structure */
-struct com_s {
- u_int flags; /* Copy isa device flags */
- u_char state; /* miscellaneous flag bits */
- bool_t active_out; /* nonzero if the callout device is open */
- u_char cfcr_image; /* copy of value written to CFCR */
-#ifdef COM_ESP
- bool_t esp; /* is this unit a hayes esp board? */
-#endif
- u_char extra_state; /* more flag bits, separate for order trick */
- u_char fifo_image; /* copy of value written to FIFO */
- bool_t hasfifo; /* nonzero for 16550 UARTs */
- bool_t st16650a; /* Is a Startech 16650A or RTS/CTS compat */
- bool_t loses_outints; /* nonzero if device loses output interrupts */
- u_char mcr_image; /* copy of value written to MCR */
-#ifdef COM_MULTIPORT
- bool_t multiport; /* is this unit part of a multiport device? */
-#endif /* COM_MULTIPORT */
- bool_t no_irq; /* nonzero if irq is not attached */
- bool_t gone; /* hardware disappeared */
- bool_t poll; /* nonzero if polling is required */
- bool_t poll_output; /* nonzero if polling for output is required */
- int unit; /* unit number */
- int dtr_wait; /* time to hold DTR down on close (* 1/hz) */
- u_int tx_fifo_size;
- u_int wopeners; /* # processes waiting for DCD in open() */
-
- /*
- * The high level of the driver never reads status registers directly
- * because there would be too many side effects to handle conveniently.
- * Instead, it reads copies of the registers stored here by the
- * interrupt handler.
- */
- u_char last_modem_status; /* last MSR read by intr handler */
- u_char prev_modem_status; /* last MSR handled by high level */
-
- u_char hotchar; /* ldisc-specific char to be handled ASAP */
- u_char *ibuf; /* start of input buffer */
- u_char *ibufend; /* end of input buffer */
- u_char *ibufold; /* old input buffer, to be freed */
- u_char *ihighwater; /* threshold in input buffer */
- u_char *iptr; /* next free spot in input buffer */
- int ibufsize; /* size of ibuf (not include error bytes) */
- int ierroff; /* offset of error bytes in ibuf */
-
- struct lbq obufq; /* head of queue of output buffers */
- struct lbq obufs[2]; /* output buffers */
-
- bus_space_tag_t bst;
- bus_space_handle_t bsh;
-
- Port_t data_port; /* i/o ports */
-#ifdef COM_ESP
- Port_t esp_port;
-#endif
- Port_t int_id_port;
- Port_t modem_ctl_port;
- Port_t line_status_port;
- Port_t modem_status_port;
- Port_t intr_ctl_port; /* Ports of IIR register */
-
- struct tty *tp; /* cross reference */
-
- /* Initial state. */
- struct termios it_in; /* should be in struct tty */
- struct termios it_out;
-
- /* Lock state. */
- struct termios lt_in; /* should be in struct tty */
- struct termios lt_out;
-
- bool_t do_timestamp;
- bool_t do_dcd_timestamp;
- struct timeval timestamp;
- struct timeval dcd_timestamp;
- struct pps_state pps;
-
- u_long bytes_in; /* statistics */
- u_long bytes_out;
- u_int delta_error_counts[CE_NTYPES];
- u_long error_counts[CE_NTYPES];
-
- struct resource *irqres;
- struct resource *ioportres;
- void *cookie;
- dev_t devs[6];
-
- /*
- * Data area for output buffers. Someday we should build the output
- * buffer queue without copying data.
- */
- u_char obuf1[256];
- u_char obuf2[256];
-};
-
int sioattach __P((device_t dev, int xrid));
int siodetach __P((device_t dev));
int sioprobe __P((device_t dev, int xrid, int noprobe));
OpenPOWER on IntegriCloud