aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-11-29 20:07:13 -0800
committerBin Meng <bmeng.cn@gmail.com>2018-12-10 10:14:42 +0800
commitd3d6531866f2d7aa85b053cef553090b251e909f (patch)
tree989dcec887c151bb2c8796f8177f3df80c5592ce /arch
parentf86bd769fd0624106ecd2c5d500518e8b83a4e27 (diff)
downloadu-boot-d3d6531866f2d7aa85b053cef553090b251e909f.zip
u-boot-d3d6531866f2d7aa85b053cef553090b251e909f.tar.gz
u-boot-d3d6531866f2d7aa85b053cef553090b251e909f.tar.bz2
efi: payload: only init usb if necessary
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/efi/payload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index c323c7b..225aef7 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -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;
}