diff options
Diffstat (limited to 'arch/mips/jazz/hw-access.c')
-rw-r--r-- | arch/mips/jazz/hw-access.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/mips/jazz/hw-access.c b/arch/mips/jazz/hw-access.c index c9c423a66..4d2caf21b 100644 --- a/arch/mips/jazz/hw-access.c +++ b/arch/mips/jazz/hw-access.c @@ -1,4 +1,4 @@ -/* +/* $Id: hw-access.c,v 1.7 1998/05/06 02:46:43 ralf Exp $ * Low-level hardware access stuff for Jazz family machines. * * This file is subject to the terms and conditions of the GNU General Public @@ -6,8 +6,6 @@ * for more details. * * Copyright (C) 1995, 1996, 1997 by Ralf Baechle - * - * $Id: hw-access.c,v 1.6 1998/03/04 08:29:09 ralf Exp $ */ #include <linux/delay.h> #include <linux/init.h> @@ -154,6 +152,8 @@ struct feature jazz_feature = { static volatile keyboard_hardware *jazz_kh = (keyboard_hardware *) JAZZ_KEYBOARD_ADDRESS; +#define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */ + static unsigned char jazz_read_input(void) { return jazz_kh->data; @@ -161,11 +161,21 @@ static unsigned char jazz_read_input(void) static void jazz_write_output(unsigned char val) { + int status; + + do { + status = jazz_kh->command; + } while (status & KBD_STAT_IBF); jazz_kh->data = val; } static void jazz_write_command(unsigned char val) { + int status; + + do { + status = jazz_kh->command; + } while (status & KBD_STAT_IBF); jazz_kh->command = val; } |