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