1 /* $NetBSD: gumstixvar.h,v 1.5 2009/11/22 12:05:14 kiyohara Exp $ */ 2 /* 3 * Copyright (C) 2005, 2006 WIDE Project and SOUM Corporation. 4 * All rights reserved. 5 * 6 * Written by Takashi Kiyohara and Susumu Miki for WIDE Project and SOUM 7 * Corporation. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 3. Neither the name of the project nor the name of SOUM Corporation 18 * may be used to endorse or promote products derived from this software 19 * without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE PROJECT and SOUM CORPORATION ``AS IS'' 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT AND SOUM CORPORATION 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 * POSSIBILITY OF SUCH DAMAGE. 32 */ 33 #ifndef _EVBARM_GUMSTIXVAR_H_ 34 #define _EVBARM_GUMSTIXVAR_H_ 35 36 #include <sys/conf.h> 37 #include <sys/device.h> 38 39 #include <machine/bus.h> 40 #include <arm/xscale/pxa2x0_gpio.h> 41 #include <evbarm/gumstix/gumstixreg.h> 42 43 44 extern uint32_t system_serial_high; 45 extern uint32_t system_serial_low; 46 47 48 struct gxio_softc { 49 device_t sc_dev; 50 bus_space_tag_t sc_iot; 51 bus_space_handle_t sc_ioh; 52 }; 53 54 typedef void *gxio_chipset_tag_t; 55 56 struct gxio_attach_args { 57 gxio_chipset_tag_t gxa_sc; 58 bus_space_tag_t gxa_iot; /* bus tag */ 59 bus_addr_t gxa_addr; /* I/O address */ 60 int gxa_gpirq; /* IRQ on GPIO */ 61 }; 62 63 /* 64 * IRQ handler 65 */ 66 #define gxio_intr_establish(sc, gpirq, level, spl, func, arg) \ 67 pxa2x0_gpio_intr_establish((gpirq), (level), (spl), (func), (arg)) 68 #define gxio_intr_disestablish(sc, cookie) \ 69 pxa2x0_gpio_intr_disestablish((cookie)) 70 71 72 /* 73 * gxpcic 74 */ 75 struct gxpcic_slot_irqs { 76 int valid; 77 int cd; /* PCDn */ 78 int prdy; /* PRDYn/~IRQn */ 79 }; 80 extern struct gxpcic_slot_irqs gxpcic_slot_irqs[2]; 81 extern int gxpcic_gpio_reset; 82 83 84 /* 85 * gxlcd 86 */ 87 void gxlcd_cnattach(void); 88 89 #endif /* _EVBARM_GUMSTIXVAR_H_ */ 90