diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/arch/i386/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/pckbc_ebus.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/pckbc.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/pckbcvar.h | 10 | ||||
-rw-r--r-- | sys/dev/isa/pckbc_isa.c | 5 | ||||
-rw-r--r-- | sys/dev/pckbc/pckbd.c | 10 |
7 files changed, 29 insertions, 17 deletions
diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC index d72c1e2be8b..23286e3d759 100644 --- a/sys/arch/amd64/conf/GENERIC +++ b/sys/arch/amd64/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.292 2010/07/03 03:59:16 krw Exp $ +# $OpenBSD: GENERIC,v 1.293 2010/07/21 20:10:17 miod Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -275,7 +275,7 @@ option WSDISPLAY_COMPAT_RAWKBD # provide raw scancodes; needed for X11 option WSDISPLAY_DEFAULTSCREENS=6 # initial number of text consoles option WSDISPLAY_COMPAT_PCVT # emulate some ioctls; needed for X11 -pckbc0 at isa? # PC keyboard controller +pckbc0 at isa? flags 0x00 # PC keyboard controller pckbd* at pckbc? # PC keyboard pms* at pckbc? # PS/2 mouse for wsmouse pmsi* at pckbc? # PS/2 "Intelli"mouse for wsmouse diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC index 54e042e6a85..9b42015b7b4 100644 --- a/sys/arch/i386/conf/GENERIC +++ b/sys/arch/i386/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.688 2010/07/05 22:20:22 tedu Exp $ +# $OpenBSD: GENERIC,v 1.689 2010/07/21 20:10:17 miod Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -337,7 +337,7 @@ option WSDISPLAY_COMPAT_RAWKBD # provide raw scancodes; needed for X11 option WSDISPLAY_DEFAULTSCREENS=6 # initial number of text consoles option WSDISPLAY_COMPAT_PCVT # emulate some ioctls; needed for X11 -pckbc0 at isa? # PC keyboard controller +pckbc0 at isa? flags 0x00 # PC keyboard controller pckbd* at pckbc? # PC keyboard pms* at pckbc? # PS/2 mouse for wsmouse pmsi* at pckbc? # PS/2 "Intelli"mouse for wsmouse diff --git a/sys/arch/sparc64/dev/pckbc_ebus.c b/sys/arch/sparc64/dev/pckbc_ebus.c index bffaae1eabe..e232507c6c5 100644 --- a/sys/arch/sparc64/dev/pckbc_ebus.c +++ b/sys/arch/sparc64/dev/pckbc_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc_ebus.c,v 1.10 2008/07/29 04:20:35 miod Exp $ */ +/* $OpenBSD: pckbc_ebus.c,v 1.11 2010/07/21 20:10:17 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -184,7 +184,7 @@ pckbc_ebus_attach(parent, self, aux) psc->id = t; printf("\n"); - pckbc_attach(psc); + pckbc_attach(psc, 0); } int diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c index fe9bebca7e1..8ec830ff8e1 100644 --- a/sys/dev/ic/pckbc.c +++ b/sys/dev/ic/pckbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc.c,v 1.21 2010/01/12 20:31:22 drahn Exp $ */ +/* $OpenBSD: pckbc.c,v 1.22 2010/07/21 20:10:17 miod Exp $ */ /* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */ /* @@ -285,8 +285,9 @@ pckbc_attach_slot(sc, slot) } void -pckbc_attach(sc) +pckbc_attach(sc, flags) struct pckbc_softc *sc; + int flags; { struct pckbc_internal *t; bus_space_tag_t iot; @@ -348,8 +349,8 @@ pckbc_attach(sc) haskbd = 1; } #endif /* 0 */ - if (haskbd == 0) { #if defined(__i386__) || defined(__amd64__) + if (haskbd == 0 && !ISSET(flags, PCKBCF_FORCE_KEYBOARD_PRESENT)) { /* * If there is no keyboard present, yet we are the console, * we might be on a legacy-free PC where the PS/2 emulated @@ -365,8 +366,8 @@ pckbc_attach(sc) pckbc_console = 0; wscn_input_init(1); } -#endif } +#endif /* * Check aux port ok. diff --git a/sys/dev/ic/pckbcvar.h b/sys/dev/ic/pckbcvar.h index 947f542ce3d..ec8cf9bff4d 100644 --- a/sys/dev/ic/pckbcvar.h +++ b/sys/dev/ic/pckbcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbcvar.h,v 1.7 2008/07/29 04:20:37 miod Exp $ */ +/* $OpenBSD: pckbcvar.h,v 1.8 2010/07/21 20:10:17 miod Exp $ */ /* $NetBSD: pckbcvar.h,v 1.4 2000/06/09 04:58:35 soda Exp $ */ /* @@ -105,10 +105,16 @@ void pckbc_set_poll(pckbc_tag_t, pckbc_slot_t, int); int pckbc_xt_translation(pckbc_tag_t, pckbc_slot_t, int); void pckbc_slot_enable(pckbc_tag_t, pckbc_slot_t, int); -void pckbc_attach(struct pckbc_softc *); +void pckbc_attach(struct pckbc_softc *, int); int pckbc_cnattach(bus_space_tag_t, bus_addr_t, bus_size_t, pckbc_slot_t, int); int pckbc_is_console(bus_space_tag_t, bus_addr_t); int pckbcintr(void *); +/* + * Device configuration flags (cf_flags). + */ + +#define PCKBCF_FORCE_KEYBOARD_PRESENT 0x0001 + #endif /* _DEV_IC_PCKBCVAR_H_ */ diff --git a/sys/dev/isa/pckbc_isa.c b/sys/dev/isa/pckbc_isa.c index dd3d9e20b67..1edd7150d8b 100644 --- a/sys/dev/isa/pckbc_isa.c +++ b/sys/dev/isa/pckbc_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc_isa.c,v 1.5 2007/10/01 15:34:48 krw Exp $ */ +/* $OpenBSD: pckbc_isa.c,v 1.6 2010/07/21 20:10:17 miod Exp $ */ /* $NetBSD: pckbc_isa.c,v 1.2 2000/03/23 07:01:35 thorpej Exp $ */ /* @@ -119,6 +119,7 @@ pckbc_isa_attach(parent, self, aux) { struct pckbc_isa_softc *isc = (void *)self; struct pckbc_softc *sc = &isc->sc_pckbc; + struct cfdata *cf = self->dv_cfdata; struct isa_attach_args *ia = aux; struct pckbc_internal *t; bus_space_tag_t iot; @@ -162,7 +163,7 @@ pckbc_isa_attach(parent, self, aux) printf("\n"); /* Finish off the attach. */ - pckbc_attach(sc); + pckbc_attach(sc, cf->cf_flags); } void diff --git a/sys/dev/pckbc/pckbd.c b/sys/dev/pckbc/pckbd.c index db26455922e..342b9867f54 100644 --- a/sys/dev/pckbc/pckbd.c +++ b/sys/dev/pckbc/pckbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbd.c,v 1.25 2010/07/08 19:29:25 deraadt Exp $ */ +/* $OpenBSD: pckbd.c,v 1.26 2010/07/21 20:10:17 miod Exp $ */ /* $NetBSD: pckbd.c,v 1.24 2000/06/05 22:20:57 sommerfeld Exp $ */ /*- @@ -336,8 +336,12 @@ pckbdprobe(parent, match, aux) * be no PS/2 connector at all; in that case, do not * even try to attach; ukbd will take over as console. */ - if (res == ENXIO) - return 0; + if (res == ENXIO) { + /* check cf_flags from parent */ + struct cfdata *cf = parent->dv_cfdata; + if (!ISSET(cf->cf_flags, PCKBCF_FORCE_KEYBOARD_PRESENT)) + return 0; + } #endif return (pckbd_is_console(pa->pa_tag, pa->pa_slot) ? 1 : 0); } |