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