sa1111_keyb.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:27k
- /*
- * SA1111 PS/2 keyboard/mouse driver
- *
- * 2000 by VASARA RESEARCH INC.
- *
- * Changelog:
- * Jun.xx,2000: Kunihiko IMAI <imai@vasara.co.jp>
- * Port to 2.4.0test1-ac19-rmk1-np1
- * Apr.17,2000: Takafumi Kawana <kawana@pro.or.jp>
- * Internal Release for XP860
- *
- *
- * This driver is based on linux/drivers/char/pc_keyb.c
- * Original declaration follows:
- *
- * linux/drivers/char/pc_keyb.c
- *
- * Separation of the PC low-level part by Geert Uytterhoeven, May 1997
- * See keyboard.c for the whole history.
- *
- * Major cleanup by Martin Mares, May 1997
- *
- * Combined the keyboard and PS/2 mouse handling into one file,
- * because they share the same hardware.
- * Johan Myreen <jem@iki.fi> 1998-10-08.
- *
- * Code fixes to handle mouse ACKs properly.
- * C. Scott Ananian <cananian@alumni.princeton.edu> 1999-01-29.
- *
- */
- #include <linux/config.h>
- #include <linux/spinlock.h>
- #include <linux/sched.h>
- #include <linux/interrupt.h>
- #include <linux/tty.h>
- #include <linux/mm.h>
- #include <linux/signal.h>
- #include <linux/init.h>
- #include <linux/kbd_ll.h>
- #include <linux/delay.h>
- #include <linux/random.h>
- #include <linux/poll.h>
- #include <linux/miscdevice.h>
- #include <linux/slab.h>
- #include <linux/kbd_kern.h>
- #include <linux/ioport.h>
- #include <asm/hardware.h>
- #include <asm/bitops.h>
- #include <asm/uaccess.h>
- #include <asm/irq.h>
- #include <asm/system.h>
- #include <asm/io.h>
- /* Some configuration switches are present in the include file... */
- #include <linux/pc_keyb.h>
- #include <asm/keyboard.h>
- #include <asm/hardware/sa1111.h>
- #define KBD_STAT_RXB (1<<4)
- #define KBD_STAT_RXF (1<<5)
- #define KBD_STAT_TXB (1<<6)
- #define KBD_STAT_TXE (1<<7)
- #define KBD_STAT_STP (1<<8)
- #define MSE_STAT_RXB (1<<4)
- #define MSE_STAT_RXF (1<<5)
- #define MSE_STAT_TXB (1<<6)
- #define MSE_STAT_TXE (1<<7)
- #define MSE_STAT_STP (1<<8)
- /* Simple translation table for the SysRq keys */
- #ifdef CONFIG_MAGIC_SYSRQ
- unsigned char sa1111_sysrq_xlate[128] = "