1 /* $NetBSD: epcomvar.h,v 1.3 2005/12/11 12:16:45 christos Exp $ */
3 * Copyright (c) 2004 Jesse Off
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 /* Hardware flag masks */
32 #define COM_HW_NOIEN 0x01
33 #define COM_HW_DEV_OK 0x20
34 #define COM_HW_CONSOLE 0x40
35 #define COM_HW_KGDB 0x80
37 #define RX_TTY_BLOCKED 0x01
38 #define RX_TTY_OVERFLOWED 0x02
39 #define RX_IBUF_BLOCKED 0x04
40 #define RX_IBUF_OVERFLOWED 0x08
41 #define RX_ANY_BLOCK 0x0f
43 #define EPCOM_RING_SIZE 2048
48 bus_space_tag_t sc_iot
;
49 bus_space_handle_t sc_ioh
;
55 u_char
*sc_rbuf
, *sc_ebuf
;
60 u_char
*volatile sc_rbget
,
62 volatile u_int sc_rbavail
;
65 int sc_hwflags
, sc_swflags
;
67 volatile u_int sc_rx_flags
,
74 /* control registers */
80 /* power management hooks */
81 int (*enable
)(struct epcom_softc
*);
82 int (*disable
)(struct epcom_softc
*);
85 #if NRND > 0 && defined(RND_COM)
86 rndsource_element_t rnd_source
;
90 void epcom_attach_subr(struct epcom_softc
*);
92 int epcomintr(void* arg
);
93 int epcomcnattach(bus_space_tag_t
, bus_addr_t
, bus_space_handle_t
,
96 #endif /* _EPCOMVAR_H_ */