[U-Boot] UMS on mx6sl

Hi,
I am trying to get USB Mass Storage to work on mx6slevk, but I am getting the following error:
=> ums 0 mmc 1 UMS: disk start sector: 0x0, count: 0x762c00 g_dnl_register: failed!, error: -22 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage()
On mx6qsabresd it works fine and I am able to mount the SD/eMMC card on the host PC.
The mx6slevk changes are the same as the ones for sabresd and look like this:
diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h index 1221418..9a7870a 100644 --- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -47,6 +47,10 @@ #define CONFIG_GENERIC_MMC #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION +#define CONFIG_BOUNCE_BUFFER +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_EXT4_WRITE
/* I2C Configs */ #define CONFIG_CMD_I2C @@ -246,6 +250,20 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #endif
+#define CONFIG_CI_UDC +#define CONFIG_USBD_HS +#define CONFIG_USB_GADGET_DUALSPEED
Does anyone have any ideas of what may be missing?
Thanks,
Fabio Estevam

On Tue, Feb 24, 2015 at 7:22 PM, Fabio Estevam festevam@gmail.com wrote:
Hi,
I am trying to get USB Mass Storage to work on mx6slevk, but I am getting the following error:
=> ums 0 mmc 1 UMS: disk start sector: 0x0, count: 0x762c00 g_dnl_register: failed!, error: -22 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage()
On mx6qsabresd it works fine and I am able to mount the SD/eMMC card on the host PC.
The mx6slevk changes are the same as the ones for sabresd and look like this:
Ops, I missed some to copy some pieces. The changes look like:
--- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -47,6 +47,10 @@ #define CONFIG_GENERIC_MMC #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION +#define CONFIG_BOUNCE_BUFFER +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_EXT4_WRITE
/* I2C Configs */ #define CONFIG_CMD_I2C @@ -246,6 +250,20 @@ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #endif
+#define CONFIG_CI_UDC +#define CONFIG_USBD_HS +#define CONFIG_USB_GADGET_DUALSPEED + +#define CONFIG_USB_GADGET +#define CONFIG_CMD_USB_MASS_STORAGE +#define CONFIG_USB_GADGET_MASS_STORAGE +#define CONFIG_USBDOWNLOAD_GADGET +#define CONFIG_USB_GADGET_VBUS_DRAW 2 + +#define CONFIG_G_DNL_VENDOR_NUM 0x0525 +#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 +#define CONFIG_G_DNL_MANUFACTURER "FSL"
Does anyone have any ideas of what may be missing?

Hi Fabio,
On 02/24/2015 03:25 PM, Fabio Estevam wrote:
On Tue, Feb 24, 2015 at 7:22 PM, Fabio Estevam festevam@gmail.com wrote:
Hi,
I am trying to get USB Mass Storage to work on mx6slevk, but I am getting the following error:
=> ums 0 mmc 1 UMS: disk start sector: 0x0, count: 0x762c00 g_dnl_register: failed!, error: -22 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage()
On mx6qsabresd it works fine and I am able to mount the SD/eMMC card on the host PC.
The mx6slevk changes are the same as the ones for sabresd and look like this:
You might want to check this value:
#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP

Hi Eric,
On Tue, Feb 24, 2015 at 8:10 PM, Eric Nelson eric.nelson@boundarydevices.com wrote:
You might want to check this value:
#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Thanks for the suggestion. After adding this config the error is still the same:
=> ums 0 mmc 1 UMS: disk start sector: 0x0, count: 0x762c00 g_dnl_register: failed!, error: -19 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage()
Thanks

On 02/24/2015 04:19 PM, Fabio Estevam wrote:
Hi Eric,
On Tue, Feb 24, 2015 at 8:10 PM, Eric Nelson eric.nelson@boundarydevices.com wrote:
You might want to check this value:
#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Thanks for the suggestion. After adding this config the error is still the same:
=> ums 0 mmc 1 UMS: disk start sector: 0x0, count: 0x762c00 g_dnl_register: failed!, error: -19 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage()
A swing and a miss! (story of my attempts at baseball)

On Tue, Feb 24, 2015 at 8:19 PM, Fabio Estevam festevam@gmail.com wrote:
Hi Eric,
On Tue, Feb 24, 2015 at 8:10 PM, Eric Nelson eric.nelson@boundarydevices.com wrote:
You might want to check this value:
#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Thanks for the suggestion. After adding this config the error is still the same:
=> ums 0 mmc 1 UMS: disk start sector: 0x0, count: 0x762c00 g_dnl_register: failed!, error: -19 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage()
Ok, I managed to fix it. Will send a patch tomorrow, thanks

On Wednesday, February 25, 2015 at 03:23:13 AM, Fabio Estevam wrote:
On Tue, Feb 24, 2015 at 8:19 PM, Fabio Estevam festevam@gmail.com wrote:
Hi Eric,
On Tue, Feb 24, 2015 at 8:10 PM, Eric Nelson
eric.nelson@boundarydevices.com wrote:
You might want to check this value:
#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Thanks for the suggestion. After adding this config the error is still the same:
=> ums 0 mmc 1 UMS: disk start sector: 0x0, count: 0x762c00 g_dnl_register: failed!, error: -19 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage()
Ok, I managed to fix it. Will send a patch tomorrow, thanks
Cool, thanks :)
Best regards, Marek Vasut

Hi Marek,
On Wed, Feb 25, 2015 at 9:11 AM, Marek Vasut marex@denx.de wrote:
On Wednesday, February 25, 2015 at 03:23:13 AM, Fabio Estevam wrote:
Ok, I managed to fix it. Will send a patch tomorrow, thanks
Cool, thanks :)
Just to let you know that this original problem was caused by an error in the mx6sl-evk board file, so things look good in the USB stack.
Regards,
Fabio Estevam

On Wednesday, February 25, 2015 at 05:07:00 PM, Fabio Estevam wrote:
Hi Marek,
On Wed, Feb 25, 2015 at 9:11 AM, Marek Vasut marex@denx.de wrote:
On Wednesday, February 25, 2015 at 03:23:13 AM, Fabio Estevam wrote:
Ok, I managed to fix it. Will send a patch tomorrow, thanks
Cool, thanks :)
Just to let you know that this original problem was caused by an error in the mx6sl-evk board file, so things look good in the USB stack.
Of course, I never ever doubted that ;-)
Best regards, Marek Vasut

On Wednesday, February 25, 2015 at 12:10:33 AM, Eric Nelson wrote:
Hi Fabio,
On 02/24/2015 03:25 PM, Fabio Estevam wrote:
On Tue, Feb 24, 2015 at 7:22 PM, Fabio Estevam festevam@gmail.com wrote:
Hi,
I am trying to get USB Mass Storage to work on mx6slevk, but I am getting the following error:
=> ums 0 mmc 1 UMS: disk start sector: 0x0, count: 0x762c00 g_dnl_register: failed!, error: -22 ERROR: g_dnl_register failed at common/cmd_usb_mass_storage.c:107/do_usb_mass_storage()
On mx6qsabresd it works fine and I am able to mount the SD/eMMC card on the host PC.
The mx6slevk changes are the same as the ones for sabresd and look like
this:
You might want to check this value:
#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
This is only useful for keyboards ;-)
Best regards, Marek Vasut
participants (3)
-
Eric Nelson
-
Fabio Estevam
-
Marek Vasut