auvar.h revision 1.3.4.1 1 1.3.4.1 rpaulo /* $NetBSD: auvar.h,v 1.3.4.1 2006/09/09 02:41:25 rpaulo Exp $ */
2 1.3.4.1 rpaulo
3 1.3.4.1 rpaulo /*-
4 1.3.4.1 rpaulo * Copyright (c) 2006 Itronix Inc.
5 1.3.4.1 rpaulo * All rights reserved.
6 1.3.4.1 rpaulo *
7 1.3.4.1 rpaulo * Written by Garrett D'Amore for Itronix Inc.
8 1.3.4.1 rpaulo *
9 1.3.4.1 rpaulo * Redistribution and use in source and binary forms, with or without
10 1.3.4.1 rpaulo * modification, are permitted provided that the following conditions
11 1.3.4.1 rpaulo * are met:
12 1.3.4.1 rpaulo * 1. Redistributions of source code must retain the above copyright
13 1.3.4.1 rpaulo * notice, this list of conditions and the following disclaimer.
14 1.3.4.1 rpaulo * 2. Redistributions in binary form must reproduce the above copyright
15 1.3.4.1 rpaulo * notice, this list of conditions and the following disclaimer in the
16 1.3.4.1 rpaulo * documentation and/or other materials provided with the distribution.
17 1.3.4.1 rpaulo * 3. The name of Itronix Inc. may not be used to endorse
18 1.3.4.1 rpaulo * or promote products derived from this software without specific
19 1.3.4.1 rpaulo * prior written permission.
20 1.3.4.1 rpaulo *
21 1.3.4.1 rpaulo * THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
22 1.3.4.1 rpaulo * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 1.3.4.1 rpaulo * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 1.3.4.1 rpaulo * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
25 1.3.4.1 rpaulo * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 1.3.4.1 rpaulo * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 1.3.4.1 rpaulo * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 1.3.4.1 rpaulo * ON ANY THEORY OF LIABILITY, WHETHER IN
29 1.3.4.1 rpaulo * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 1.3.4.1 rpaulo * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 1.3.4.1 rpaulo * POSSIBILITY OF SUCH DAMAGE.
32 1.3.4.1 rpaulo */
33 1.1 simonb
34 1.1 simonb /*
35 1.1 simonb * Copyright 2002 Wasabi Systems, Inc.
36 1.1 simonb * All rights reserved.
37 1.1 simonb *
38 1.1 simonb * Written by Simon Burge for Wasabi Systems, Inc.
39 1.1 simonb *
40 1.1 simonb * Redistribution and use in source and binary forms, with or without
41 1.1 simonb * modification, are permitted provided that the following conditions
42 1.1 simonb * are met:
43 1.1 simonb * 1. Redistributions of source code must retain the above copyright
44 1.1 simonb * notice, this list of conditions and the following disclaimer.
45 1.1 simonb * 2. Redistributions in binary form must reproduce the above copyright
46 1.1 simonb * notice, this list of conditions and the following disclaimer in the
47 1.1 simonb * documentation and/or other materials provided with the distribution.
48 1.1 simonb * 3. All advertising materials mentioning features or use of this software
49 1.1 simonb * must display the following acknowledgement:
50 1.1 simonb * This product includes software developed for the NetBSD Project by
51 1.1 simonb * Wasabi Systems, Inc.
52 1.1 simonb * 4. The name of Wasabi Systems, Inc. may not be used to endorse
53 1.1 simonb * or promote products derived from this software without specific prior
54 1.1 simonb * written permission.
55 1.1 simonb *
56 1.1 simonb * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
57 1.1 simonb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
58 1.1 simonb * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
59 1.1 simonb * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
60 1.1 simonb * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
61 1.1 simonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
62 1.1 simonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
63 1.1 simonb * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
64 1.1 simonb * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
65 1.1 simonb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
66 1.1 simonb * POSSIBILITY OF SUCH DAMAGE.
67 1.1 simonb */
68 1.1 simonb
69 1.1 simonb #ifndef _MIPS_ALCHEMY_AUVAR_H_
70 1.1 simonb #define _MIPS_ALCHEMY_AUVAR_H_
71 1.1 simonb
72 1.3.4.1 rpaulo #include "opt_alchemy.h"
73 1.3.4.1 rpaulo
74 1.3.4.1 rpaulo struct au_dev {
75 1.3.4.1 rpaulo const char *name;
76 1.3.4.1 rpaulo bus_addr_t addr[3];
77 1.3.4.1 rpaulo int irq[2];
78 1.3.4.1 rpaulo };
79 1.3.4.1 rpaulo
80 1.3.4.1 rpaulo struct au_chipdep {
81 1.3.4.1 rpaulo const char *name;
82 1.3.4.1 rpaulo bus_addr_t icus[2]; /* in case it ever changes */
83 1.3.4.1 rpaulo struct au_dev *devices;
84 1.3.4.1 rpaulo const char **irqnames;
85 1.3.4.1 rpaulo };
86 1.3.4.1 rpaulo
87 1.3.4.1 rpaulo struct au_chipdep *au_chipdep(void);
88 1.3.4.1 rpaulo
89 1.3.4.1 rpaulo #ifdef ALCHEMY_AU1000
90 1.3.4.1 rpaulo boolean_t au1000_match(struct au_chipdep **);
91 1.3.4.1 rpaulo #endif
92 1.3.4.1 rpaulo #ifdef ALCHEMY_AU1100
93 1.3.4.1 rpaulo boolean_t au1100_match(struct au_chipdep **);
94 1.3.4.1 rpaulo #endif
95 1.3.4.1 rpaulo #ifdef ALCHEMY_AU1500
96 1.3.4.1 rpaulo boolean_t au1500_match(struct au_chipdep **);
97 1.3.4.1 rpaulo #endif
98 1.3.4.1 rpaulo #ifdef ALCHEMY_AU1550
99 1.3.4.1 rpaulo boolean_t au1550_match(struct au_chipdep **);
100 1.3.4.1 rpaulo #endif
101 1.3.4.1 rpaulo
102 1.1 simonb void au_intr_init(void);
103 1.1 simonb void *au_intr_establish(int, int, int, int, int (*)(void *), void *);
104 1.1 simonb void au_intr_disestablish(void *);
105 1.3.4.1 rpaulo void au_intr_enable(int);
106 1.3.4.1 rpaulo void au_intr_disable(int);
107 1.1 simonb void au_iointr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
108 1.1 simonb
109 1.1 simonb void au_cpureg_bus_mem_init(bus_space_tag_t, void *);
110 1.1 simonb
111 1.1 simonb void au_cal_timers(bus_space_tag_t, bus_space_handle_t);
112 1.1 simonb #endif /* _MIPS_ALCHEMY_AUVAR_H_ */
113