1 /* $Id: ar531xvar.h,v 1.5 2006/09/26 06:37:32 gdamore Exp $ */
3 * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
4 * Copyright (c) 2006 Garrett D'Amore.
7 * This code was written by Garrett D'Amore for the Champaign-Urbana
8 * Community Wireless Network Project.
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following
17 * disclaimer in the documentation and/or other materials provided
18 * with the distribution.
19 * 3. All advertising materials mentioning features or use of this
20 * software must display the following acknowledgements:
21 * This product includes software developed by the Urbana-Champaign
22 * Independent Media Center.
23 * This product includes software developed by Garrett D'Amore.
24 * 4. Urbana-Champaign Independent Media Center's name and Garrett
25 * D'Amore's name may not be used to endorse or promote products
26 * derived from this software without specific prior written permission.
28 * THIS SOFTWARE IS PROVIDED BY THE URBANA-CHAMPAIGN INDEPENDENT
29 * MEDIA CENTER AND GARRETT D'AMORE ``AS IS'' AND ANY EXPRESS OR
30 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL THE URBANA-CHAMPAIGN INDEPENDENT
33 * MEDIA CENTER OR GARRETT D'AMORE BE LIABLE FOR ANY DIRECT, INDIRECT,
34 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
38 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
40 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 #ifndef _MIPS_ATHEROS_AR531XVAR_H_
44 #define _MIPS_ATHEROS_AR531XVAR_H_
46 #include <sys/param.h>
47 #include <machine/bus.h>
49 struct ar531x_device
{
61 void ar531x_intr_init(void);
63 void *ar531x_cpu_intr_establish(int, int (*)(void *), void *);
64 void ar531x_cpu_intr_disestablish(void *);
66 void *ar531x_misc_intr_establish(int, int (*)(void *), void *);
67 void ar531x_misc_intr_disestablish(void *);
69 void ar531x_cpuintr(uint32_t, uint32_t, uint32_t, uint32_t);
73 * CPU specific routines.
75 size_t ar531x_memsize(void);
76 void ar531x_consinit(void);
77 void ar531x_wdog(uint32_t);
78 void ar531x_businit(void);
79 const char *ar531x_cpuname(void);
80 uint32_t ar531x_cpu_freq(void);
81 uint32_t ar531x_bus_freq(void);
82 void ar531x_device_register(struct device
*, void *);
83 int ar531x_enable_device(const struct ar531x_device
*);
84 const struct ar531x_device
*ar531x_get_devices(void);
85 void ar531x_early_console(void);
88 * Board specific things.
90 struct ar531x_boarddata
;
91 const struct ar531x_boarddata
*ar531x_board_info(void);
92 const void *ar531x_radio_info(void);
94 int ar531x_board_config(struct ar531x_config
*);
96 #endif /* _MIPS_ATHEROS_AR531XVAR_H_ */