]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/input/i8042.c
JFFS2: Speed up and fix comparison functions
[karo-tx-uboot.git] / drivers / input / i8042.c
index 8a1e22e8df4b9f97ac1b7e3f1e3d43f1ac3abf66..1769c5e80b215ea08e45676e550e83a174c736a1 100644 (file)
@@ -2,7 +2,7 @@
  * (C) Copyright 2002 ELTEC Elektronik AG
  * Frank Gottschling <fgottschling@eltec.de>
  *
- * SPDX-License-Identifier:    GPL-2.0+ 
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /* i8042.c - Intel 8042 keyboard driver routines */
@@ -398,7 +398,7 @@ int i8042_kbd_init(void)
  * i8042_tstc - test if keyboard input is available
  *             option: cursor blinking if called in a loop
  */
-int i8042_tstc(void)
+int i8042_tstc(struct stdio_dev *dev)
 {
        unsigned char scan_code = 0;
 
@@ -432,7 +432,7 @@ int i8042_tstc(void)
  * i8042_getc - wait till keyboard input is available
  *             option: turn on/off cursor while waiting
  */
-int i8042_getc(void)
+int i8042_getc(struct stdio_dev *dev)
 {
        int ret_chr;
        unsigned char scan_code;
@@ -698,7 +698,14 @@ static int kbd_reset(void)
 
        /* Enable Keyboard */
        out8(I8042_COMMAND_REG, 0xae);
+       if (kbd_input_empty() == 0)
+               return -1;
+
+       out8(I8042_COMMAND_REG, 0x60);
+       if (kbd_input_empty() == 0)
+               return -1;
 
+       out8(I8042_DATA_REG, 0xf4);
        if (kbd_input_empty() == 0)
                return -1;