1 /* $NetBSD: adm5120_extiovar.h,v 1.2 2008/01/15 22:22:37 dyoung Exp $ */
4 * Copyright (c) 2007 David Young. All rights reserved.
6 * Redistribution and use in source and binary forms, with or
7 * without modification, are permitted provided that the following
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials provided
14 * with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
19 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
21 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
23 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
29 #ifndef _ADM5120_EXTIOVAR_H_
30 #define _ADM5120_EXTIOVAR_H_
32 #include <sys/device.h>
33 #include <sys/types.h>
35 #include <sys/ioctl.h>
36 #include <dev/gpio/gpiovar.h>
38 struct extio_attach_args
{
39 const char *ea_name
; /* name of device */
40 bus_space_tag_t ea_st
;
41 bus_addr_t ea_addr
; /* address of device */
42 int ea_irq
; /* interrupt bit # */
45 uint32_t ea_gpio_mask
;
51 bus_space_tag_t sc_obiot
;
52 bus_space_handle_t sc_gpioh
;
53 bus_space_handle_t sc_mpmch
;
56 struct gpio_pinmap sc_pm
;
57 struct mips_bus_space sc_cfio
;
60 void cfio_bus_mem_init(bus_space_tag_t
, bus_space_tag_t
);
61 void extio_bus_mem_init(bus_space_tag_t
, void *);
63 #endif /* _ADM5120_EXTIOVAR_H_ */