From e98937aaf03c35fb3fe1d23aa38e0935804e7fdf Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 15 Nov 2010 10:01:11 +0100 Subject: [PATCH] * grub-core/term/at_keyboard.c (grub_keyboard_controller_read) [GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_QEMU]: ifdef-ed out (now unused). (grub_keyboard_controller_init) [GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_QEMU]: Don't attempt to read the initial state since controller isn't inited yet. --- ChangeLog | 9 +++++++++ grub-core/term/at_keyboard.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1c862e1f0..8f78477e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-11-15 Vladimir Serbinenko + + * grub-core/term/at_keyboard.c (grub_keyboard_controller_read) + [GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_QEMU]: ifdef-ed out + (now unused). + (grub_keyboard_controller_init) + [GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_QEMU]: Don't attempt to + read the initial state since controller isn't inited yet. + 2010-11-15 Vladimir Serbinenko * grub-core/lib/relocator.c (malloc_in_range): Take into account that diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c index 1b130bd62..5bc3f578c 100644 --- a/grub-core/term/at_keyboard.c +++ b/grub-core/term/at_keyboard.c @@ -257,6 +257,8 @@ grub_keyboard_controller_write (grub_uint8_t c) grub_outb (c, KEYBOARD_REG_DATA); } +#if !defined (GRUB_MACHINE_MIPS_YEELOONG) && !defined (GRUB_MACHINE_QEMU) + static grub_uint8_t grub_keyboard_controller_read (void) { @@ -265,6 +267,8 @@ grub_keyboard_controller_read (void) return grub_inb (KEYBOARD_REG_DATA); } +#endif + static int write_mode (int mode) { @@ -558,8 +562,13 @@ grub_keyboard_controller_init (struct grub_term_input *term __attribute__ ((unus keyboard_controller_wait_until_ready (); grub_inb (KEYBOARD_REG_DATA); } +#if defined (GRUB_MACHINE_MIPS_YEELOONG) || defined (GRUB_MACHINE_QEMU) + grub_keyboard_controller_orig = 0; + grub_keyboard_orig_set = 2; +#else grub_keyboard_controller_orig = grub_keyboard_controller_read (); grub_keyboard_orig_set = query_mode (); +#endif set_scancodes (); keyboard_controller_led (led_status);