vripvar.h revision 1.5.4.2 1 1.5.4.2 nathanw /* $NetBSD: vripvar.h,v 1.5.4.2 2002/02/28 04:10:07 nathanw Exp $ */
2 1.5.4.2 nathanw
3 1.5.4.2 nathanw /*-
4 1.5.4.2 nathanw * Copyright (c) 1999, 2002
5 1.5.4.2 nathanw * Shin Takemura and PocketBSD Project. All rights reserved.
6 1.5.4.2 nathanw *
7 1.5.4.2 nathanw * Redistribution and use in source and binary forms, with or without
8 1.5.4.2 nathanw * modification, are permitted provided that the following conditions
9 1.5.4.2 nathanw * are met:
10 1.5.4.2 nathanw * 1. Redistributions of source code must retain the above copyright
11 1.5.4.2 nathanw * notice, this list of conditions and the following disclaimer.
12 1.5.4.2 nathanw * 2. Redistributions in binary form must reproduce the above copyright
13 1.5.4.2 nathanw * notice, this list of conditions and the following disclaimer in the
14 1.5.4.2 nathanw * documentation and/or other materials provided with the distribution.
15 1.5.4.2 nathanw * 3. Neither the name of the project nor the names of its contributors
16 1.5.4.2 nathanw * may be used to endorse or promote products derived from this software
17 1.5.4.2 nathanw * without specific prior written permission.
18 1.5.4.2 nathanw *
19 1.5.4.2 nathanw * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 1.5.4.2 nathanw * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 1.5.4.2 nathanw * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 1.5.4.2 nathanw * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 1.5.4.2 nathanw * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 1.5.4.2 nathanw * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 1.5.4.2 nathanw * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 1.5.4.2 nathanw * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.5.4.2 nathanw * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 1.5.4.2 nathanw * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 1.5.4.2 nathanw * SUCH DAMAGE.
30 1.5.4.2 nathanw *
31 1.5.4.2 nathanw */
32 1.5.4.2 nathanw
33 1.5.4.2 nathanw #ifndef _VRIPVAR_H_
34 1.5.4.2 nathanw #define _VRIPVAR_H_
35 1.5.4.2 nathanw
36 1.5.4.2 nathanw #include <hpcmips/vr/vripif.h>
37 1.5.4.2 nathanw
38 1.5.4.2 nathanw struct vrip_unit {
39 1.5.4.2 nathanw char *vu_name;
40 1.5.4.2 nathanw int vu_intr[2];
41 1.5.4.2 nathanw int vu_clkmask;
42 1.5.4.2 nathanw bus_addr_t vu_lreg;
43 1.5.4.2 nathanw bus_addr_t vu_mlreg;
44 1.5.4.2 nathanw bus_addr_t vu_hreg;
45 1.5.4.2 nathanw bus_addr_t vu_mhreg;
46 1.5.4.2 nathanw };
47 1.5.4.2 nathanw
48 1.5.4.2 nathanw struct vrip_softc {
49 1.5.4.2 nathanw struct device sc_dv;
50 1.5.4.2 nathanw bus_space_tag_t sc_iot;
51 1.5.4.2 nathanw bus_space_handle_t sc_ioh;
52 1.5.4.2 nathanw hpcio_chip_t sc_gpio_chips[VRIP_NIOCHIPS];
53 1.5.4.2 nathanw vrcmu_chipset_tag_t sc_cc;
54 1.5.4.2 nathanw int sc_pri; /* attaching device priority */
55 1.5.4.2 nathanw u_int32_t sc_intrmask;
56 1.5.4.2 nathanw struct vrip_chipset_tag sc_chipset;
57 1.5.4.2 nathanw const struct vrip_unit *sc_units;
58 1.5.4.2 nathanw int sc_nunits;
59 1.5.4.2 nathanw bus_addr_t sc_icu_addr;
60 1.5.4.2 nathanw int sc_sysint2;
61 1.5.4.2 nathanw int sc_msysint2;
62 1.5.4.2 nathanw struct intrhand {
63 1.5.4.2 nathanw int (*ih_fun)(void *);
64 1.5.4.2 nathanw void *ih_arg;
65 1.5.4.2 nathanw const struct vrip_unit *ih_unit;
66 1.5.4.2 nathanw } sc_intrhands[32];
67 1.5.4.2 nathanw };
68 1.5.4.2 nathanw
69 1.5.4.2 nathanw void vrip_intr_suspend(void);
70 1.5.4.2 nathanw void vrip_intr_resume(void);
71 1.5.4.2 nathanw int vripmatch(struct device *, struct cfdata *, void *);
72 1.5.4.2 nathanw void vripattach_common(struct device *, struct device *, void *);
73 1.5.4.2 nathanw
74 1.5.4.2 nathanw #endif /* !_VRIPVAR_H_ */
75