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