| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: wbsio.c,v 1.18 2017/12/13 00:27:53 knakahara Exp $ */ | | 1 | /* $NetBSD: wbsio.c,v 1.19 2017/12/13 00:29:02 knakahara Exp $ */ |
2 | /* $OpenBSD: wbsio.c,v 1.10 2015/03/14 03:38:47 jsg Exp $ */ | | 2 | /* $OpenBSD: wbsio.c,v 1.10 2015/03/14 03:38:47 jsg Exp $ */ |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org> | | 4 | * Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org> |
5 | * | | 5 | * |
6 | * Permission to use, copy, modify, and distribute this software for any | | 6 | * Permission to use, copy, modify, and distribute this software for any |
7 | * purpose with or without fee is hereby granted, provided that the above | | 7 | * purpose with or without fee is hereby granted, provided that the above |
8 | * copyright notice and this permission notice appear in all copies. | | 8 | * copyright notice and this permission notice appear in all copies. |
9 | * | | 9 | * |
10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | | 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | | 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | | 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | | 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | | 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| @@ -27,29 +27,30 @@ | | | @@ -27,29 +27,30 @@ |
27 | #include <sys/module.h> | | 27 | #include <sys/module.h> |
28 | #include <sys/systm.h> | | 28 | #include <sys/systm.h> |
29 | #include <sys/mutex.h> | | 29 | #include <sys/mutex.h> |
30 | #include <sys/gpio.h> | | 30 | #include <sys/gpio.h> |
31 | | | 31 | |
32 | #include <sys/bus.h> | | 32 | #include <sys/bus.h> |
33 | | | 33 | |
34 | #include <dev/isa/isareg.h> | | 34 | #include <dev/isa/isareg.h> |
35 | #include <dev/isa/isavar.h> | | 35 | #include <dev/isa/isavar.h> |
36 | #include <dev/isa/wbsioreg.h> | | 36 | #include <dev/isa/wbsioreg.h> |
37 | #include <dev/sysmon/sysmonvar.h> | | 37 | #include <dev/sysmon/sysmonvar.h> |
38 | | | 38 | |
39 | /* Don't use gpio for now in the module */ | | 39 | /* Don't use gpio for now in the module */ |
40 | #ifndef _MODULE | | 40 | #if !defined(_MODULE) && defined(WBSIO_GPIO) |
41 | #include "gpio.h" | | 41 | #include "gpio.h" |
42 | #endif | | 42 | #endif |
| | | 43 | |
43 | #if NGPIO > 0 | | 44 | #if NGPIO > 0 |
44 | #include <dev/gpio/gpiovar.h> | | 45 | #include <dev/gpio/gpiovar.h> |
45 | #endif | | 46 | #endif |
46 | | | 47 | |
47 | struct wbsio_softc { | | 48 | struct wbsio_softc { |
48 | device_t sc_dev; | | 49 | device_t sc_dev; |
49 | device_t sc_lm_dev; | | 50 | device_t sc_lm_dev; |
50 | #if NGPIO > 0 | | 51 | #if NGPIO > 0 |
51 | device_t sc_gpio_dev; | | 52 | device_t sc_gpio_dev; |
52 | #endif | | 53 | #endif |
53 | | | 54 | |
54 | bus_space_tag_t sc_iot; | | 55 | bus_space_tag_t sc_iot; |
55 | bus_space_handle_t sc_ioh; | | 56 | bus_space_handle_t sc_ioh; |