AnsweredAssumed Answered

i.MX28: modprobe g_file_storage fail after resuming from suspend mode

Question asked by Benson Liu on Jul 14, 2016
Latest reply on Jul 25, 2016 by CarlosCasillas
Branched to a new discussion

Hi all,

 

Our user case :

1. Connect i.MX28 and PC by using usb cable.

2. Use " modprobe g_file_storage file=/dev/mtdblock5 removable=y ro=y" to mount file storage and get data from peripherial storage(Nor flash) of i.MX28.

3. Use "rmmod g_file_storage" and remove usb cable

 

Before entering suspend mode, we can mount file storage normally. 

After resuming from suspend mode, we can not mount file storage.

We check USBCTRL(HW_USBCTRL_USBCMD, HW_USBCTRL_OTGSC, HW_USBCTRL_USBSTS, ...) registers, and all USBCTRL registers are 0 after resuming.

 

We refer to usb_phy_enable (liux/arch/arm/plat-mxs/usb_common.c),  dr_controller_setup, dr_controller_run (linux/drivers/usb/gadget/arcotg_udc.c), and try to reset USB function after resuming, but it does not work.

We don't have idea to figure out the situation. 

Could you provide us some suggestions? How to enable USBCTRL function? Or how to re-init USBCTRL function after suspend?

Thank you.

Outcomes