summaryrefslogtreecommitdiff
path: root/drivers/mfd/omap-usb-host.c
AgeCommit message (Collapse)Author
2012-05-01mfd: Fix build breakage in omap-usb-host.cRuss Dill
'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' removes the include for linux/gpio.h from omap-usb-host.c. This include indirectly includes plat/cpu.h which is required by omap-usb-host.c. Fix the build breakage by including it directly. Acked-by: Keshava Munegowda <keshava_mgowda@ti.com> Acked-by: Kevin Hilman <khilman@ti.com> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Russ Dill <Russ.Dill@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-04-16ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issueKeshava Munegowda
It is observed that the echi ports of 3430 sdp board are not working due to the random timing of programming the associated GPIOs of the ULPI PHYs of the EHCI for reset. If the PHYs are reset at during usbhs core driver, host ports will not work because EHCI driver is loaded after the resetting PHYs. The PHYs should be in reset state while initializing the EHCI controller. The code which does the GPIO pins associated with the PHYs are programmed to reset is moved from the USB host core driver to EHCI driver. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Reviewed-by: Partha Basak <parthab@india.ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-03-06mfd: Move omap-usb-host usbhs init before allocing child devGovindraj.R
There could be possible race condition where the host dev's are alloced and added to platform dev just before usbhs_init. Just move usbhs_init before adding child dev. CC: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-03-06mfd: Remove omap-usb-host magic numbers for dev dma maskGovindraj.R
Remove the hardcoded magic values for dma mask and use the dma mask api/macro available. Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-01-13Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (59 commits) rtc: max8925: Add function to work as wakeup source mfd: Add pm ops to max8925 mfd: Convert aat2870 to dev_pm_ops mfd: Still check other interrupts if we get a wm831x touchscreen IRQ mfd: Introduce missing kfree in 88pm860x probe routine mfd: Add S5M series configuration mfd: Add s5m series irq driver mfd: Add S5M core driver mfd: Improve mc13xxx dt binding document mfd: Fix stmpe section mismatch mfd: Fix stmpe build warning mfd: Fix STMPE I2c build failure mfd: Constify aat2870-core i2c_device_id table gpio: Add support for stmpe variant 801 mfd: Add support for stmpe variant 801 mfd: Add support for stmpe variant 610 mfd: Add support for STMPE SPI interface mfd: Separate out STMPE controller and interface specific code misc: Remove max8997-muic sysfs attributes mfd: Remove unused wm831x_irq_data_to_mask_reg() ... Fix up trivial conflict in drivers/leds/Kconfig due to addition of LEDS_MAX8997 and LEDS_TCA6507 next to each other.
2012-01-09mfd: Use gpio_request_one from omap-usb-hostAxel Lin
Use gpio_request_one() instead of multiple gpiolib calls. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-16MFD: OMAP: USB: Runtime PM supportKeshava Munegowda
The usbhs core driver does not enable/disable the interface and functional clocks directly, These clocks are handled by runtime pm, hence instead of the clock enable/disable, the runtime pm APIS are used. however,the optional clocks and port clocks are handled by the usbhs core. Dependency: This patch is dependent on this series: [PATCH 0/5 v13 or latest version] omap: usb: host: Runtime PM preparation for EHCI and OHCI drivers. Validation performed: The global suspend/resume of EHCI and OHCI is validated on OMAP3430 sdp board with this patch combined with the series: [PATCH 0/5 v13 or latest version] omap: usb: host: Runtime PM preparation for EHCI and OHCI drivers. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Reviewed-by: Partha Basak <parthab@india.ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-12-16ARM: OMAP: USB: device name change for the clk names of usbhsKeshava Munegowda
device name usbhs clocks are changed from usbhs-omap.0 to usbhs_omap; this is because in the hwmod registration the device name is set as usbhs_omap; The redudant clock nodes are removed. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Reviewed-by: Partha Basak <parthab@india.ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-09-06mfd: Fix omap-usb-host build failureMing Lei
The patch fixes the build failure: drivers/mfd/omap-usb-host.c:1034:1: warning: data definition has no type or storage class drivers/mfd/omap-usb-host.c:1034:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' drivers/mfd/omap-usb-host.c:1034:1: warning: parameter names (without types) in function declaration drivers/mfd/omap-usb-host.c:1040:1: warning: data definition has no type or storage class drivers/mfd/omap-usb-host.c:1040:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' drivers/mfd/omap-usb-host.c:1040:1: warning: parameter names (without types) in function declaration drivers/mfd/omap-usb-host.c:1045:13: error: 'THIS_MODULE' undeclared here (not in a function) drivers/mfd/omap-usb-host.c:1050:15: error: expected declaration specifiers or '...' before string constant drivers/mfd/omap-usb-host.c:1050:1: warning: data definition has no type or storage class drivers/mfd/omap-usb-host.c:1050:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/mfd/omap-usb-host.c:1050:15: warning: function declaration isn't a prototype drivers/mfd/omap-usb-host.c:1051:14: error: expected declaration specifiers or '...' before string constant drivers/mfd/omap-usb-host.c:1051:1: warning: data definition has no type or storage class drivers/mfd/omap-usb-host.c:1051:1: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS' drivers/mfd/omap-usb-host.c:1051:14: warning: function declaration isn't a prototype drivers/mfd/omap-usb-host.c:1052:16: error: expected declaration specifiers or '...' before string constant drivers/mfd/omap-usb-host.c:1052:1: warning: data definition has no type or storage class drivers/mfd/omap-usb-host.c:1052:1: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/mfd/omap-usb-host.c:1052:16: warning: function declaration isn't a prototype drivers/mfd/omap-usb-host.c:1053:20: error: expected declaration specifiers or '...' before string constant drivers/mfd/omap-usb-host.c:1053:1: warning: data definition has no type or storage class drivers/mfd/omap-usb-host.c:1053:1: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/mfd/omap-usb-host.c:1053:20: warning: function declaration isn't a prototype make[2]: *** [drivers/mfd/omap-usb-host.o] Error 1 CC fs/proc/namespaces.o make[1]: *** [drivers/mfd] Error 2 make: *** [drivers] Error 2 make: *** Waiting for unfinished jobs.... Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-09-06mfd: Make omap-usb-host TLL mode work againAnand Gadiyar
This code section seems to have been accidentally copy pasted. It causes incorrect bits to be set up in the TLL_CHANNEL_CONF register and prevents the TLL mode from working correctly. Cc: stable@kernel.org Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Keshava Munegowda <keshava_mgowda@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-31mfd: Fix the omap-usb-host clock API usage on usbhs_disable()Keshava Munegowda
usbhs_disable function was invoking clk_enable() instead of clk_disable(), thus only increasing the clock usage counter and preventing this particular clock from being ever turned off. Because of this, the power domain of omap4 the USB Host subsystem would never reach lower power states.This patch calls clk_disable() in usbhs_disable function Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-05Revert "mfd: Add omap-usbhs runtime PM support"Keshava Munegowda
This reverts commit 7e6502d577106fb5b202bbaac64c5f1b065e6daa. Oops are produced during initialization of ehci and ohci drivers. This is because the run time pm apis are used by the driver but the corresponding hwmod structures and initialization is not merged. hence revering back the commit id 7e6502d577106fb5b202bbaac64c5f1b065e6daa Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Reported-by: Luciano Coelho <coelho@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26mfd: Add omap-usbhs runtime PM supportKeshava Munegowda
The usbhs core driver does not enable/disable the interface and functional clocks; These clocks are handled by hwmod and runtime pm, hence insted of the clock enable/disable, the runtime pm APIS are used. however,the port clocks and tll clocks are handled by the usbhs core. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26mfd: Fix omap_usbhs_alloc_children error handlingAxel Lin
1. Return proper error if omap_usbhs_alloc_child fails 2. In the case of goto err_ehci, we should call platform_device_unregister(ehci) instead of platform_device_put(ehci) because we have already added the platform device to device hierarchy. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Keshava Munegowda <keshava_mgowda@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26mfd: Fix omap usbhs crash when rmmoding ehci or ohciKeshava Munegowda
The disabling of clocks and freeing GPIO are changed to fix the occurrence of the crash of rmmod of ehci and ohci drivers. The GPIOs should be freed after the spin locks are unlocked. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: stable@kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-11mfd: Fixed gpio polarity of omap-usb gpio USB-phy resetJuergen Kilb
With commit 19403165 a main part of ehci-omap.c moved to drivers/mfd/omap-usb-host.c created by commit 17cdd29d. Due to this reorganisation the polarity used to reset the external USB phy changed and USB host doesn't recognize any devices. Signed-off-by: Juergen Kilb <J.Kilb@phytec.de> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-02omap:usb: add regulator support for EHCIKeshava Munegowda
in case of ehci phy mode; regulator of phy should be enabled before initializing the usbhs core driver. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Tested-by: Steve Calfee <stevecalfee@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-05-02mfd: Fix usbhs_enable error handlingAxel Lin
In the case of missing platform_data we do not hold a spin_lock, thus we should not call spin_unlock_irqrestore in the error path. Also simplify the error handling by separating the successful path from error path. I think this change improves readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Steve Calfee <stevecalfee@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-01usb: host: omap: common usb host core driverKeshava Munegowda
enabling and disabling the common clocks for ehci and ohci is implemented. usbhs is a common parent platform driver for EHCI and OHCI driver. This driver receives the clock enable and disable requests from ehci and ohci drivers.The UHH and TLL initialization is also performed. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>