From: Christian Gmeiner Date: Mon, 12 Nov 2018 13:44:06 +0100 Subject: [U-Boot] [PATCH] coreboot: only init usb if necessary Message-ID: <20181112124406.30459-1-christian.gmeiner@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Thomas RIENOESSL 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 --- arch/x86/cpu/coreboot/coreboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index a6fd3a849a..915341fe12 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 (IS_ENABLED(CONFIG_USB_KEYBOARD)) + usb_init(); board_final_cleanup(); -- 2.19.1