void __init pckbd_init_hw(void) { if (!kbd_controller_present()) { kbd_exists = 0; return; } kbd_request_region(); /* Flush any pending input. */ kbd_clear_input(); if (kbd_startup_reset) { char *msg = initialize_kbd(); if (msg) printk(KERN_WARNING "initialize_kbd: %s\n", msg); } #if defined CONFIG_PSMOUSE psaux_init(); #endif kbd_rate = pckbd_rate; /* Ok, finally allocate the IRQ, and off we go.. */ kbd_request_irq(keyboard_interrupt); }
int __init sa1111_kbd_init_hw(void) { char *msg; int ret; if (!request_mem_region(_KBDCR, 512, "keyboard")) return -EBUSY; SKPCR |= SKPCR_PTCLKEN; KBDCLKDIV = 0; KBDPRECNT = 127; /* Flush any pending input. */ kbd_clear_input(); msg = initialize_kbd(); if (msg) printk(KERN_WARNING "initialize_kbd: %s\n", msg); #if defined CONFIG_PSMOUSE psaux_init(); #endif k_setkeycode = sa1111_setkeycode; k_getkeycode = sa1111_getkeycode; k_translate = sa1111_translate; k_unexpected_up = sa1111_unexpected_up; k_leds = sa1111_leds; #ifdef CONFIG_MAGIC_SYSRQ k_sysrq_xlate = sa1111_sysrq_xlate; k_sysrq_key = 0x54; #endif /* Ok, finally allocate the IRQ, and off we go.. */ ret = request_irq(IRQ_TPRXINT, keyboard_interrupt, 0, "keyboard", NULL); if (ret) release_mem_region(_KBDCR, 512); return ret; }