aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/dwc3-pci.c
AgeCommit message (Collapse)AuthorFilesLines
2015-11-16usb: dwc3: pci: add support for Intel Broxton SOCHeikki Krogerus1-0/+4
PCI IDs for Broxton based platforms. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-10-09usb: dwc3: pci: Set enblslpm quirk for Synopsys platformsJohn Youn1-0/+1
Certain Synopsys prototyping PHY boards are not able to meet timings constraints for LPM. This allows the PHY to meet those timings by leaving the PHY clock running during suspend. Cc: <[email protected]> # v3.18+ Signed-off-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-10-09usb: dwc3: pci: Add platform data for Synopsys HAPSJohn Youn1-0/+15
Add platform data and set usb3_lpm_capable and has_lpm_erratum. Cc: <[email protected]> # v3.18+ Signed-off-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-10-09usb: dwc3: pci: trivial: FormattingJohn Youn1-8/+8
Fix the alignment of the PCI device definitions. Also change the hex digit capitalization of one constant to make it consistent with the rest of the file and driver. Signed-off-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-10-09usb: dwc3: pci: Add the PCI Product ID for Synopsys USB 3.1John Youn1-0/+5
This adds the PCI product ID for the Synopsys USB 3.1 IP core (DWC_usb31) on a HAPS-based PCI development platform. Cc: <[email protected]> # v3.18+ Signed-off-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-10-09usb: dwc3: pci: Add the Synopsys HAPS AXI Product IDJohn Youn1-0/+5
This ID is for the Synopsys DWC_usb3 core with AXI interface on PCIe HAPS platform. This core has the debug registers mapped at a separate BAR in order to support enhanced hibernation. Cc: <[email protected]> # v3.18+ Signed-off-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-09-27usb: dwc3: pci: passing forward the ACPI companionHeikki Krogerus1-0/+1
Sharing the ACPI companion with dwc3 core so it has access to the properties defined for DWC3 in ACPI tables. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-07-29usb: dwc3: pci: make better use of gpiod APIUwe Kleine-König1-10/+16
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Use this additional parameter and the _optional variant to simplify the driver and improve error handling. Also expand the comment to explain why it's not sensible to switch to devm_gpiod_get and why the gpiod_put is also necessary. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Tested-by: Heikki Krogerus <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-05-13usb: dwc3: pci: add quirk for BaytrailsHeikki Krogerus1-0/+36
On some BYT platforms the USB2 PHY needs to be put into operational mode by the controller driver with GPIOs controlling the PHYs reset and cs signals. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-10usb: move definition of PCI_VENDOR_ID_SYNOPSYS to linux/pci_ids.hJoseph Kogut1-2/+0
Removed FIXME from usb/dwc3/dwc3-pci.c by moving definition of PCI_VENDOR_ID_SYNOPSYS shared with usb/dwc2 to linux/pci_ids.h. Signed-off-by: Joseph Kogut <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-01-19Merge tag 'v3.19-rc5' into nextFelipe Balbi1-0/+4
Linux 3.19-rc5 Conflicts: drivers/usb/dwc2/gadget.c drivers/usb/gadget/udc/bdc/bdc_ep.c
2015-01-15usb: dwc3: pci: code cleanupHeikki Krogerus1-54/+42
Removing a few items that are not needed anymore and adding separate function for quirks. Acked-by: Huang Rui <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-01-15usb: dwc3: pci: rely on default PM callbacks from PCI driver utilityHeikki Krogerus1-34/+0
There is nothing specific being done in the suspend and resume callbacks that is not already taken care of in PCI driver core, so dropping the functions. Acked-by: Huang Rui <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-01-15usb: dwc3: pci: remove registration of NOP PHYsHeikki Krogerus1-68/+0
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 <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2014-12-22usb: dwc3: pci: add support for Intel Sunrise Point PCHHeikki Krogerus1-0/+4
Add PCI IDs for Intel Sunrise Point PCH. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2014-11-03usb: dwc3: add support for AMD Nolan platformHuang Rui1-0/+26
This patch adds support for AMD Nolan (NL) FPGA and SoC platform. Cc: Jason Chang <[email protected]> Signed-off-by: Huang Rui <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2014-11-03usb: dwc3: initialize platform data at pci glue layerHuang Rui1-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 <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2014-10-20usb: dwc3: pci: Add PCI ID for Intel BraswellAlan Cox1-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 <[email protected]> Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2014-08-20usb: dwc3: remove unnecessary OOM messagesJingoo Han1-3/+1
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2014-05-15usb: dwc3: convert to pcim_enable_device()Andy Shevchenko1-8/+3
This fixes a bug when dwc3_pci_register_phys() fails and leaves device enabled. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2014-05-15usb: dwc3: no need to initialize ret variableAndy Shevchenko1-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 <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2014-04-21usb: phy: rename <linux/usb/usb_phy_gen_xceiv.h> to ↵Felipe Balbi1-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 <[email protected]>
2014-04-21usb: phy: rename usb_nop_xceiv to usb_phy_genericFelipe Balbi1-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 <[email protected]>
2013-12-19usb: dwc3: fix the glue drivers using the nop phyHeikki Krogerus1-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: <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-12-06usb: dwc3: pci: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han1-1/+1
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-09-29Merge 3.12-rc3 into usb-nextGreg Kroah-Hartman1-0/+2
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-26usb: dwc3: add support for MerrifieldDavid Cohen1-0/+2
Add PCI id for Intel Merrifield Signed-off-by: David Cohen <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-25usb: dwc3: Remove redundant pci_set_drvdataSachin Kamat1-2/+0
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-17usb: dwc3: pci: add support for BayTrailHeikki Krogerus1-0/+2
Add PCI id for Intel BayTrail. Signed-off-by: Heikki Krogerus <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-08-09Merge branch 'nop-phy-rename' into nextFelipe Balbi1-4/+4
Signed-off-by: Felipe Balbi <[email protected]> Conflicts: drivers/usb/phy/phy-generic.c
2013-08-09usb: phy: rename nop_usb_xceiv => usb_phy_gen_xceivSebastian Andrzej Siewior1-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 <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-08-02usb: dwc3: pci: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han1-7/+3
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 <[email protected]> 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-12Merge tag 'usb-for-v3.11' of ↵Greg Kroah-Hartman1-1/+0
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 <[email protected]>
2013-06-01usb: dwc3: remove redundant D0 power state setYijing Wang1-1/+0
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 <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-05-28usb: dwc3: pci: PHY should be deleted later than dwc3 corePeter Chen1-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 <[email protected]> Cc: <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-03-18usb: dwc3: pci: add basic suspend/resume supportFelipe Balbi1-0/+38
this patch adds basic PM support for the PCI glue layer. 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]>
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: pci: add nop transceiver supportFelipe Balbi1-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 <[email protected]>
2012-03-20Merge tag 'usb-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbLinus Torvalds1-27/+26
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() ...
2012-03-13usb: dwc3: pci: fix another failure path in dwc3_pci_probe()Felipe Balbi1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-03-02usb: dwc3: pci: fix failure path in dwc3_pci_probe()Paul Zimmerman1-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 <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-03-02usb: dwc3: clean up whitespace damage, typos, missing parens, etc.Paul Zimmerman1-2/+2
trivial patch, no functional changes Signed-off-by: Paul Zimmerman <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2012-03-02usb: dwc3: use devm_xxx functionsChanho Park1-25/+21
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-09DWC3: use module_pci_driverGreg Kroah-Hartman1-11/+1
This cuts down on the boilerplate code. Cc: Lars-Peter Clausen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-01-04drivers/usb/dwc3/dwc3-pci.c: introduce missing kfreeJulia Lawall1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>