i8042.c (7708d8b352e9e595f6f08afd3206af6495c7dc09) i8042.c (ef94f7fa64190876c08b68eb1b067c5e6d3085f5)
1/*
2 * (C) Copyright 2002 ELTEC Elektronik AG
3 * Frank Gottschling <fgottschling@eltec.de>
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or

--- 593 unchanged lines hidden (view full) ---

602 out8(I8042_DATA_REG, (kbd_flags & 0x7)); /* LED bits only */
603}
604
605
606/******************************************************************************/
607
608static int kbd_input_empty(void)
609{
1/*
2 * (C) Copyright 2002 ELTEC Elektronik AG
3 * Frank Gottschling <fgottschling@eltec.de>
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or

--- 593 unchanged lines hidden (view full) ---

602 out8(I8042_DATA_REG, (kbd_flags & 0x7)); /* LED bits only */
603}
604
605
606/******************************************************************************/
607
608static int kbd_input_empty(void)
609{
610 int kbdTimeout = KBD_TIMEOUT;
610 int kbdTimeout = KBD_TIMEOUT * 1000;
611
611
612 /* wait for input buf empty */
613 while ((in8(I8042_STATUS_REG) & 0x02) && kbdTimeout--)
614 udelay(1000);
612 while ((in8(I8042_STATUS_REG) & I8042_STATUS_IN_DATA) && kbdTimeout--)
613 udelay(1);
615
616 return kbdTimeout != -1;
617}
618
619/******************************************************************************/
620
621static int kbd_reset(void)
622{
623 if (kbd_input_empty() == 0)
624 return -1;
625
626 out8(I8042_DATA_REG, 0xff);
627
614
615 return kbdTimeout != -1;
616}
617
618/******************************************************************************/
619
620static int kbd_reset(void)
621{
622 if (kbd_input_empty() == 0)
623 return -1;
624
625 out8(I8042_DATA_REG, 0xff);
626
628 udelay(250000);
629
630 if (kbd_input_empty() == 0)
631 return -1;
632
633#ifdef CONFIG_USE_CPCIDVI
634 out8(I8042_COMMAND_REG, 0x60);
635#else
636 out8(I8042_DATA_REG, 0x60);
637#endif

--- 17 unchanged lines hidden ---
627 if (kbd_input_empty() == 0)
628 return -1;
629
630#ifdef CONFIG_USE_CPCIDVI
631 out8(I8042_COMMAND_REG, 0x60);
632#else
633 out8(I8042_DATA_REG, 0x60);
634#endif

--- 17 unchanged lines hidden ---