summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/luna88k/cbus/cbus.c19
-rw-r--r--sys/arch/luna88k/cbus/cbusvar.h16
-rw-r--r--sys/arch/luna88k/conf/files.luna88k5
3 files changed, 29 insertions, 11 deletions
diff --git a/sys/arch/luna88k/cbus/cbus.c b/sys/arch/luna88k/cbus/cbus.c
index 167d51a454a..a876b8d94d4 100644
--- a/sys/arch/luna88k/cbus/cbus.c
+++ b/sys/arch/luna88k/cbus/cbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cbus.c,v 1.6 2016/06/13 23:51:58 dlg Exp $ */
+/* $OpenBSD: cbus.c,v 1.7 2019/06/29 04:33:11 aoyama Exp $ */
/*
* Copyright (c) 2014 Kenji Aoyama.
@@ -41,12 +41,15 @@
static struct cbus_attach_args cbus_devs[] = {
#if NNECSB > 0
- { "necsb", -1 }, /* PC-9801-86 sound board */
+ /* PC-9801-86 sound board */
+ { "necsb", -1, -1, -1, -1, -1 },
#endif
#if NPCIC > 0
- { "pcic", -1 }, /* PC-9801-102 & PC-9821X[AE]-01 PCMCIA board */
+ /* PC-9801-102 & PC-9821X[AE]-01 PCMCIA board */
+ { "pcic", -1, -1, -1, -1, -1 },
#endif
- { "pcex", -1 } /* C-bus "generic" driver */
+ /* C-bus "generic" driver */
+ { "pcex", -1, -1, -1, -1, -1 }
};
/*
@@ -128,8 +131,12 @@ cbus_print(void *aux, const char *pnp)
if (pnp)
printf("%s at %s", caa->ca_name, pnp); /* not configured */
- if (caa->ca_intlevel != -1)
- printf(" int %d", caa->ca_intlevel);
+ if (caa->ca_iobase != -1)
+ printf(" port 0x%x", caa->ca_iobase);
+ if (caa->ca_maddr != -1)
+ printf(" addr 0x%x", caa->ca_maddr);
+ if (caa->ca_int != -1)
+ printf(" int %d", caa->ca_int);
return UNCONF;
}
diff --git a/sys/arch/luna88k/cbus/cbusvar.h b/sys/arch/luna88k/cbus/cbusvar.h
index 57911cfbb48..aad77312716 100644
--- a/sys/arch/luna88k/cbus/cbusvar.h
+++ b/sys/arch/luna88k/cbus/cbusvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cbusvar.h,v 1.4 2015/02/18 22:42:04 aoyama Exp $ */
+/* $OpenBSD: cbusvar.h,v 1.5 2019/06/29 04:33:11 aoyama Exp $ */
/*
* Copyright (c) 2014 Kenji Aoyama.
@@ -44,6 +44,16 @@ int cbus_isrunlink(int (*)(void *), int);
u_int8_t cbus_intr_registered(void);
struct cbus_attach_args {
- char *ca_name;
- int ca_intlevel;
+ char *ca_name;
+ u_int32_t ca_iobase;
+ u_int32_t ca_iosize;
+ u_int32_t ca_maddr;
+ u_int32_t ca_msize;
+ u_int32_t ca_int;
};
+
+#define cf_iobase cf_loc[0]
+#define cf_iosize cf_loc[1]
+#define cf_maddr cf_loc[2]
+#define cf_msize cf_loc[3]
+#define cf_int cf_loc[4]
diff --git a/sys/arch/luna88k/conf/files.luna88k b/sys/arch/luna88k/conf/files.luna88k
index e40deff9248..b83277bcdbd 100644
--- a/sys/arch/luna88k/conf/files.luna88k
+++ b/sys/arch/luna88k/conf/files.luna88k
@@ -1,4 +1,4 @@
-# $OpenBSD: files.luna88k,v 1.29 2017/07/23 09:17:17 aoyama Exp $
+# $OpenBSD: files.luna88k,v 1.30 2019/06/29 04:33:11 aoyama Exp $
#
maxpartitions 16
@@ -63,7 +63,8 @@ attach spc at mainbus
file arch/luna88k/dev/spc.c spc
file arch/luna88k/dev/mb89352.c spc
-device cbus {}
+device cbus {[port = -1], [size = 0],
+ [iomem = -1], [iosiz = 0], [int = -1]}
attach cbus at mainbus
file arch/luna88k/cbus/cbus.c