1/*
2 *  linux/include/asm-arm/arch-l7200/keyboard.h
3 *
4 *  Keyboard driver definitions for LinkUp Systems L7200 architecture
5 *
6 *  Copyright (C) 2000 Scott A McConnell (samcconn@cotw.com)
7 *                     Steve Hill (sjhill@cotw.com)
8 *
9 *  This file is subject to the terms and conditions of the GNU General Public
10 *  License. See the file COPYING in the main directory of this archive for
11 *  more details.
12 *
13 * Changelog:
14 *   07-18-2000	SAM	Created file
15 *   07-28-2000	SJH	Complete rewrite
16 */
17
18#include <asm/irq.h>
19
20/*
21 * Layout of L7200 keyboard registers
22 */
23struct KBD_Port {
24	unsigned int KBDR;
25	unsigned int KBDMR;
26	unsigned int KBSBSR;
27	unsigned int Reserved;
28	unsigned int KBKSR;
29};
30
31#define KBD_BASE        IO_BASE_2 + 0x4000
32#define l7200kbd_hwregs ((volatile struct KBD_Port *) (KBD_BASE))
33
34extern void l7200kbd_init_hw(void);
35extern int l7200kbd_translate(unsigned char scancode, unsigned char *keycode,
36			      char raw_mode);
37
38#define kbd_setkeycode(sc,kc)		(-EINVAL)
39#define kbd_getkeycode(sc)		(-EINVAL)
40
41#define kbd_translate(sc, kcp, rm)      ({ *(kcp) = (sc); 1; })
42#define kbd_unexpected_up(kc)           (0200)
43#define kbd_leds(leds)                  do {} while (0)
44#define kbd_init_hw()                   l7200kbd_init_hw()
45#define kbd_sysrq_xlate                 ((unsigned char *)NULL)
46#define kbd_disable_irq()               disable_irq(IRQ_GCTC2)
47#define kbd_enable_irq()                enable_irq(IRQ_GCTC2)
48
49#define SYSRQ_KEY	13
50