summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-01-08 17:25:07 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-01-08 17:25:07 +0000
commit20a16460fc3dadc3670f74649d9efd23d4e1672f (patch)
tree253795acca41e7bc22f707e9f28e6558be0adacd /sys/arch
parente27fb7cead158776491996ec81b38e8d51dcbd33 (diff)
Display unhandled adb devices as "whatever at adb0 addr X" like all buses do;
while there, make the detailed descriptions dependent on ADBVERBOSE (enabled in GENERIC) instead of DIAGNOSTIC.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mac68k/conf/GENERIC3
-rw-r--r--sys/arch/mac68k/dev/adb.c19
-rw-r--r--sys/arch/mac68k/dev/akbd.c3
-rw-r--r--sys/arch/mac68k/dev/ams.c9
-rw-r--r--sys/arch/macppc/conf/GENERIC3
-rw-r--r--sys/arch/macppc/dev/abtn.c4
-rw-r--r--sys/arch/macppc/dev/adb.c23
-rw-r--r--sys/arch/macppc/dev/akbd.c3
-rw-r--r--sys/arch/macppc/dev/ams.c9
9 files changed, 40 insertions, 36 deletions
diff --git a/sys/arch/mac68k/conf/GENERIC b/sys/arch/mac68k/conf/GENERIC
index 902dda0f2f5..da1e5f52762 100644
--- a/sys/arch/mac68k/conf/GENERIC
+++ b/sys/arch/mac68k/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.42 2006/01/04 20:39:04 miod Exp $
+# $OpenBSD: GENERIC,v 1.43 2006/01/08 17:25:02 miod Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -21,6 +21,7 @@ option M68020 # Must have 68851 PMMU
option FPSP
option FPU_EMULATE
option COMPAT_SUNOS # SunOS m68k binary compatibility
+option ADBVERBOSE
#option MRG_ADB # Use ROM-based ADB driver
option WSDISPLAY_COMPAT_RAWKBD
diff --git a/sys/arch/mac68k/dev/adb.c b/sys/arch/mac68k/dev/adb.c
index 50531807ce1..320b6362dec 100644
--- a/sys/arch/mac68k/dev/adb.c
+++ b/sys/arch/mac68k/dev/adb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adb.c,v 1.15 2006/01/04 20:39:04 miod Exp $ */
+/* $OpenBSD: adb.c,v 1.16 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: adb.c,v 1.47 2005/06/16 22:43:36 jmc Exp $ */
/*
@@ -177,9 +177,8 @@ adbprint(void *args, const char *name)
rv = UNSUPP; /* most ADB device types are unsupported */
/* print out what kind of ADB device we have found */
- printf("%s addr %d: ", name, aa_args->adbaddr);
switch(aa_args->origaddr) {
-#ifdef DIAGNOSTIC
+#ifdef ADBVERBOSE
case ADBADDR_SECURE:
printf("security dongle (%d)",
aa_args->handler_id);
@@ -195,7 +194,7 @@ adbprint(void *args, const char *name)
aa_args->handler_id);
rv = UNCONF;
break;
-#ifdef DIAGNOSTIC
+#ifdef ADBVERBOSE
case ADBADDR_ABS:
switch (aa_args->handler_id) {
case ADB_ARTPAD:
@@ -223,13 +222,15 @@ adbprint(void *args, const char *name)
}
break;
default:
- printf("unknown type device, (handler %d)",
- aa_args->handler_id);
+ printf("unknown type %d device, (handler %d)",
+ aa_args->origaddr, aa_args->handler_id);
break;
-#endif /* DIAGNOSTIC */
+#endif /* ADBVERBOSE */
}
- } else /* a device matched and was configured */
- printf(" addr %d: ", aa_args->adbaddr);
+ printf(" at %s", name);
+ }
+
+ printf(" addr %d", aa_args->adbaddr);
return (rv);
}
diff --git a/sys/arch/mac68k/dev/akbd.c b/sys/arch/mac68k/dev/akbd.c
index dbe3ccd8951..a79ad6434b8 100644
--- a/sys/arch/mac68k/dev/akbd.c
+++ b/sys/arch/mac68k/dev/akbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: akbd.c,v 1.2 2006/01/08 16:35:25 miod Exp $ */
+/* $OpenBSD: akbd.c,v 1.3 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: akbd.c,v 1.17 2005/01/15 16:00:59 chs Exp $ */
/*
@@ -136,6 +136,7 @@ akbdattach(struct device *parent, struct device *self, void *aux)
adbinfo.siServiceRtPtr = (Ptr)adb_kbd_asmcomplete;
adbinfo.siDataAreaAddr = (caddr_t)sc;
+ printf(": ");
switch (sc->handler_id) {
case ADB_STDKBD:
printf("standard keyboard\n");
diff --git a/sys/arch/mac68k/dev/ams.c b/sys/arch/mac68k/dev/ams.c
index 874a601d0cf..c4cc4b1b0a6 100644
--- a/sys/arch/mac68k/dev/ams.c
+++ b/sys/arch/mac68k/dev/ams.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ams.c,v 1.1 2006/01/04 20:39:04 miod Exp $ */
+/* $OpenBSD: ams.c,v 1.2 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: ams.c,v 1.11 2000/12/19 03:13:40 tsubai Exp $ */
/*
@@ -112,13 +112,12 @@ amsattach(struct device *parent, struct device *self, void *aux)
ems_init(sc);
/* print out the type of mouse we have */
+ printf(": ");
switch (sc->handler_id) {
- case ADBMS_100DPI:
- printf("%d-button, %d dpi mouse\n", sc->sc_buttons,
- (int)(sc->sc_res));
- break;
case ADBMS_200DPI:
sc->sc_res = 200;
+ /* FALLTHROUGH */
+ case ADBMS_100DPI:
printf("%d-button, %d dpi mouse\n", sc->sc_buttons,
(int)(sc->sc_res));
break;
diff --git a/sys/arch/macppc/conf/GENERIC b/sys/arch/macppc/conf/GENERIC
index 90acd18293d..062708427c1 100644
--- a/sys/arch/macppc/conf/GENERIC
+++ b/sys/arch/macppc/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.122 2006/01/05 20:03:03 deraadt Exp $g
+# $OpenBSD: GENERIC,v 1.123 2006/01/08 17:25:05 miod Exp $g
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -20,6 +20,7 @@ option SYS_TYPE=APPL
option PCIVERBOSE
option USBVERBOSE
#option MACOBIOVERBOSE
+option ADBVERBOSE
option ALTIVEC
option APERTURE # in-kernel aperture driver for XFree86
option WSDISPLAY_COMPAT_RAWKBD
diff --git a/sys/arch/macppc/dev/abtn.c b/sys/arch/macppc/dev/abtn.c
index 239efcf90a9..3672bfbab44 100644
--- a/sys/arch/macppc/dev/abtn.c
+++ b/sys/arch/macppc/dev/abtn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: abtn.c,v 1.9 2003/10/16 03:54:48 deraadt Exp $ */
+/* $OpenBSD: abtn.c,v 1.10 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: abtn.c,v 1.1 1999/07/12 17:48:26 tsubai Exp $ */
/*-
@@ -79,7 +79,7 @@ abtn_attach(struct device *parent, struct device *self, void *aux)
struct adb_attach_args *aa = aux;
ADBSetInfoBlock adbinfo;
- printf("brightness/volume/eject buttons\n");
+ printf(": brightness/volume/eject buttons\n");
sc->origaddr = aa->origaddr;
sc->adbaddr = aa->adbaddr;
diff --git a/sys/arch/macppc/dev/adb.c b/sys/arch/macppc/dev/adb.c
index 87f1f0633c7..d006ac09f76 100644
--- a/sys/arch/macppc/dev/adb.c
+++ b/sys/arch/macppc/dev/adb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adb.c,v 1.16 2005/12/21 18:50:52 miod Exp $ */
+/* $OpenBSD: adb.c,v 1.17 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: adb.c,v 1.6 1999/08/16 06:28:09 tsubai Exp $ */
/*-
@@ -145,7 +145,7 @@ adbattach(struct device *parent, struct device *self, void *aux)
break;
}
- printf(", %d targets\n", totaladbs);
+ printf(", %d target%s\n", totaladbs, (totaladbs == 1) ? "" : "s");
/* for each ADB device */
for (adbindex = 1; adbindex <= totaladbs; adbindex++) {
@@ -194,9 +194,8 @@ adbprint(void *args, const char *name)
rv = UNSUPP; /* most ADB device types are unsupported */
/* print out what kind of ADB device we have found */
- printf("%s addr %d: ", name, aa_args->adbaddr);
switch(aa_args->origaddr) {
-#ifdef DIAGNOSTIC
+#ifdef ADBVERBOSE
case ADBADDR_SECURE:
printf("security dongle (%d)", aa_args->handler_id);
break;
@@ -210,7 +209,7 @@ adbprint(void *args, const char *name)
aa_args->handler_id);
rv = UNCONF;
break;
-#ifdef DIAGNOSTIC
+#ifdef ADBVERBOSE
case ADBADDR_ABS:
switch (aa_args->handler_id) {
case ADB_ARTPAD:
@@ -238,13 +237,15 @@ adbprint(void *args, const char *name)
}
break;
default:
- printf("unknown type device, (handler %d)",
- aa_args->handler_id);
+ printf("unknown type %d device, (handler %d)",
+ aa_args->origaddr, aa_args->handler_id);
break;
-#endif /* DIAGNOSTIC */
+#endif /* ADBVERBOSE */
}
- } else /* a device matched and was configured */
- printf(" addr %d: ", aa_args->adbaddr);
+ printf(" at %s", name);
+ }
+
+ printf(" addr %d", aa_args->adbaddr);
- return rv;
+ return (rv);
}
diff --git a/sys/arch/macppc/dev/akbd.c b/sys/arch/macppc/dev/akbd.c
index 7288c9e9c6c..651bf454c52 100644
--- a/sys/arch/macppc/dev/akbd.c
+++ b/sys/arch/macppc/dev/akbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: akbd.c,v 1.19 2005/12/21 18:50:52 miod Exp $ */
+/* $OpenBSD: akbd.c,v 1.20 2006/01/08 17:25:05 miod Exp $ */
/* $NetBSD: akbd.c,v 1.13 2001/01/25 14:08:55 tsubai Exp $ */
/*
@@ -141,6 +141,7 @@ akbdattach(struct device *parent, struct device *self, void *aux)
adbinfo.siServiceRtPtr = (Ptr)kbd_adbcomplete;
adbinfo.siDataAreaAddr = (caddr_t)sc;
+ printf(": ");
switch (sc->handler_id) {
case ADB_STDKBD:
printf("standard keyboard\n");
diff --git a/sys/arch/macppc/dev/ams.c b/sys/arch/macppc/dev/ams.c
index e95498d74f3..3787b509193 100644
--- a/sys/arch/macppc/dev/ams.c
+++ b/sys/arch/macppc/dev/ams.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ams.c,v 1.12 2005/12/21 18:50:52 miod Exp $ */
+/* $OpenBSD: ams.c,v 1.13 2006/01/08 17:25:06 miod Exp $ */
/* $NetBSD: ams.c,v 1.11 2000/12/19 03:13:40 tsubai Exp $ */
/*
@@ -112,13 +112,12 @@ amsattach(struct device *parent, struct device *self, void *aux)
ems_init(sc);
/* print out the type of mouse we have */
+ printf(": ");
switch (sc->handler_id) {
- case ADBMS_100DPI:
- printf("%d-button, %d dpi mouse\n", sc->sc_buttons,
- (int)(sc->sc_res));
- break;
case ADBMS_200DPI:
sc->sc_res = 200;
+ /* FALLTHROUGH */
+ case ADBMS_100DPI:
printf("%d-button, %d dpi mouse\n", sc->sc_buttons,
(int)(sc->sc_res));
break;