Commit f86bd769fd0624106ecd2c5d500518e8b83a4e27

Authored by Thomas RIENOESSL
Committed by Bin Meng
1 parent 2677a15e58

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 <thomas.rienoessl@bachmann.info>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

arch/x86/cpu/coreboot/coreboot.c
... ... @@ -77,7 +77,8 @@
77 77 timestamp_add_to_bootstage();
78 78  
79 79 /* start usb so that usb keyboard can be used as input device */
80   - usb_init();
  80 + if (CONFIG_IS_ENABLED(USB_KEYBOARD))
  81 + usb_init();
81 82  
82 83 board_final_cleanup();
83 84