3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- linux/drivers/char/corgi_keyb.c~enable-sysrq
7 +++ linux/drivers/char/corgi_keyb.c
9 #include <linux/init.h>
10 #include <linux/poll.h>
11 #include <linux/wait.h>
12 -#include <asm/arch/keyboard.h>
13 +#include <asm/keyboard.h>
14 #include <asm/uaccess.h>
15 #include <linux/tqueue.h>
16 #include <linux/kbd_ll.h>
21 + * This is the KeyCode [not ScanCode!] to ASCII Code mapping table
24 +#ifdef CONFIG_MAGIC_SYSRQ
25 +static unsigned char corgi_sysrq_xlate[128] =
26 + "\000abcdefghijklmno" /* 00-0f */
27 + "pqrstuvwxyz\000\000\000\000\000" /* 10-1f */
28 + " \000\000\000\000\000\000\000\0001234567" /* 20-2f */
29 + "890\000\000\000\000\000\000\000\000\000\000\000\000\000"; /* 30-3f */
33 * common logical driver definition
35 extern void sharppda_kbd_press(int keycode);
37 corgi_wakeup_button_init();
38 #endif // USE_WAKEUP_BUTTON
40 - printk("keyboard initilaized.\n");
41 + printk("keyboard initialized.\n");
42 +#ifdef CONFIG_MAGIC_SYSRQ
43 + k_sysrq_key = 0x28; // KEY_HOME
44 + k_sysrq_xlate = corgi_sysrq_xlate;
45 + printk("magic_sysrq initialized.\n");
50 int corgi_kbd_translate(unsigned char scancode, unsigned char *keycode_p)
51 --- linux/drivers/char/keyboard.c~enable-sysrq
52 +++ linux/drivers/char/keyboard.c
54 #ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */
55 if (keycode == SYSRQ_KEY) {
56 sysrq_pressed = !up_flag;
59 } else if (sysrq_pressed) {
61 handle_sysrq(kbd_sysrq_xlate[keycode], kbd_pt_regs, kbd, tty);