]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/i8042.h
at91sam9260ek: move board id setup to config header
[karo-tx-uboot.git] / include / i8042.h
index f77239fddef7cbfc539c87f45d5654681f671c62..c48c0573749637830c2b601982df83b903c4423d 100644 (file)
 
 /* defines */
 
-#define I8042_DATA_REG      (CFG_ISA_IO + 0x0060)    /* keyboard i/o buffer */
-#define I8042_STATUS_REG    (CFG_ISA_IO + 0x0064)    /* keyboard status read */
-#define I8042_COMMAND_REG   (CFG_ISA_IO + 0x0064)    /* keyboard ctrl write */
+#define I8042_DATA_REG      (CONFIG_SYS_ISA_IO + 0x0060)    /* keyboard i/o buffer */
+#define I8042_STATUS_REG    (CONFIG_SYS_ISA_IO + 0x0064)    /* keyboard status read */
+#define I8042_COMMAND_REG   (CONFIG_SYS_ISA_IO + 0x0064)    /* keyboard ctrl write */
+
+enum {
+       /* Output register (I8042_DATA_REG) has data for system */
+       I8042_STATUS_OUT_DATA   = 1 << 0,
+       I8042_STATUS_IN_DATA    = 1 << 1,
+};
 
 #define KBD_US              0        /* default US layout */
 #define KBD_GER             1        /* german layout */
 
 /* exports */
 
+/**
+ * Flush all buffer from keyboard controller to host.
+ */
+void i8042_flush(void);
+
+/**
+ * Disables the keyboard so that key strokes no longer generate scancodes to
+ * the host.
+ *
+ * @return 0 if ok, -1 if keyboard input was found while disabling
+ */
+int i8042_disable(void);
+
 int i8042_kbd_init(void);
 int i8042_tstc(void);
 int i8042_getc(void);