From ece2d0720406f5f64f2735dcb416593ac38d0650 Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 10 Nov 1996 16:44:13 +0000 Subject: Allow us to enable the 'XT_KEYBOARD' code using a configuration flag. This allows the user to add modify syscons's configuration flags using UserConfig that will allow older/quirky hardware (most notably older IBM ThinkPad laptops) to work with the standard boot kernel. Inspired by: The Nomads --- sys/i386/isa/syscons.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'sys/i386/isa/syscons.c') diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index e38ec37..d326ebe 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.182 1996/10/26 20:16:58 sos Exp $ + * $Id: syscons.c,v 1.183 1996/11/04 21:01:08 sos Exp $ */ #include "sc.h" @@ -295,6 +295,7 @@ static int scprobe(struct isa_device *dev) { int i, j, retries = 5; + int xt_keyboard = 0; u_char val; /* Enable interrupts and keyboard controller */ @@ -341,13 +342,23 @@ gotack: goto fail; } } + /* + * Allow us to set the XT_KEYBD flag in UserConfig so that keyboards + * such as those on the IBM ThinkPad laptop computers can be used + * with the standard console driver. + */ + if ( dev->id_flags & XT_KEYBD ) + xt_keyboard = 1; #ifdef XT_KEYBOARD - kbd_wait(); - outb(KB_DATA, 0xF0); - kbd_wait(); - outb(KB_DATA, 1); - kbd_wait(); -#endif /* XT_KEYBOARD */ + xt_keyboard = 1; +#endif + if ( xt_keyboard ) { + kbd_wait(); + outb(KB_DATA, 0xF0); + kbd_wait(); + outb(KB_DATA, 1); + kbd_wait(); + } succeed: return (IO_KBDSIZE); -- cgit v1.1