xref: /netbsd/sys/arch/arm/at91/at91rm9200busvar.h (revision 6550d01e)
1 /*	$Id: at91rm9200busvar.h,v 1.3 2009/10/23 06:53:13 snj Exp $	*/
2 /*	$NetBSD: at91rm9200busvar.h,v 1.3 2009/10/23 06:53:13 snj Exp $ */
3 
4 /*
5  * Copyright (c) 2007 Embedtronics Oy
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY ICHIRO FUKUHARA ``AS IS'' AND ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL ICHIRO FUKUHARA OR THE VOICES IN HIS HEAD BE LIABLE FOR
21  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  */
29 
30 #ifndef _AT91RM9200BUSVAR_H_
31 #define _AT91RM9200BUSVAR_H_
32 
33 #include <arm/at91/at91busvar.h>
34 #include <arm/at91/at91pmcvar.h>
35 #include <arm/at91/at91aicvar.h>
36 #include <arm/at91/at91dbguvar.h>
37 #include <arm/at91/at91rm9200reg.h>
38 
39 #include "at91dbgu.h"
40 
41 void at91rm9200bus_init(struct at91bus_clocks *);
42 #if NAT91DBGU > 0
43 #define	at91rm9200bus_attach_cn		at91dbgu_attach_cn
44 #else
45 void at91rm9200bus_attach_cn(bus_space_tag_t iot, int ospeed, int cflag);
46 #endif
47 const struct pmap_devmap *at91rm9200bus_devmap(void);
48 void at91rm9200bus_peripheral_clock(int pid, int enable);
49 at91pio_port at91rm9200bus_pio_port(int pid);
50 uint32_t at91rm9200bus_gpio_mask(int pid);
51 #define	at91rm9200bus_intr_init		at91aic_init
52 #define	at91rm9200bus_intr_establish	at91aic_intr_establish
53 #define	at91rm9200bus_intr_disestablish	at91aic_intr_disestablish
54 #define	at91rm9200bus_intr_poll		at91aic_intr_poll
55 #define	at91rm9200bus_intr_dispatch	at91aic_intr_dispatch
56 const char *at91rm9200bus_peripheral_name(int pid);
57 void at91rm9200bus_search_peripherals(device_t self,
58 				   device_t (*found_func)(device_t, bus_addr_t, int));
59 
60 const struct at91bus_machdep at91rm9200bus;
61 
62 #endif	// _AT91RM9200BUSVAR_H_
63