diff mbox series

spl: sdp: Pass the USB index to board_usb_init()

Message ID 20220713203946.3136555-1-festevam@gmail.com
State Accepted
Commit 16aabfe2f29d4682b2176095029fa307caccaced
Delegated to: Stefano Babic
Headers show
Series spl: sdp: Pass the USB index to board_usb_init() | expand

Commit Message

Fabio Estevam July 13, 2022, 8:39 p.m. UTC
From: Fabio Estevam <festevam@denx.de>

board_usb_init() should receive the controller_index as its
first parameter instead of having it hardcoded as 0.

All in-tree users have CONFIG_SPL_SDP_USB_DEV as 0, so this error
should not affect any board.

Fix it by passing controller_index as the parameter of board_usb_init().

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 common/spl/spl_sdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peng Fan July 13, 2022, 11:06 p.m. UTC | #1
> Subject: [PATCH] spl: sdp: Pass the USB index to board_usb_init()
> 
> From: Fabio Estevam <festevam@denx.de>
> 
> board_usb_init() should receive the controller_index as its first parameter
> instead of having it hardcoded as 0.
> 
> All in-tree users have CONFIG_SPL_SDP_USB_DEV as 0, so this error should
> not affect any board.
> 
> Fix it by passing controller_index as the parameter of board_usb_init().
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>

Acked-by: Peng Fan <peng.fan@nxp.com>

> ---
>  common/spl/spl_sdp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index
> 36c31aff099a..cc4fb4f7cca2 100644
> --- a/common/spl/spl_sdp.c
> +++ b/common/spl/spl_sdp.c
> @@ -19,7 +19,7 @@ static int spl_sdp_load_image(struct spl_image_info
> *spl_image,
> 
>  	usb_gadget_initialize(controller_index);
> 
> -	board_usb_init(0, USB_INIT_DEVICE);
> +	board_usb_init(controller_index, USB_INIT_DEVICE);
> 
>  	g_dnl_clear_detach();
>  	ret = g_dnl_register("usb_dnl_sdp");
> --
> 2.25.1
diff mbox series

Patch

diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
index 36c31aff099a..cc4fb4f7cca2 100644
--- a/common/spl/spl_sdp.c
+++ b/common/spl/spl_sdp.c
@@ -19,7 +19,7 @@  static int spl_sdp_load_image(struct spl_image_info *spl_image,
 
 	usb_gadget_initialize(controller_index);
 
-	board_usb_init(0, USB_INIT_DEVICE);
+	board_usb_init(controller_index, USB_INIT_DEVICE);
 
 	g_dnl_clear_detach();
 	ret = g_dnl_register("usb_dnl_sdp");