aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/dwc3-omap.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-03Merge tag 'char-misc-3.12-rc1' of ↵Linus Torvalds1-19/+106
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc patches from Greg KH: "Here is the big char/misc driver pull request for 3.12-rc1 Lots of driver updates all over the char/misc tree, full details in the shortlog" * tag 'char-misc-3.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (62 commits) drivers: uio: Kconfig: add MMU dependancy for UIO drivers: uio: Add driver for Humusoft MF624 DAQ PCI card drivers: uio_pdrv_genirq: use dev_get_platdata() drivers: uio_pruss: use dev_get_platdata() drivers: uio_dmem_genirq: use dev_get_platdata() drivers: parport: Kconfig: exclude h8300 for PARPORT_PC drivers: misc: ti-st: fix potential race if st_kim_start fails Drivers: hv: vmbus: Do not attempt to negoatiate a new version prematurely misc: vmw_balloon: Remove braces to fix build for clang. Drivers: hv: vmbus: Fix a bug in the handling of channel offers vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq() VMCI: Add support for virtual IOMMU VMCI: Remove non-blocking/pinned queuepair support uio: uio_pruss: remove unnecessary platform_set_drvdata() parport: amiga: remove unnecessary platform_set_drvdata() vme: vme_vmivme7805.c: add missing __iomem annotation vme: vme_ca91cx42.c: add missing __iomem annotation vme: vme_tsi148.c: add missing __iomem annotation drivers/misc/hpilo: Correct panic when an AUX iLO is detected uio: drop unused vma_count member in uio_device struct ...
2013-08-05usb: dwc3: use extcon fwrk to receive connect/disconnectKishon Vijay Abraham I1-19/+106
Modified dwc3-omap to receive connect and disconnect notification using extcon framework. Also did the necessary cleanups required after adapting to extcon framework. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
2013-07-29usb: dwc3: omap: switch over to devm_ioremap_resource()Felipe Balbi1-5/+3
use the new devm_ioremap_resource on dwc3-omap.c Signed-off-by: Felipe Balbi <[email protected]>
2013-07-29usb: dwc3: switch to GPL v2 onlyFelipe Balbi1-28/+8
This is a Linux-only driver which makes use of GPL-only symbols. It makes no sense to maintain Dual BSD/GPL licensing for this driver. Considering that the amount of work to use this driver in any different operating system would likely be as large as developing the driver from scratch and considering that we depend on GPL-only symbols, we will switch over to a GPL v2-only license. Cc: Anton Tikhomirov <[email protected]> Acked-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-06-12usb: dwc3: omap: Adds dwc3_omap_readl/writel wrappersGeorge Cherian1-57/+116
This patch adds wrappers to dwc3_omap_readl/writel calls to accomodate both OMAP5 and AM437x reg maps (It uses the cached register offsets). Also renames OMAP5 IRQ1 as IRQMISC and IRQ1 bits as IRQMISC bits. Signed-off-by: George Cherian <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-06-12usb: dwc3: omap: initialize the register offset values for omap5 and AM437xGeorge Cherian1-0/+57
This patch Initializes the register offset values depending on the X_MAJOR of USBOTGSS_REVISION register. Also adds register offset defines and new debug register defines. X_MAJOR is 2 for both OMAP5 and AM437x. But both have different glue register layout. Differentiate AM437x using dt compatible. Register offsets are cached in dwc3_omap struct for reg reads and writes. Signed-off-by: George Cherian <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-06-12usb: dwc3: omap: Adding am437x specific register map changesGeorge Cherian1-0/+6
AM437x and OMAP5 dwc3 subsytem have different register map. Major differences are as follows. OMAP5 has one main interrupt and one misc interrupt Aegis has four main interrupts and one misc interrupt. Miscellanous Interrupt offsets are changed. UTMI OTG Control and Status Registers offsets are changed. DEBUG Configuration and Status Registers are changed. The main intend of the patch is to re-use the same wrapper driver for both OMAP5 and AM437x, by using the x_major in revision register and adjusting the offsets. This patch adds the register map offsets and adds offset variables in struct dwc3_omap to cache the offsets Signed-off-by: George Cherian <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-06-12usb: dwc3: omap: improve error handling of dwc3_omap_probeKishon Vijay Abraham I1-3/+14
Improved the error handling of dwc3_omap_probe so that on error conditions dwc3_omap is left in the original state. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-04-02usb: dwc3: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han1-2/+2
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. Unnecessary CONFIG_PM ifdefs are removed. drivers/usb/dwc3/core.c:682:12: warning: 'dwc3_suspend' defined but not used [-Wunused-function] drivers/usb/dwc3/core.c:709:12: warning: 'dwc3_resume' defined but not used [-Wunused-function] drivers/usb/dwc3/dwc3-omap.c:430:12: warning: 'dwc3_omap_suspend' defined but not used [-Wunused-function] drivers/usb/dwc3/dwc3-omap.c:440:12: warning: 'dwc3_omap_resume' defined but not used [-Wunused-function] drivers/usb/dwc3/dwc3-exynos.c:185:12: warning: 'dwc3_exynos_suspend' defined but not used [-Wunused-function] drivers/usb/dwc3/dwc3-exynos.c:194:12: warning: 'dwc3_exynos_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: omap: fix sparse warningFelipe Balbi1-1/+1
our global '_omap' pointer wasn't marked static. This patch solves the following sparse warning: warning: symbol '_omap' was not declared. \ Should it be static? Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: dwc3-omap: return -EPROBE_DEFER if probe has not yet executedKishon Vijay Abraham I1-2/+5
return -EPROBE_DEFER from dwc3_omap_mailbox in dwc3-omap.c, if the probe of dwc3-omap has not yet been executed or failed. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: set dma_mask for dwc3_omap deviceKishon Vijay Abraham I1-0/+3
*dma_mask* is not set for devices created from dt data. So filled dma_mask for dwc3_omap device here. And dwc3 core will copy the dma_mask from its parent. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: omap: add basic suspend/resume supportFelipe Balbi1-0/+56
this patch implements basic suspend/resume functionality for the OMAP glue layer. Tested-by: Vivek Gautam <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: omap: remove unused fields from private structureFelipe Balbi1-12/+0
we're not using those fields of the structure, might as well remove them. Tested-by: Vivek Gautam <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: omap: introduce enable/disable IRQ methodsFelipe Balbi1-15/+32
they will be re-used on suspend/resume implementation. Tested-by: Vivek Gautam <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: omap: stop using nop-usb-xceivKishon Vijay Abraham I1-67/+0
Now that we have drivers for omap-usb2 phy and omap-usb3 phy, stop using nop-usb-xceiv. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: omap: remove platform data associated with dwc3-omapKishon Vijay Abraham I1-14/+10
omap5 is not going to have support for non-dt boot making the platform data associated with dwc3 useless. Removed it here. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: omap: minor fixes to get dt workingKishon Vijay Abraham I1-24/+21
Includes few minor fixes in dwc3-omap like populating the compatible string in a correct way, extracting the utmi-mode property properly and changing the index of get_irq since irq of core is removed from hwmod entry. Also updated the documentation with dwc3-omap device tree binding information. Signed-off-by: Kishon Vijay Abraham I <[email protected]> [ [email protected] : fix a compile warning introduced by this commit ] Signed-off-by: Felipe Balbi <[email protected]>
2013-03-04usb: dwc3: glue layers shouldn't know about the core IPFelipe Balbi1-2/+0
remove inclusion of "core.h" from all glue layers as they don't need to know details about the core IP. Signed-off-by: Felipe Balbi <[email protected]>
2013-03-04usb: dwc3: omap: fix a typo on of_device_idFelipe Balbi1-3/+3
s/matach/match No functional changes Signed-off-by: Felipe Balbi <[email protected]>
2013-01-25usb: dwc3: exynos/omap: Change platform device IDs for no_op_xceive to AUTOVivek Gautam1-2/+2
Multiple dwc3 probe calls try to allocate no_op_xceive platform device. Having static IDs for these will throw sysfs error -EEXIST. Changing these static platform device IDs to AUTO to enable multiple dwc3 controller support on a SoC. Signed-off-by: Vivek Gautam <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-01-25usb: dwc3: omap: Add an API to write to dwc mailboxKishon Vijay Abraham I1-0/+60
Add an API in the omap glue layer to write to the mailbox register which can be used by comparator driver(twl). To pass the detection of the attached device (signified by VBUS, ID) to the dwc3 core, dwc3 core has to write to the mailbox regiter. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-01-25usb: dwc3: omap: Remove explicit writes to SYSCONFIG registerKishon Vijay Abraham I1-26/+0
The runtime API's takes care of setting the SYSCONFIG register with appropriate values. Hence explicit writes to SYSCONFIG register is removed. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-01-25usb: dwc3: omap: use runtime API's to enable clocksKishon Vijay Abraham I1-0/+10
Before accessing any register, runtime API's should be invoked to enable the clocks. runtime API's are added here to prevent abort during register access. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-01-25usb: dwc3: omap: use of_platform API to create dwc3 core pdevKishon Vijay Abraham I1-30/+10
Used of_platform_populate() to create dwc3 core platform_device from device tree data. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-01-25usb: dwc3: omap: use device_for_each_child to handle child removalKishon Vijay Abraham I1-1/+11
Used device_for_each_child() to handle child device (dwc3 core) removal during devexit of dwc3 omap. This is in preparation for creating the child devices from subnode of dwc3 omap glue using of_platform_populate. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-11-21usb: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Peter Korsgaard <[email protected]> Cc: Alexander Shishkin <[email protected]> Acked-by: Felipe Balbi <[email protected]> Cc: Li Yang <[email protected]> Cc: Alan Stern <[email protected]> Cc: Wan ZongShun <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Kukjin Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21usb: remove use of __devinitBill Pemberton1-2/+2
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Peter Korsgaard <[email protected]> Cc: Alexander Shishkin <[email protected]> Acked-by: Felipe Balbi <[email protected]> Cc: Li Yang <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: Geoff Levand <[email protected]> Cc: Wan ZongShun <[email protected]> Cc: Olav Kongas <[email protected]> Cc: Lennert Buytenhek <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Kukjin Kim <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21usb: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Peter Korsgaard <[email protected]> Cc: Alexander Shishkin <[email protected]> Acked-by: Felipe Balbi <[email protected]> Cc: Li Yang <[email protected]> Cc: Alan Stern <[email protected]> Cc: Wan ZongShun <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Kukjin Kim <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Acked-by: Peter Korsgaard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-31usb: dwc3: remove custom unique id handlingSebastian Andrzej Siewior1-14/+2
The lockless implementation of the unique id is quite impressive (:P) but dirver's core can handle it, we can remove it and make our code a little smaller. Cc: Anton Tikhomirov <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-09-10usb: dwc3: omap: add nop transceiver supportFelipe Balbi1-0/+66
We will be adding support for transceivers on dwc3 driver but not all boards have controllable transceivers. For those which don't provide controllable transceivers we will register nop transceivers. Note that once OMAP's transceiver drivers reach mainline, this glue layer will change accordingly. Signed-off-by: Felipe Balbi <[email protected]>
2012-04-24usb: dwc3: omap: add dwc3_omap_readl/writel functionsIdo Shayevitz1-11/+21
We separate between dwc3-omap helper functions to dwc3-core helper functions. This will allow us to change the helper functions implementation according to each module need. Signed-off-by: Ido Shayevitz <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-03-02usb: dwc3: linux/module.h included twiceDanny Kukawka1-1/+0
drivers/usb/dwc3/core.c and drivers/usb/dwc3/dwc3-omap.c included 'linux/module.h' twice, remove the duplicates. Signed-off-by: Danny Kukawka <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-03-02usb: dwc3: use devm_xxx functionsChanho Park1-52/+33
This patch enables to use devm_xxx functions during probing driver. The devm_xxx series functions are able to release resource when the driver is detatched. We can remove several codes to release resources in the probe function. Signed-off-by: Chanho Park <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-02-06usb: dwc3: omap: convert pdata to of propertyFelipe Balbi1-12/+22
Convert our platform_data usage to OF property, keep the legacy pdata for a while until the complete conversion is done. Signed-off-by: Felipe Balbi <[email protected]>
2011-12-12Merge branch 'for-next/dwc3' of ↵Greg Kroah-Hartman1-9/+20
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next * 'for-next/dwc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (392 commits) usb: dwc3: ep0: fix for possible early delayed_status usb: dwc3: gadget: fix stream enable bit usb: dwc3: ep0: fix GetStatus handling (again) usb: dwc3: ep0: use dwc3_request for ep0 requsts instead of usb_request usb: dwc3: use correct hwparam register for power mgm check usb: dwc3: omap: move to module_platform_driver usb: dwc3: workaround: missing disconnect event usb: dwc3: workaround: missing USB3 Reset event usb: dwc3: workaround: U1/U2 -> U0 transiton usb: dwc3: gadget: return early in dwc3_cleanup_done_reqs() usb: dwc3: ep0: handle delayed_status again usb: dwc3: ep0: push ep0state into xfernotready processing usb: dwc3: fix sparse errors usb: dwc3: fix few coding style problems usb: dwc3: move generic dwc3 code from gadget into core usb: dwc3: use a helper function for operation mode setting usb: dwc3: ep0: don't use ep0in for transfers usb: dwc3: ep0: use proper endianess in SetFeature for wIndex usb: dwc3: core: drop DWC3_EVENT_BUFFERS_MAX usb: dwc3: omap: add multiple instances support to OMAP ...
2011-12-12usb: dwc3: omap: move to module_platform_driverFelipe Balbi1-11/+1
the new module_platform_driver macro is a helper for modules which just register and unregister the platform_driver. It allows us to delete a few duplicated lines. Signed-off-by: Felipe Balbi <[email protected]>
2011-12-12usb: dwc3: omap: add multiple instances support to OMAPFelipe Balbi1-9/+19
if we ever have an omap with multiple instances of the DWC3 IP, we need unique names for them. In order to achieve that, let's use the dwc3_get/put_device_id() calls to give us an unique device identifier. Signed-off-by: Felipe Balbi <[email protected]>
2011-12-12usb: dwc3: add a platform device aliasSebastian Andrzej Siewior1-0/+1
We can have three modules here: dwc3.ko, dwc3-omap.ko and dwc3-pci.ko. The later have already ids-aliases for probing and is fine. The omap module has alias for DT but lacks alias for the "native" platform_device. Maybe we should get rid of it and stick to the DT name? Both glue modules create a new device for which the dwc3.ko module is responsible and that one lacks the platform alias. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2011-12-12usb: dwc3: fetch mode of operation from HWFelipe Balbi1-1/+1
There's no need to add driver_data for something we can fetch from HW. This also makes our id_table unnecessary - at least for now -, so we also remove it on the same patch. Signed-off-by: Felipe Balbi <[email protected]>
2011-11-28usb: convert drivers/usb/* to use module_platform_driver()Axel Lin1-12/+2
This patch converts the drivers in drivers/usb/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Felipe Balbi <[email protected]> Cc: Li Yang <[email protected]> Cc: Kuninori Morimoto <[email protected]> Cc: Sarah Sharp <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Lucas De Marchi <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Axel Lin <[email protected]> Acked-by: Peter Korsgaard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04usb: Add module.h to various dwc3 driversPaul Gortmaker1-0/+1
These files uses the full set of MODULE_ macros and so need to include module.h directly. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-10-04usb: dwc: remove "All rights reserved" statement.Sebastian Andrzej Siewior1-1/+0
Some people think that this line is not compatible with the GPL. The statement was required due to the Buenos Aires Convention and is now deprecated. I remove it because it is said that it is pointless nowdays. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-09-09usb: dwc3: omap: set idle and standby modesFelipe Balbi1-0/+24
For now, let's disable IDLE and STANDBY transitions until we have a real HW to validate against. Signed-off-by: Felipe Balbi <[email protected]>
2011-09-09usb: dwc3: omap: fix IRQ handlingFelipe Balbi1-27/+12
In order to ACK the IRQ we must write back to the same register the bits we read. Signed-off-by: Felipe Balbi <[email protected]>
2011-09-09usb: dwc3: omap: change IRQ name to dwc3-omapFelipe Balbi1-1/+1
dwc3-wrapper can be used by any other wrapper, using dwc3-omap makes it clear that we're running on OMAP SoC. Signed-off-by: Felipe Balbi <[email protected]>
2011-09-09usb: dwc3: add module.h to dwc3-omap.c and core.cFelipe Balbi1-0/+1
We need that header because of THIS_MODULE. Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2011-09-09usb: dwc3: omap: distinguish between SW and HW modesFelipe Balbi1-0/+22
The OMAP wrapper allows us to either control internal OTG signals via SW or HW. Different boards might wish to use one or the other mode of operation. Let's have have that information passed via platform_data for now. After DT conversion is finished for OMAP, we can easily convert this to a DT attribute. Signed-off-by: Felipe Balbi <[email protected]>
2011-09-09usb: dwc3: omap: drop DEV_PM_OPS for nowFelipe Balbi1-41/+0
We need to have actual HW in order to implement and test that part of the code anyway. Until then it's best to remove it. Signed-off-by: Felipe Balbi <[email protected]>
2011-09-09usb: dwc3: omap: use the macro we already haveFelipe Balbi1-1/+2
trivial patch, no functional changes. Signed-off-by: Felipe Balbi <[email protected]>