summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx5/usb_dr.c
AgeCommit message (Collapse)Author
2012-02-27mx5: Only register OTG wakeup devices if USB OTG is configured.Alex Gonzalez
Otherwise, even when CONFIG_USB is disabled, the wake up devices are registered and this could cause problems. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2011-10-27mx5-usb: return a valid wakeup event code when OWIR not signaledHector Palacios
If the USB OTG cable is connected together with a USB disk while the target is suspended, an interrupt takes place when the system is resumed, but the OWIR (OTG wake up interrupt request) flag is not set, so an invalid code is returned and the system enters and endless loop where the interrupt is set but never cleared. For this special case, we will return a valid ID change code. The result is that the USB disk interrupt is not recognized (and the disk not mounted) but the target is able to wake from sleep. Disconnecting and connecting the USB disk again makes the system detect the disk again. This works around 40541. Signed-off-by: Hector Palacios <hector.palacios@digi.com> (cherry picked from commit dc7c2eefca7d2c819902d634d7e105f6922a5833)
2011-08-01ccwmx51: USB OTG, several fixes related to host and device wake up.Alex Gonzalez
With this fixes the USB OTG is working both for the host and the device roles. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2011-08-01ENGR00140710-1 usb-device: add more device wakeup modesPeter Chen
Following usb device wakeup modes is supported are added: -vbus failing wakeup: it happens when our SoC suspend and host's vbus failing (after host(pc) suspends 10 seconds later) -device receives reset wakeup: it happens follow below steps: --Find MSC device at pc for soc --Right-click -> Disable (this will suspend the device) --let soc go to suspend --Right-click -> Enable (this will reset the device) -device receives resume signal from pc: it can be tested by pc HSET tools Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2011-02-03ENGR00137927-2 mx5x_msl_usb: re-organize the platform data for device and hostPeter Chen
To fix the compile error for device only function for OTG port. Add macro to differetiate the host and device function. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2011-02-03ENGR00137872-2 mx5x_msl: move wakeup handle from driver to MSLPeter Chen
Move mx5x usb wakeup interrupt handler from the driver to MSL Signed-off-by: Peter Chen <peter.chen@freescale.com>
2011-02-03ENGR00137317-1 USB MSL: handle non-intent wakeup irq triggered by PHCD changeZhang Yan
PORTSC PHCD will be changed while system shuts down usb host. This triggers wake-up interrupt. But it's not host wake-up or device wake-up. OWIR bit in USBCTRL doesn't be cleared. It keeps bring interrupt on. So - Clear OWIR bit in wakeup ISR if host/device doesn't need to wake up. - Close wakeup irq before shut down USB host. Signed-off-by: Zhang Yan <b34916@freescale.com>
2011-01-25[ccwmx51]: Fix compilation issues.Alejandro Gonzalez
After the manual merge of the Digi patches for the MX51 platform, resolve the compilation errors, warning and mistakes. Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
2011-01-21Add USB OTG supportAlejandro Gonzalez
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
2011-01-20ccwmx51: Fix compilation issues after applying Freescale patchesAlejandro Gonzalez
The mach-mx5 folder has been replaced by mach-mx5 to enable the addition of more platforms. Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
2011-01-17ENGR00134154-2 MSL: add sync between usb resume and usb wakeup thread for MX5xPeter Chen
The usb wakeup thread should be prior to usb system resume during usb wakeup process. It adds wait_event_interruptible at usb resume process, and the usb wakeup irq will set event, and the usb wakeup thread will clear event. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2011-01-17ENGR00133702-1 usb host1: Add usb host1 low power and wakeup support for mx28Peter Chen
MSL part Add usb low power and wakeup support for mx28 usb1, in that means, when the usb h1 is not in used, the host1 will close usb core and phy's clock. When an usb activity happens, the usb can be wakeup from low power mode. Meanwhile, the usb host1 can also be system wakeup source through sys entry like other platforms. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2011-01-17ENGR00133478-1 IMX USB:move clk_enable from irq context to thread contextHu hui
MSL Part move the usb clk_enable from irq context to a kernel thread context, so that the voltage can be changed in clk_enable function. Signed-off-by: Hu Hui <b29976@freescale.com>
2011-01-17ENGR00132894 usb: clk_get should not be called at IRQ contextPeter Chen
The old implementation will clk_get/clk_put for each clk on/off operation. As some clk on/off operation would be IRQ context. So, it will ocurr the error like "schedule at atomic context". The new implementation will only call clk_get at usb initialization, and clk_put at usb de-initialization. The driver's clock on/off will only call clk_enable/clk_disable. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2011-01-17ENGR00132073-1 usb: wakeup capability should be controlled by userPeter Chen
MSL part The usb wakeup system capability should be controlled by user, For example, the users don't expect wakeup system at below situations: 1. When they plug in Micro B line, maybe the users just want to charge from PC 2. Plug in a usb device, such as usb camera or usb 3G moden The wakeup capability can be controlled by sys interface 1. At otg mode: echo enabled > /sys/devices/platform/fsl-usb2-otg/power/wakeup 2. At non-otg mode: device mode: echo enabled > /sys/devices/platform/fsl-usb2-otg/power/wakeup host mode echo enabled > /sys/devices/platform/fsl-ehci.x/power/wakeup x is the usb port num (from 0 to n-1) NOTE: The user must load one gadget module if he wants to usb otg wakeup function. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2011-01-17ENGR00131616-1 usb: restructure lower power mode and wakeup functionPeter Chen
MSL part (squashed with ENGR00131775) Mainly includes restruct low power mode and wakeup function for all usb modes. 1. Move more kernel common code changes to fsl driver. 2. Fix kinds of otg bugs 3. At idle mode all usb clock and related phy clock will be closed. 4. Wakeup function are fully verified for all usb modes (device, host and otg mode) 5. The modifications are verified at mx50 platform at 2.6.35 6. utmirc.c should also be enabled for non-host mode, otherwise, there will be a null pointer error. Signed-off-by: Hu Hui <b29976@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
2011-01-17ENGR00126692-2: MX5X: Upgrade kernel to 2.6.35Dinh Nguyen
This patch contains changes to mach-mx5 files. Contains all checkpatch and copyright fixes. Acked-by: Rob Herring <r.herring@freescale.com> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>