diff options
author | Gabe Black <gabeblack@chromium.org> | 2011-10-24 23:07:40 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@chromium.org> | 2011-10-25 16:03:19 -0700 |
commit | 5c255380893e305bf336c301b08d43293e6d7cc2 (patch) | |
tree | 652d36fe754bcfec56730fe17d873bb8781becc0 /drivers | |
parent | bf9c9866112e468699a17eb2128f4c8d59f503e8 (diff) |
Provide a board specific mechanism to decide whether to skip i8042 init
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.
BUG=chrome-os-partner:6585
TEST=Built and booted on Stumpy. Built and booted on Alex.
Change-Id: Ibac6fd4149fd125f6461ae4e86936eb9b012edb6
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://gerrit.chromium.org/gerrit/10624
Commit-Ready: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 8575d78d13..f84a8dace8 100644 --- a/drivers/input/i8042.c +++ b/drivers/input/i8042.c @@ -322,6 +322,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"))); + /******************************************************************************* * * i8042_kbd_init - reset keyboard and init state flags @@ -331,7 +342,7 @@ int i8042_kbd_init (void) int keymap, try; char *penv; - if (!kbd_controller_present()) + if (!kbd_controller_present() || board_i8042_skip()) return -1; #ifdef CONFIG_USE_CPCIDVI |