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