summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/dwc3-pci.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | usb: dwc3: pci: remove registration of NOP PHYsHeikki Krogerus2015-01-151-68/+0Star
|/ | | | | | | | | | None of the PCI platforms need the NOP transceivers, and since we can now live without the PHYs, removing registration of the platform devices for them. Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add support for AMD Nolan platformHuang Rui2014-11-031-0/+26
| | | | | | | | This patch adds support for AMD Nolan (NL) FPGA and SoC platform. Cc: Jason Chang <jason.chang@amd.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: initialize platform data at pci glue layerHuang Rui2014-11-031-0/+9
| | | | | | | | | This patch initializes platform data at pci glue layer, and SoCs x86-based platform vendor is able to define their flags in platform data at bus glue layer. Then do some independent behaviors at dwc3 core level. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: pci: Add PCI ID for Intel BraswellAlan Cox2014-10-201-0/+2
| | | | | | | | | | The device controller is the same but it has different PCI ID. Add this new ID to the driver's list of supported IDs. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: remove unnecessary OOM messagesJingoo Han2014-08-201-3/+1Star
| | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: convert to pcim_enable_device()Andy Shevchenko2014-05-151-8/+3Star
| | | | | | | This fixes a bug when dwc3_pci_register_phys() fails and leaves device enabled. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: no need to initialize ret variableAndy Shevchenko2014-05-151-1/+1
| | | | | | | | First usage of ret variable will re-write initial value. Thus, there is no need to initialize it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: rename <linux/usb/usb_phy_gen_xceiv.h> to ↵Felipe Balbi2014-04-211-1/+1
| | | | | | | | | | <linux/usb/usb_phy_generic.h> now that all functions match the driver name, the only missing piece is to rename the header file itself. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: rename usb_nop_xceiv to usb_phy_genericFelipe Balbi2014-04-211-3/+3
| | | | | | | | no functional changes, just renaming the function in order to make it slightly clearer what it should be used for, also matching the driver name. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: fix the glue drivers using the nop phyHeikki Krogerus2013-12-191-0/+1
| | | | | | | | | | | | | The reset_gpio member of the usb_phy_gen_xceiv_platform_data structure needs the have negative value or phy-generic's probe will fail unless DT is used. 0 is a valid gpio number. This fixes an issue where phy-generic fails to probe with message: "usb_phy_gen_xceiv.0: Error requesting RESET GPIO 0". Cc: <stable@vger.kernel.org> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: pci: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han2013-12-061-1/+1
| | | | | | | | Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge 3.12-rc3 into usb-nextGreg Kroah-Hartman2013-09-301-0/+2
|\ | | | | | | | | | | We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc3: add support for MerrifieldDavid Cohen2013-09-271-0/+2
| | | | | | | | | | | | | | | | Add PCI id for Intel Merrifield Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | usb: dwc3: Remove redundant pci_set_drvdataSachin Kamat2013-09-261-2/+0Star
|/ | | | | | | Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc3: pci: add support for BayTrailHeikki Krogerus2013-09-171-0/+2
| | | | | | | Add PCI id for Intel BayTrail. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge branch 'nop-phy-rename' into nextFelipe Balbi2013-08-091-4/+4
|\ | | | | | | | | | | | | Signed-off-by: Felipe Balbi <balbi@ti.com> Conflicts: drivers/usb/phy/phy-generic.c
| * usb: phy: rename nop_usb_xceiv => usb_phy_gen_xceivSebastian Andrzej Siewior2013-08-091-4/+4
| | | | | | | | | | | | | | | | | | | | The "nop" driver isn't a do-nothing-stub but supports a couple functions like clock on/off or is able to use a voltage regulator. This patch simply renames the driver to "generic" since it is easy possible to extend it by a simple function istead of writing a complete driver. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: pci: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han2013-08-021-7/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/dwc3-pci.c:215:12: warning: 'dwc3_pci_suspend' defined but not used [-Wunused-function] drivers/usb/dwc3/dwc3-pci.c:224:12: warning: 'dwc3_pci_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: switch to GPL v2 onlyFelipe Balbi2013-07-291-28/+8Star
|/ | | | | | | | | | | | | | | | 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 <av.tikhomirov@samsung.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge tag 'usb-for-v3.11' of ↵Greg Kroah-Hartman2013-06-121-1/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v3.11 merge window All function drivers are now converted to our new configfs-based binding. Eventually this will help us getting rid of in-kernel gadget drivers and only keep function drivers in the kernel. MUSB was taught that it needs to be built for host-only and device-only modes too. We had this support long ago but it involved a ridiculous amount of ifdefs. Now we have a much cleaner approach. Samsung Exynos4 platform now implements HSIC support. We're introducing support for AB8540 and AB9540 PHYs. MUSB module reinsertion now works as expected, before we were getting -EBUSY being returned by the resource checks done on driver core. DWC3 now has minimum support for TI's AM437x series of SoCs. OMAP5 USB3 PHY learned one extra DPLL configuration values because that PHY is reused in TI's DRA7xx devices. We're introducing support for Faraday fotg210 UDCs. Last, but not least, the usual set of non-critical fixes and cleanups ranging from usage of platform_{get,set}_drvdata to lock improvements. Signed-of-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: remove redundant D0 power state setYijing Wang2013-05-311-1/+0Star
| | | | | | | | | | | | | | | | Pci_enable_device() will set device power state to D0, so it's no need to do it again in dwc3_pci_probe(). Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: pci: PHY should be deleted later than dwc3 corePeter Chen2013-05-281-1/+1
|/ | | | | | | | | | | | | | | | If the glue layer is removed first (core layer later), it deletes the phy device first, then the core device. But at core's removal, it still uses PHY's resources, it may cause kernel's oops. It is much like the problem Paul Zimmerman reported at: http://marc.info/?l=linux-usb&m=136547502011472&w=2. Besides, it is reasonable the PHY is deleted at last as the controller is the PHY's user. Signed-off-by: Peter Chen <peter.chen@freescale.com> Cc: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: pci: add basic suspend/resume supportFelipe Balbi2013-03-181-0/+38
| | | | | | | this patch adds basic PM support for the PCI glue layer. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: glue layers shouldn't know about the core IPFelipe Balbi2013-03-041-2/+0Star
| | | | | | | | 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 <balbi@ti.com>
* usb: remove use of __devexitBill Pemberton2012-11-211-1/+1
| | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: remove use of __devinitBill Pemberton2012-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Geoff Levand <geoff@infradead.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Olav Kongas <ok@artecdesign.ee> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: remove use of __devexit_pBill Pemberton2012-11-211-1/+1
| | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc3: remove custom unique id handlingSebastian Andrzej Siewior2012-10-311-14/+2Star
| | | | | | | | | | 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 <av.tikhomirov@samsung.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: pci: add nop transceiver supportFelipe Balbi2012-09-101-0/+67
| | | | | | | | | | | 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. Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbLinus Torvalds2012-03-201-27/+26Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull USB merge for 3.4-rc1 from Greg KH: "Here's the big USB merge for the 3.4-rc1 merge window. Lots of gadget driver reworks here, driver updates, xhci changes, some new drivers added, usb-serial core reworking to fix some bugs, and other various minor things. There are some patches touching arch code, but they have all been acked by the various arch maintainers." * tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (302 commits) net: qmi_wwan: add support for ZTE MF820D USB: option: add ZTE MF820D usb: gadget: f_fs: Remove lock is held before freeing checks USB: option: make interface blacklist work again usb/ub: deprecate & schedule for removal the "Low Performance USB Block" driver USB: ohci-pxa27x: add clk_prepare/clk_unprepare calls USB: use generic platform driver on ath79 USB: EHCI: Add a generic platform device driver USB: OHCI: Add a generic platform device driver USB: ftdi_sio: new PID: LUMEL PD12 USB: ftdi_sio: add support for FT-X series devices USB: serial: mos7840: Fixed MCS7820 device attach problem usb: Don't make USB_ARCH_HAS_{XHCI,OHCI,EHCI} depend on USB_SUPPORT. usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH USB: ohci-nxp: Remove i2c_write(), use smbus USB: ohci-nxp: Support for LPC32xx USB: ohci-nxp: Rename symbols from pnx4008 to nxp USB: OHCI-HCD: Rename ohci-pnx4008 to ohci-nxp usb: gadget: Kconfig: fix typo for 'different' usb: dwc3: pci: fix another failure path in dwc3_pci_probe() ...
| * usb: dwc3: pci: fix another failure path in dwc3_pci_probe()Felipe Balbi2012-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | When applying commit 7d26b58 (fix failure path in dwc3_pci_probe()), I mistakenly left out one of the possible failures where we would return success even on the error case. This patch fixes that mistake. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: dwc3: pci: fix failure path in dwc3_pci_probe()Paul Zimmerman2012-03-021-1/+3
| | | | | | | | | | | | | | | | dwc3_pci_probe() would return success even if the calls to dwc3_get_device_id() or platform_device_alloc() fail, fix that. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: clean up whitespace damage, typos, missing parens, etc.Paul Zimmerman2012-03-021-2/+2
| | | | | | | | | | | | | | trivial patch, no functional changes Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: use devm_xxx functionsChanho Park2012-03-021-25/+21Star
| | | | | | | | | | | | | | | | | | | | | | 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 <chanho61.park@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | DWC3: use module_pci_driverGreg Kroah-Hartman2012-02-091-11/+1Star
|/ | | | | | | | | This cuts down on the boilerplate code. Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/usb/dwc3/dwc3-pci.c: introduce missing kfreeJulia Lawall2012-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Glue needs to be freed on exiting the function in an error case. Furthermore, pci, which is the first argument to the probe function should not be freed before leaveing the function, as it is reused at the call site. So the free of pci is changed to free glue instead. A simplified version of the semantic match that finds the problem is as follows: (http://coccinelle.lip6.fr) // <smpl> @r exists@ local idexpression x; statement S; identifier f1; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } x->f1 ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: move dwc3 device ID bitmap to core.cFelipe Balbi2011-12-121-40/+5Star
| | | | | | | | | | | | | if we want to support situations where we have both SoC and PCIe versions of the IP on the same platform, we need to have sequential numbers between them, otherwise we will still have name collisions. Because of that, we need to move dwc3_get/put_device_id() to core.c and export that symbol to be used by glue layers. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: fetch mode of operation from HWFelipe Balbi2011-12-121-2/+2
| | | | | | | | | | 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 <balbi@ti.com>
* usb: dwc: remove "All rights reserved" statement.Sebastian Andrzej Siewior2011-10-041-1/+0Star
| | | | | | | | | | 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 <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: include module.h in the DesignWare USB3 DRD driverStephen Rothwell2011-08-231-0/+1
| | | | | | | | | | | Fixes this build error: drivers/usb/dwc3/dwc3-pci.c: In function 'dwc3_pci_init': drivers/usb/dwc3/dwc3-pci.c:211:9: error: 'THIS_MODULE' undeclared (first use in this function) Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: Introduce DesignWare USB3 DRD DriverFelipe Balbi2011-08-231-0/+219
The DesignWare USB3 is a highly configurable IP Core which can be instantiated as Dual-Role Device (DRD), Peripheral Only and Host Only (XHCI) configurations. Several other parameters can be configured like amount of FIFO space, amount of TX and RX endpoints, amount of Host Interrupters, etc. The current driver has been validated with a virtual model of version 1.73a of that core and with an FPGA burned with version 1.83a of the DRD core. We have support for PCIe bus, which is used on FPGA prototyping, and for the OMAP5, more adaptation (or glue) layers can be easily added and the driver is half prepared to handle any possible configuration the HW engineer has chosen considering we have the information on one of the GHWPARAMS registers to do runtime checking of certain features. More runtime checks can, and should, be added in order to make this driver even more flexible with regards to number of endpoints, FIFO sizes, transfer types, etc. While this supports only the device side, for now, we will add support for Host side (xHCI - see the updated series Sebastian has sent [1]) and OTG after we have it all stabilized. [1] http://marc.info/?l=linux-usb&m=131341992020339&w=2 Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>