1 /* $NetBSD: ixp12x0_comvar.h,v 1.5 2003/03/06 06:17:43 igy Exp $ */
3 * Copyright (c) 2001, The NetBSD Foundation, Inc. All rights reserved.
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by IWAMOTO Toshihiro and Ichiro FUKUHARA.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE.
30 #ifndef _IXP12X0_COMVAR_H_
31 #define _IXP12X0_COMVAR_H_
33 /* Hardware flag masks */
34 #define COM_HW_NOIEN 0x01
35 #define COM_HW_DEV_OK 0x20
36 #define COM_HW_CONSOLE 0x40
37 #define COM_HW_KGDB 0x80
39 #define RX_TTY_BLOCKED 0x01
40 #define RX_TTY_OVERFLOWED 0x02
41 #define RX_IBUF_BLOCKED 0x04
42 #define RX_IBUF_OVERFLOWED 0x08
43 #define RX_ANY_BLOCK 0x0f
45 #define IXPCOM_RING_SIZE 2048
49 bus_addr_t sc_baseaddr
;
50 bus_space_tag_t sc_iot
;
51 bus_space_handle_t sc_ioh
;
57 u_char
*sc_rbuf
, *sc_ebuf
;
60 u_int sc_tbc
, sc_heldtbc
;
62 u_char
*volatile sc_rbget
,
64 volatile u_int sc_rbavail
;
67 int sc_hwflags
, sc_swflags
;
69 volatile u_int sc_rx_flags
,
75 volatile int sc_heldchange
;
77 /* control registers */
82 /* power management hooks */
83 int (*enable
)(struct ixpcom_softc
*);
84 int (*disable
)(struct ixpcom_softc
*);
89 extern struct ixpcom_softc
* ixpcom_sc
;
91 void ixpcom_attach_subr(struct ixpcom_softc
*);
93 int ixpcomintr(void* arg
);
94 int ixpcomcnattach(bus_space_tag_t
, bus_addr_t
, bus_space_handle_t
,
97 #endif /* _IXP12X0_COMVAR_H_ */