[U-Boot] [PATCH 2/5] input: Provide a board specific mechanism to decide whether to skip i8042 init

Simon Glass sjg at chromium.org
Sat Oct 13 02:03:17 CEST 2012


Hi Tom,

On Fri, Oct 12, 2012 at 9:05 AM, Tom Rini <trini at ti.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 10/11/12 18:15, Simon Glass wrote:
>> From: Gabe Black <gabeblack at chromium.org>
>>
>> This change adds a board overridable function which can be used to
>> decide whether or not to initialize the i8042 keyboard controller.
>> On systems where it isn't actually connected to anything, this can
>> save a significant amount of boot time.
>>
>> On Stumpy, this saves about 200ms on boot.
>>
>> Signed-off-by: Gabe Black <gabeblack at chromium.org> Signed-off-by:
>> Simon Glass <sjg at chromium.org> --- drivers/input/i8042.c |   13
>> ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index
>> 99254e4..cae2d0a 100644 --- a/drivers/input/i8042.c +++
>> b/drivers/input/i8042.c @@ -320,6 +320,17 @@ static int
>> kbd_controller_present(void) return in8(I8042_STATUS_REG) != 0xff;
>> }
>>
>> +/* + * Implement a weak default function for boards that
>> optionally + * need to skip the i8042 initialization. + */ +int
>> __board_i8042_skip(void) +{ + /* As default, don't skip */ +  return
>> 0; +} +int board_i8042_skip(void) __attribute__((weak,
>> alias("__board_i8042_skip")));
>
> Please add <linux/compiler.h> and use __weak directly, thanks.

Yes will do,

>
> - --
> Tom
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iQIcBAEBAgAGBQJQeD/QAAoJENk4IS6UOR1WVMsP/RJTlWaTvF56K6H75WbjK7l5
> xE7zeAeCS4gbM1CS0fEv1X4296L7oWUUUkw73gwSEAxd2CxOj96HrhJI0WQIqZ/a
> m6ysfwswzY92oqXJGxnWnLiZzd0JUR/QHZAM7U0tX1yHFsYrycEtuq+JvfMm5BU7
> 1ozqrN0SoFPa8ZBq0GpnXhDsGdMApucDBkbDv3cgHTYPkOlfh3gLpbz/dkWKxrCv
> NBwKvZgVMtEPf9hZf5CLuB2ghfWIRyP50Bf99nKhV+gdLGtrEbboHkMMXEc2Z1ex
> foEMqpmSiMVd9yMRqVEIM3sWwnapqAZVn3wQLoq5Kz+YGS/9e0c9t95ck+CmndiM
> kJmrx/LZ/XSGzjLrKC3MWLWC/KUS2hHqj4AfYUf1kL5lPuHM24c+oSRfOjogkaqR
> bMJZ9ii/kYcQJry/dAYTjFyEa120X48y46e2bNcMhWVZh48A6VpJkFILb1Ga4tEo
> ss+hMBX/tiMNp8eoOR7y1n+A+94r3ABKUrLapjfVKg+qXeufrMyotBVfPY35hWnP
> qLNVlPpdEF7nP1Wt22OB9s6bBcI6dCrNuL75Ym6wJ3DYnpqU8Y8f3HihwL7cBy7F
> o1Zpo0bzazNfy722IYphWu0O3hihIQ11fRpAndVemUzjaXP/kKxaVhiDCj28xHup
> 9zGuTm7SW/liJTXp4cc8
> =5tNx
> -----END PGP SIGNATURE-----

Regards,
Simon


More information about the U-Boot mailing list