diff options
author | Gabe Black <gabeblack@chromium.org> | 2012-10-12 14:02:02 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-19 15:25:43 -0700 |
commit | 48edb304d05d5d8b410db74f6e497adcfb132430 (patch) | |
tree | 5c5401bae667835a612cb3cfa3674960965e6662 /drivers/input | |
parent | ef94f7fa64190876c08b68eb1b067c5e6d3085f5 (diff) | |
download | u-boot-48edb304d05d5d8b410db74f6e497adcfb132430.tar.gz u-boot-48edb304d05d5d8b410db74f6e497adcfb132430.tar.bz2 u-boot-48edb304d05d5d8b410db74f6e497adcfb132430.zip |
input: 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.
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'drivers/input')
-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 6839c6bac5..3a4c467c59 100644 --- a/drivers/input/i8042.c +++ b/drivers/input/i8042.c @@ -26,6 +26,7 @@ /* includes */ #include <common.h> +#include <linux/compiler.h> #ifdef CONFIG_USE_CPCIDVI extern u8 gt_cpcidvi_in8(u32 offset); @@ -320,6 +321,16 @@ 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 __weak board_i8042_skip(void) +{ + /* As default, don't skip */ + return 0; +} + /******************************************************************************* * * i8042_kbd_init - reset keyboard and init state flags @@ -329,7 +340,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 |