auvar.h revision 1.6 1 1.6 gdamore /* $NetBSD: auvar.h,v 1.6 2006/02/10 00:22:42 gdamore 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.5 gdamore /*
75 1.5 gdamore * 224MB virtual PCI memory. Note that we probably cannot
76 1.5 gdamore * really use all this because of limits on the number wired
77 1.5 gdamore * entries we can have at once. In all likelihood, we won't
78 1.5 gdamore * use wired entries for more than a few megs anyway, since
79 1.5 gdamore * big devices like framebuffers are likely to be mapped into
80 1.5 gdamore * USEG using ordinary TLB entries.
81 1.5 gdamore *
82 1.5 gdamore * This tunable is an area for possible investigation and improvement.
83 1.5 gdamore */
84 1.5 gdamore
85 1.5 gdamore #define AU_PCI_MEM_VA 0xE0000000UL
86 1.5 gdamore #define AU_PCI_MEM_SZ 0x0E000000UL /* 224 MB */
87 1.5 gdamore
88 1.5 gdamore #define AU_PCI_IO_VA 0xEE000000UL
89 1.5 gdamore #define AU_PCI_IO_SZ 0x01000000UL /* 16 MB */
90 1.5 gdamore
91 1.5 gdamore #define AU_PCI_CFG_VA 0xEF000000UL
92 1.5 gdamore #define AU_PCI_CFG_SZ 0x01000000UL /* 16 MB, overkill */
93 1.5 gdamore
94 1.4 gdamore struct au_dev {
95 1.4 gdamore const char *name;
96 1.4 gdamore bus_addr_t addr[3];
97 1.4 gdamore int irq[2];
98 1.4 gdamore };
99 1.4 gdamore
100 1.4 gdamore struct au_chipdep {
101 1.4 gdamore const char *name;
102 1.4 gdamore bus_addr_t icus[2]; /* in case it ever changes */
103 1.4 gdamore struct au_dev *devices;
104 1.4 gdamore const char **irqnames;
105 1.4 gdamore };
106 1.4 gdamore
107 1.4 gdamore struct au_chipdep *au_chipdep(void);
108 1.4 gdamore
109 1.4 gdamore #ifdef ALCHEMY_AU1000
110 1.4 gdamore boolean_t au1000_match(struct au_chipdep **);
111 1.4 gdamore #endif
112 1.4 gdamore #ifdef ALCHEMY_AU1100
113 1.4 gdamore boolean_t au1100_match(struct au_chipdep **);
114 1.4 gdamore #endif
115 1.4 gdamore #ifdef ALCHEMY_AU1500
116 1.4 gdamore boolean_t au1500_match(struct au_chipdep **);
117 1.4 gdamore #endif
118 1.4 gdamore #ifdef ALCHEMY_AU1550
119 1.4 gdamore boolean_t au1550_match(struct au_chipdep **);
120 1.4 gdamore #endif
121 1.4 gdamore
122 1.1 simonb void au_intr_init(void);
123 1.1 simonb void *au_intr_establish(int, int, int, int, int (*)(void *), void *);
124 1.1 simonb void au_intr_disestablish(void *);
125 1.6 gdamore void au_intr_enable(int);
126 1.6 gdamore void au_intr_disable(int);
127 1.1 simonb void au_iointr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
128 1.1 simonb
129 1.1 simonb void au_cpureg_bus_mem_init(bus_space_tag_t, void *);
130 1.1 simonb
131 1.1 simonb void au_cal_timers(bus_space_tag_t, bus_space_handle_t);
132 1.1 simonb #endif /* _MIPS_ALCHEMY_AUVAR_H_ */
133