Skip to contentSkip to conversation

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

PATCH In review Fabio Estevam 2 participants 2 messages Jul 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: sdp: Pass the USB index to board_usb_init()

From: Fabio Estevam <[email protected]>

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().

---
 common/spl/spl_sdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl_sdp.c +1 -1
index 36c31aff099a..cc4fb4f7cca2 100644
@@ -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");
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines

Subject: [PATCH] spl: sdp: Pass the USB index to board_usb_init()

From: Fabio Estevam <[email protected]>

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

Quoted 6 lines

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().

Quoted 20 lines
---
 common/spl/spl_sdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl_sdp.c index renamed from common/spl/spl_sdp.c +0 -0

36c31aff099a..cc4fb4f7cca2 100644

common/spl/spl_sdp.c +1 -1
@@ -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