mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
spl: sdp: Add CONFIG_SPL_SDP_USB_DEV for USB device
Add a new configuration CONFIG_SPL_SDP_USB_DEV to specify the usb index for spl sdp driver, so that we change use different device. The default value is 0. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
@@ -1172,6 +1172,14 @@ config SPL_USB_SDP_SUPPORT
|
|||||||
Enable Serial Download Protocol (SDP) device support in SPL. This
|
Enable Serial Download Protocol (SDP) device support in SPL. This
|
||||||
allows to download images into memory and execute (jump to) them
|
allows to download images into memory and execute (jump to) them
|
||||||
using the same protocol as implemented by the i.MX family's boot ROM.
|
using the same protocol as implemented by the i.MX family's boot ROM.
|
||||||
|
|
||||||
|
config SPL_SDP_USB_DEV
|
||||||
|
int "SDP USB controller index"
|
||||||
|
default 0
|
||||||
|
depends on SPL_USB_SDP_SUPPORT
|
||||||
|
help
|
||||||
|
Some boards have USB controller other than 0. Define this option
|
||||||
|
so it can be used in compiled environment.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config SPL_WATCHDOG_SUPPORT
|
config SPL_WATCHDOG_SUPPORT
|
||||||
|
@@ -14,9 +14,9 @@ static int spl_sdp_load_image(struct spl_image_info *spl_image,
|
|||||||
struct spl_boot_device *bootdev)
|
struct spl_boot_device *bootdev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
const int controller_index = 0;
|
const int controller_index = CONFIG_SPL_SDP_USB_DEV;
|
||||||
|
|
||||||
board_usb_init(0, USB_INIT_DEVICE);
|
board_usb_init(controller_index, USB_INIT_DEVICE);
|
||||||
|
|
||||||
g_dnl_clear_detach();
|
g_dnl_clear_detach();
|
||||||
ret = g_dnl_register("usb_dnl_sdp");
|
ret = g_dnl_register("usb_dnl_sdp");
|
||||||
|
Reference in New Issue
Block a user