1 /* $Id: at91sam9261busvar.h,v 1.2 2008/07/03 01:15:38 matt Exp $ */ 2 /* $NetBSD: at91sam9261busvar.h,v 1.2 2008/07/03 01:15:38 matt 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 * 3. All advertising materials mentioning features or use of this software 17 * must display the following acknowledgement: 18 * This product includes software developed by Ichiro FUKUHARA. 19 * 4. The name of the company nor the name of the author may be used to 20 * endorse or promote products derived from this software without specific 21 * prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY ICHIRO FUKUHARA ``AS IS'' AND ANY EXPRESS OR 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26 * IN NO EVENT SHALL ICHIRO FUKUHARA OR THE VOICES IN HIS HEAD BE LIABLE FOR 27 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36 #ifndef _AT91SAM9261BUSVAR_H_ 37 #define _AT91SAM9261BUSVAR_H_ 38 39 #include <arm/at91/at91busvar.h> 40 #include <arm/at91/at91pmcvar.h> 41 #include <arm/at91/at91aicvar.h> 42 #include <arm/at91/at91dbguvar.h> 43 #include <arm/at91/at91sam9261reg.h> 44 45 #include "at91dbgu.h" 46 47 void at91sam9261bus_init(struct at91bus_clocks *); 48 #if NAT91DBGU > 0 49 #define at91sam9261bus_attach_cn at91dbgu_attach_cn 50 #else 51 void at91sam9261bus_attach_cn(bus_space_tag_t iot, int ospeed, int cflag); 52 #endif 53 const struct pmap_devmap *at91sam9261bus_devmap(void); 54 void at91sam9261bus_peripheral_clock(int pid, int enable); 55 at91pio_port at91sam9261bus_pio_port(int pid); 56 uint32_t at91sam9261bus_gpio_mask(int pid); 57 #define at91sam9261bus_intr_init at91aic_init 58 #define at91sam9261bus_intr_establish at91aic_intr_establish 59 #define at91sam9261bus_intr_disestablish at91aic_intr_disestablish 60 #define at91sam9261bus_intr_poll at91aic_intr_poll 61 #define at91sam9261bus_intr_dispatch at91aic_intr_dispatch 62 const char *at91sam9261bus_peripheral_name(int pid); 63 void at91sam9261bus_search_peripherals(device_t self, 64 device_t (*found_func)(device_t, bus_addr_t, int)); 65 66 extern const struct at91bus_machdep at91sam9261bus; 67 68 #endif // _AT91SAM9261BUSVAR_H_ 69