aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorThomas RIENOESSL <thomas.rienoessl@bachmann.info>2018-11-29 20:07:12 -0800
committerBin Meng <bmeng.cn@gmail.com>2018-12-10 10:14:36 +0800
commitf86bd769fd0624106ecd2c5d500518e8b83a4e27 (patch)
treeb644ce2b39251e519377b8012541413e6942bb96 /arch
parent2677a15e5839ee8f7073192a666348e2e3e5cdcd (diff)
downloadu-boot-f86bd769fd0624106ecd2c5d500518e8b83a4e27.zip
u-boot-f86bd769fd0624106ecd2c5d500518e8b83a4e27.tar.gz
u-boot-f86bd769fd0624106ecd2c5d500518e8b83a4e27.tar.bz2
coreboot: only init usb if necessary
Up until now the call to initialize the USB subsystem was hardcoded for U-Boot running as a coreboot payload. This was used to enable the use of a USB keyboard in the U-Boot shell. However not all boards might need this functionality. As initializing the USB subsystem can take a considerable amount of time (several seconds on some boards), we now initialize the USB subsystem only if U-Boot is configured to use USB keyboards. Signed-off-by: Thomas RIENOESSL <thomas.rienoessl@bachmann.info> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/coreboot/coreboot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index aaf0d07..4c6ed0b 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -77,7 +77,8 @@ int last_stage_init(void)
timestamp_add_to_bootstage();
/* start usb so that usb keyboard can be used as input device */
- usb_init();
+ if (CONFIG_IS_ENABLED(USB_KEYBOARD))
+ usb_init();
board_final_cleanup();