auvar.h revision 1.9.74.1 1 1.9.74.1 jruoho /* $NetBSD: auvar.h,v 1.9.74.1 2011/06/06 09:06:02 jruoho Exp $ */
2 1.4 gdamore
3 1.4 gdamore /*-
4 1.4 gdamore * Copyright (c) 2006 Itronix Inc.
5 1.4 gdamore * All rights reserved.
6 1.4 gdamore *
7 1.4 gdamore * Written by Garrett D'Amore for Itronix Inc.
8 1.4 gdamore *
9 1.4 gdamore * Redistribution and use in source and binary forms, with or without
10 1.4 gdamore * modification, are permitted provided that the following conditions
11 1.4 gdamore * are met:
12 1.4 gdamore * 1. Redistributions of source code must retain the above copyright
13 1.4 gdamore * notice, this list of conditions and the following disclaimer.
14 1.4 gdamore * 2. Redistributions in binary form must reproduce the above copyright
15 1.4 gdamore * notice, this list of conditions and the following disclaimer in the
16 1.4 gdamore * documentation and/or other materials provided with the distribution.
17 1.4 gdamore * 3. The name of Itronix Inc. may not be used to endorse
18 1.4 gdamore * or promote products derived from this software without specific
19 1.4 gdamore * prior written permission.
20 1.4 gdamore *
21 1.4 gdamore * THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
22 1.4 gdamore * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 1.4 gdamore * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 1.4 gdamore * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
25 1.4 gdamore * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 1.4 gdamore * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 1.4 gdamore * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 1.4 gdamore * ON ANY THEORY OF LIABILITY, WHETHER IN
29 1.4 gdamore * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 1.4 gdamore * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 1.4 gdamore * POSSIBILITY OF SUCH DAMAGE.
32 1.4 gdamore */
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.4 gdamore #include "opt_alchemy.h"
73 1.4 gdamore
74 1.4 gdamore struct au_dev {
75 1.4 gdamore const char *name;
76 1.4 gdamore bus_addr_t addr[3];
77 1.4 gdamore int irq[2];
78 1.4 gdamore };
79 1.4 gdamore
80 1.4 gdamore struct au_chipdep {
81 1.4 gdamore const char *name;
82 1.4 gdamore bus_addr_t icus[2]; /* in case it ever changes */
83 1.4 gdamore struct au_dev *devices;
84 1.4 gdamore const char **irqnames;
85 1.4 gdamore };
86 1.4 gdamore
87 1.4 gdamore struct au_chipdep *au_chipdep(void);
88 1.4 gdamore
89 1.4 gdamore #ifdef ALCHEMY_AU1000
90 1.9 thorpej bool au1000_match(struct au_chipdep **);
91 1.4 gdamore #endif
92 1.4 gdamore #ifdef ALCHEMY_AU1100
93 1.9 thorpej bool au1100_match(struct au_chipdep **);
94 1.4 gdamore #endif
95 1.4 gdamore #ifdef ALCHEMY_AU1500
96 1.9 thorpej bool au1500_match(struct au_chipdep **);
97 1.4 gdamore #endif
98 1.4 gdamore #ifdef ALCHEMY_AU1550
99 1.9 thorpej bool au1550_match(struct au_chipdep **);
100 1.4 gdamore #endif
101 1.4 gdamore
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.6 gdamore void au_intr_enable(int);
106 1.6 gdamore void au_intr_disable(int);
107 1.9.74.1 jruoho void au_iointr(int, vaddr_t, uint32_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