Merge bk://oe-devel@oe-devel.bkbits.net/packages
[vuplus_openembedded] / linux / openzaurus-pxa-2.4.18-rmk7-pxa3-embedix20031107 / enable-sysrq.patch
1 --- linux/drivers/char/corgi_keyb.c~enable-sysrq        2003-09-05 01:18:15.000000000 +0200
2 +++ linux/drivers/char/corgi_keyb.c     2003-09-05 01:40:17.000000000 +0200
3 @@ -23,7 +23,7 @@
4  #include <linux/init.h>
5  #include <linux/poll.h>
6  #include <linux/wait.h>
7 -#include <asm/arch/keyboard.h>
8 +#include <asm/keyboard.h>
9  #include <asm/uaccess.h>
10  #include <linux/tqueue.h>
11  #include <linux/kbd_ll.h>
12 @@ -46,6 +46,18 @@
13  #endif
14  
15  /*
16 + * This is the KeyCode [not ScanCode!] to ASCII Code mapping table
17 + */
18 +
19 +#ifdef CONFIG_MAGIC_SYSRQ
20 +static unsigned char corgi_sysrq_xlate[128] =
21 +       "\000abcdefghijklmno"                                           /* 00-0f */
22 +       "pqrstuvwxyz\000\000\000\000\000"                               /* 10-1f */
23 +       " \000\000\000\000\000\000\000\0001234567"                      /* 20-2f */
24 +       "890\000\000\000\000\000\000\000\000\000\000\000\000\000";      /* 30-3f */
25 +#endif
26 +
27 +/*
28   * common logical driver definition
29   */
30  extern void sharppda_kbd_press(int keycode);
31 @@ -251,7 +263,13 @@
32         corgi_wakeup_button_init();
33  #endif // USE_WAKEUP_BUTTON
34  
35 -       printk("keyboard initilaized.\n");
36 +       printk("keyboard initialized.\n");
37 +#ifdef CONFIG_MAGIC_SYSRQ
38 +       k_sysrq_key = 0x28; // KEY_HOME
39 +       k_sysrq_xlate = corgi_sysrq_xlate;
40 +       printk("magic_sysrq initialized.\n");
41 +#endif
42 +
43  }
44  
45  int corgi_kbd_translate(unsigned char scancode, unsigned char *keycode_p)