summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authortakemura <takemura@NetBSD.org>2001-05-06 14:25:15 +0000
committertakemura <takemura@NetBSD.org>2001-05-06 14:25:15 +0000
commit54d9a46bbc7e3921d0ee9cf9eabc612e882ea687 (patch)
tree126b6189b8a3f90e450148fbcc79ea44d66db5b9 /sys/dev
parent2113399bb40d13bb43185ec78f841fc69d23d522 (diff)
Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/hpc/files.hpcio4
-rw-r--r--sys/dev/hpc/hpciovar.h6
-rw-r--r--sys/dev/hpc/pwctl.c3
3 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/hpc/files.hpcio b/sys/dev/hpc/files.hpcio
index a6a0e602482..5e1f94a4caf 100644
--- a/sys/dev/hpc/files.hpcio
+++ b/sys/dev/hpc/files.hpcio
@@ -1,4 +1,4 @@
-# $NetBSD: files.hpcio,v 1.1 2001/04/30 11:42:17 takemura Exp $
+# $NetBSD: files.hpcio,v 1.2 2001/05/06 14:25:15 takemura Exp $
# H/PC GPIO interface
# platform:
@@ -20,7 +20,7 @@
# 2: negative edge
# other: both
-define hpcioif { [platform = -1], [iochip = -1], [id = -1], [port = -1], [active = 1], [level = -1], [edge = -1], [initvalue = -1] }
+define hpcioif { [platform = -1], [iochip = -1], [id = -1], [port = -1], [active = 1], [level = -1], [edge = -1], [initvalue = -1], [addr=-1], [size=-1] }
device hpcioman { [iochip = -1], [evtype = -1], [id = -1], [port = -1], [active = 1], [level = -1], [edge = -1], [initvalue = -1] }
diff --git a/sys/dev/hpc/hpciovar.h b/sys/dev/hpc/hpciovar.h
index 1860cca3323..50063b4b708 100644
--- a/sys/dev/hpc/hpciovar.h
+++ b/sys/dev/hpc/hpciovar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: hpciovar.h,v 1.2 2001/05/01 00:25:17 takemura Exp $ */
+/* $NetBSD: hpciovar.h,v 1.3 2001/05/06 14:25:15 takemura Exp $ */
/*-
* Copyright (c) 2001 TAKEMURA Shin.
@@ -45,6 +45,7 @@ struct hpcio_chip {
hpcio_intr_handle_t(*hc_intr_establish)(hpcio_chip_t, int, int, int (*)(void *), void*);
void (*hc_intr_disestablish)(hpcio_chip_t, hpcio_intr_handle_t);
void (*hc_intr_clear)(hpcio_chip_t, hpcio_intr_handle_t);
+ void (*hc_register_iochip)(hpcio_chip_t, hpcio_chip_t);
void (*hc_update)(hpcio_chip_t);
void (*hc_dump)(hpcio_chip_t);
};
@@ -53,6 +54,7 @@ struct hpcio_attach_args {
char *haa_busname;
void *haa_sc;
hpcio_chip_t (*haa_getchip)(void*, int);
+ bus_space_tag_t haa_iot; /* I/O space tag */
};
#define HPCIO_BUSNAME "hpcioif"
@@ -66,6 +68,8 @@ struct hpcio_attach_args {
((*(hc)->hc_intr_disestablish)((hc), (handle)))
#define hpcio_intr_clear(hc, handle) \
((*(hc)->hc_intr_clear)((hc), (handle)))
+#define hpcio_register_iochip(hc, iochip) \
+ ((*(hc)->hc_register_iochip)((hc), (iochip)))
#define hpcio_update(hc) \
((*(hc)->hc_update)(hc))
#define hpcio_dump(hc) \
diff --git a/sys/dev/hpc/pwctl.c b/sys/dev/hpc/pwctl.c
index 27d853e3a9e..e89fb0a8b5f 100644
--- a/sys/dev/hpc/pwctl.c
+++ b/sys/dev/hpc/pwctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pwctl.c,v 1.3 2001/05/01 00:25:17 takemura Exp $ */
+/* $NetBSD: pwctl.c,v 1.4 2001/05/06 14:25:15 takemura Exp $ */
/*-
* Copyright (c) 1999-2001
@@ -40,6 +40,7 @@
#include <sys/systm.h>
#include <sys/device.h>
+#include <machine/bus.h>
#include <machine/config_hook.h>
#include <machine/platid.h>
#include <machine/platid_mask.h>