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