[U-Boot] [PATCH v2 5/7] x86: i8042: Correctly initialize the controller
Bin Meng
bmeng.cn at gmail.com
Sun Aug 23 14:25:51 CEST 2015
Hi Simon,
On Sat, Aug 22, 2015 at 7:27 AM, Simon Glass <sjg at chromium.org> wrote:
> Hi Bin,
>
> On 21 August 2015 at 01:18, Bin Meng <bmeng.cn at gmail.com> wrote:
>> The existing i8042 keyboard controller driver has some issues.
>> First of all, it does not issue a self-test command (0xaa) to the
>> controller at the very beginning. Without this, the controller
>> does not respond any command at all. Secondly, it initializes
>
> a few nits
>
> "does not response to any command"
OK
>
>> the configuration byte reigster to turn on keyboard's interrupt,
>
> turn on the keyboard's interrupt
OK
>
>> which is not allowed as U-Boot we don't normally enable interrupt.
>
> as U-Boot does not normally allow interrupts to be processed.
OK
>
>> Finally, at the end of the initialization routine, it wrongly
>> sets the controller to disable all interfaces including both
>> keyboard and mouse.
>>
>> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>> Acked-by: Simon Glass <sjg at chromium.org>
>>
>> ---
>>
>> Changes in v2:
>> - Reorder this patch to follow the i8042 driver clean up patches
>>
>> drivers/input/i8042.c | 43 +++++++++++++++++++++----------------------
>> 1 file changed, 21 insertions(+), 22 deletions(-)
>
> I am amazed this code actually works! But at least on chromebook_link, it does.
>
Me either. The old codes could work on QEMU too, but I believe that is
because QEMU does not emulate hardware exactly (like does not have to
issue self-test command before any command). As for chromebook_link,
is i8042 implemented in the EC? I suspect some EC firmware may be
quite of forgiveness :-)
Regards,
Bin
More information about the U-Boot
mailing list