]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
efi: payload: only init usb if necessary
authorBin Meng <bmeng.cn@gmail.com>
Fri, 30 Nov 2018 04:07:13 +0000 (20:07 -0800)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 10 Dec 2018 02:14:42 +0000 (10:14 +0800)
Up until now the call to initialize the USB subsystem was hardcoded
for U-Boot running as an EFI 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: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
arch/x86/cpu/efi/payload.c

index c323c7b19a592d50e6c891f567cfd25d5f2e205f..225aef7bf6a0c7c5634226837612f3925138c6b3 100644 (file)
@@ -166,7 +166,8 @@ int reserve_arch(void)
 int last_stage_init(void)
 {
        /* start usb so that usb keyboard can be used as input device */
-       usb_init();
+       if (CONFIG_IS_ENABLED(USB_KEYBOARD))
+               usb_init();
 
        return 0;
 }