[PATCH v2 8/8] board: ten64: start USB stack in late init
Marek Vasut
marek.vasut at mailbox.org
Tue Apr 21 02:44:38 CEST 2026
On 4/21/26 2:04 AM, Mathew McBride wrote:
> There are two reasons we need to start the USB stack late
> in the init sequence (before handing control to the user /
> boot sequence):
>
> 1. When a USB hub is present on the board, we need to
> do the required sequences to make it usable
>
> 2. To make USB storage devices 'visible' to bootflow
> without further intervention
>
> Signed-off-by: Mathew McBride <matt at traverse.com.au>
> ---
> board/traverse/ten64/ten64.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/board/traverse/ten64/ten64.c b/board/traverse/ten64/ten64.c
> index ee2a4005739..29faea3dadb 100644
> --- a/board/traverse/ten64/ten64.c
> +++ b/board/traverse/ten64/ten64.c
> @@ -31,7 +31,7 @@
> #include <asm/arch/soc.h>
> #include <asm/arch-fsl-layerscape/fsl_icid.h>
> #include <nvme.h>
> -
> +#include <usb.h>
> #include <fsl_immap.h>
>
> #include "../common/ten64-controller.h"
> @@ -239,6 +239,13 @@ int fsl_board_late_init(void)
> if (IS_ENABLED(CONFIG_NVME))
> nvme_scan_namespace();
>
> + /* Ensure usb storage devices are available to bootflow.
> + * Additionally, if there is a USB hub on the board,
> + * it needs to be started to become usable both in U-Boot
> + * and in any booted OS.
> + */
> + if (IS_ENABLED(CONFIG_USB_STORAGE) || IS_ENABLED(CONFIG_USB_ONBOARD_HUB))
> + usb_init();
Why not place 'usb start' into 'preboot' script instead ?
More information about the U-Boot
mailing list