From: Thomas RIENOESSL Date: Fri, 30 Nov 2018 04:07:12 +0000 (-0800) Subject: coreboot: only init usb if necessary X-Git-Tag: v2019.01-rc2~18^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f86bd769fd0624106ecd2c5d500518e8b83a4e27;p=oweals%2Fu-boot.git 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 Reviewed-by: Bin Meng Reviewed-by: Christian Gmeiner --- diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index aaf0d07192..4c6ed0bfb2 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();