[U-Boot] [PATCH 11/28] i8042: Handle a duplicate power-on-reset response

Bin Meng bmeng.cn at gmail.com
Tue Sep 15 08:12:09 CEST 2015


Hi Simon,

On Wed, Sep 9, 2015 at 12:32 PM, Simon Glass <sjg at chromium.org> wrote:
> Sometimes we seem to get 0xaa twice which causes the config read to fail.
> This causes chromebook_link to fail to set up the keyboard.
>
> Add a check for this and read the config again when detected.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  drivers/input/i8042.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
> index dbd4b00..c6a92a2 100644
> --- a/drivers/input/i8042.c
> +++ b/drivers/input/i8042.c
> @@ -497,6 +497,8 @@ static int kbd_reset(void)
>         config = kbd_cmd_read(CMD_RD_CONFIG);
>         if (config == -1)
>                 return -1;
> +       else if (config == KBD_POR)     /* Sometimes get a second byte */
> +               config = kbd_cmd_read(CMD_RD_CONFIG);
>
>         config |= CONFIG_AT_TRANS;
>         config &= ~(CONFIG_KIRQ_EN | CONFIG_MIRQ_EN);
> --

This unfortunately breaks QEMU, that sometimes (not every time)
keyboard is not working. Maybe we should create a device tree property
to control such quirk?

Regards,
Bin


More information about the U-Boot mailing list