[U-Boot] [PATCH 2/2] efi: payload: only init usb if necessary
Christian Gmeiner
christian.gmeiner at gmail.com
Fri Nov 30 07:43:49 UTC 2018
Am Fr., 30. Nov. 2018 um 05:02 Uhr schrieb Bin Meng <bmeng.cn at gmail.com>:
>
> 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 at gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
> ---
>
> arch/x86/cpu/efi/payload.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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;
> }
> --
> 2.7.4
>
--
greets
--
Christian Gmeiner, MSc
https://christian-gmeiner.info
More information about the U-Boot
mailing list