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