summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* usb: dwc3: set SUSPHY bit for all coresHuang Rui2014-11-031-0/+24
| | | | | | | | It is recommended to set USB3 and USB2 SUSPHY bits to '1' after the core initialization is completed above the dwc3 revision 1.94a. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add rx_detect to polling lfps quirkHuang Rui2014-11-034-0/+12
| | | | | | | | | | This patch adds RX_DETECT to Polling.LFPS control quirk, and some special platforms can configure that if it is needed. [ balbi@ti.com : added DeviceTree binding documentation ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add lfps filter quirkHuang Rui2014-11-034-0/+11
| | | | | | | | | | This patch adds LFPS filter quirk, and some special platforms can configure that if it is needed. [ balbi@ti.com : added DeviceTree binding documentation ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add delay phy power change quirkHuang Rui2014-11-034-0/+12
| | | | | | | | | | | This patch adds delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively, and some special platforms can configure that if it is needed. [ balbi@ti.com : added DeviceTree binding documentation ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add delay p1p2p3 quirkHuang Rui2014-11-034-0/+14
| | | | | | | | | | This patch adds delay P0 to P1/P2/P3 quirk for U2/U2/U3, and some special platforms can configure that if it is needed. [ balbi@ti.com : added DeviceTree binding documentation ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add request p1p2p3 quirkHuang Rui2014-11-034-0/+12
| | | | | | | | | | This patch adds request P1/P2/P3 quirk for U2/U2/U3, and some special platforms can configure that if it is needed. [ balbi@ti.com : added DeviceTree binding documentation ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add P3 in U2 SS inactive quirkHuang Rui2014-11-034-0/+28
| | | | | | | | | | This patch adds P3 in U2 SS inactive quirk, and some special platforms can configure that if it is needed. [ balbi@ti.com : added DeviceTree binding documentation ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add u2exit lfps quirkHuang Rui2014-11-034-0/+11
| | | | | | | | | | This patch adds u2exit lfps quirk, and some special platforms can configure that if it is needed. [ balbi@ti.com : added DeviceTree binding documentation ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add lpm erratum supportHuang Rui2014-11-035-10/+50
| | | | | | | | | | | | | | | | | | When parameter DWC_USB3_LPM_ERRATA_ENABLE is enabled in Andvanced Configuration of coreConsultant, it supports of xHCI BESL Errata Dated 10/19/2011 is enabled in host mode. In device mode it adds the capability to send NYET response threshold based on the BESL value received in the LPM token, and the threhold is configurable for each soc platform. This patch adds an entry that soc platform is able to define the lpm capacity with their own device tree or bus glue layer. [ balbi@ti.com : added devicetree documentation, spelled threshold completely, made sure threshold is only applied to proper core revisions. ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: add disscramble quirkHuang Rui2014-11-034-1/+20
| | | | | | | | This patch adds disscramble quirk, and it only needs to be enabled at fpga board on some vendor platforms. 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: add a flag to check if it is fpga boardHuang Rui2014-11-032-0/+11
| | | | | | | | | | | | | | | | | | | | Some chip vendor is on pre-silicon phase, which needs to use the simulation board. It should have the same product and vendor id with the true soc, but might have some minor different configurations. Below thread discussion proposes to find a method to distinguish between simulation board and soc. http://marc.info/?l=linux-usb&m=141194772206369&w=2 In Andvanced Configuration of coreConsultant, there is the parameter of DWC_USB_EN_FPGA. This bit has the function we need. And it would response as 7 bit of GHWPARAMS6 register. So it's able to check this functional bit to confirm if works on FPGA board. Reported-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: enable hibernation if to be supportedHuang Rui2014-11-031-0/+6
| | | | | | | | It enables hibernation if the function is set in coreConsultant. Suggested-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: chipidea: add support to the generic PHY frameworkAntoine Tenart2014-11-035-21/+80
| | | | | | | | | | | This patch adds support of the PHY framework for ChipIdea drivers. Changes are done in both the ChipIdea common code and in the drivers accessing the PHY. This is done by adding a new PHY member in ChipIdea's structures and by taking care of it in the code. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: allow to supply the PHY in the drivers when using HCDAntoine Tenart2014-11-0310-40/+33
| | | | | | | | | | | | This patch modify the generic code handling PHYs to allow them to be supplied from the drivers. This adds checks to ensure no PHY was already there when looking for one in the generic code. This also makes sure we do not modify its state in the generic HCD functions, it was provided by the driver. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: add support to the generic PHY framework in OTGAntoine Tenart2014-11-031-0/+3
| | | | | | | | | This patch adds support of the PHY framework in OTG and keeps the USB PHY compatibility. Here the only modification is to add PHY member in the OTG structure, along with the USB PHY one. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: rename phy to usb_phy in OTGAntoine Tenart2014-11-0312-59/+65
| | | | | | | | | | | This patch prepares the introduction of the generic PHY support in the USB OTG common functions. The USB PHY member of the OTG structure is renamed to 'usb_phy' and modifications are done in all drivers accessing it. Renaming this pointer will allow to keep the compatibility for USB PHY drivers. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: move the OTG state from the USB PHY to the OTG structureAntoine Tenart2014-11-0327-315/+312
| | | | | | | | | | | | | | | | Before using the PHY framework instead of the USB PHY one, we need to move the OTG state into another place, since it won't be available when USB PHY isn't used. This patch moves the OTG state into the OTG structure, and makes all the needed modifications in the drivers using the OTG state. [ balbi@ti.com : fix build regressions with phy-tahvo.c, musb_dsps.c, phy-isp1301-omap, and chipidea's debug.c ] Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: fix ptr_ret.cocci warningsFengguang Wu2014-11-031-4/+1
| | | | | | | | | | | drivers/usb/gadget/udc/r8a66597-udc.c:1849:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: function: Added usb_assign_descriptors failure checkPavitrakumar Managutte2014-11-031-0/+3
| | | | | | | | Added failure check for usb_assign_descriptors call in bind function. Acked-By: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Pavitrakumar Managutte <pavitra1729@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: core: use ->resume instead ->resume_noirqSebastian Andrzej Siewior2014-11-031-2/+2
| | | | | | | | | | | | | | | | | | | In commit 0ec8fd70fb ("USB: musb: fix possible panic while resuming") musb_resume() became musb_resume_early() in order to enable the clocks early on resume. This piece of the resume code was removed later in commit 034917612 ("usb: musb: move clock handling to glue layer"). In between the function was renamed from musb_resume_early() to musb_resume_noirq() by commit commit 48fea9659e ("USB: Rework musb suspend()/resume_early()"). Now I see that first musb_core is resumed followed by phy and glue layer and I ask myself is this really what we intend to do? This kind of revoked the purpose of the first commit (0ec8fd70fb). Because of this and because it looks wrong to resume (core) before the glue layer I push it to the ->resume callback. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc2: gadget: fix calls to phy control functions in suspend/resume codeMarek Szyprowski2014-11-031-2/+5
| | | | | | | | | | | | | This patch moves calls to phy enable/disable out of spinlock protected blocks in device suspend/resume to fix incorrect caller context. Phy related functions must not be called from atomic context. To protect device internal state from a race during suspend, a call to s3c_hsotg_core_disconnect() is added under a spinlock, what prevents any further activity on the usb bus. Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc2: gadget: use soft-disconnect udc feature in pullup() methodMarek Szyprowski2014-11-031-1/+8
| | | | | | | | | | | | | | This patch moves udc initialization from pullup() method to s3c_hsotg_udc_start(), so that method ends with hardware fully initialized and left in soft-disconnected state. After this change, the pullup() method simply clears soft-disconnect start() when called with is_on=1. For completeness, a call to s3c_hsotg_core_disconnect() has been added when pullup() method is called with is_on=0, what puts the udc hardware back to soft-disconnected state. Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc2: gadget: move phy control calls out of pullup() methodMarek Szyprowski2014-11-031-2/+4
| | | | | | | | | | | | This patch moves phy enable/disable calls from pullup() method to udc_start/stop functions. This solves the issue related to limited caller context for PHY functions, because they cannot be called from non-sleeping context. This is also a preparation for using soft-disconnect feature of udc controller in pullup() method. Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc2: gadget: decouple setting soft-disconnect from s3c_hsotg_core_initMarek Szyprowski2014-11-031-5/+17
| | | | | | | | | | | | This patch changes s3c_hsotg_core_init function to leave hardware in soft disconnect mode, so the moment of coupling the hardware to the usb bus can be later controlled by the separate functions for enabling and disabling soft disconnect mode. This patch is a preparation to rework pullup() method. Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc2: gadget: move setting last reset time to s3c_hsotg_core_initMarek Szyprowski2014-11-031-3/+2
| | | | | | | | | This patch removes duplicated code and sets last_rst variable in the function which does the hardware reset. Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: core: remove duplicate check on resourceVarka Bhadram2014-11-031-2/+2
| | | | | | | Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: dsps: remove duplicate check on resourceVarka Bhadram2014-11-031-3/+0
| | | | | | | Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: rcar-usb: remove duplicate check on resourceVarka Bhadram2014-11-031-5/+3
| | | | | | | Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: renesas_usbhs: common: remove duplicate check on resourceVarka Bhadram2014-11-031-2/+2
| | | | | | | Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: keystone: remove duplicate check on resourceVarka Bhadram2014-11-031-5/+0
| | | | | | | Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: omap2430: use MUSB_DEVCTL_BDEVICESergei Shtylyov2014-11-031-1/+2
| | | | | | | | The OMAP2+ MUSB glue layer still uses a bare number for the DEVCTL.B-Device bit in one place, while there's #define MUSB_DEVCTL_BDEVICE for that. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: pxa27x: do not call usb_gadget_unregister_driver()Felipe Balbi2014-11-031-1/+0
| | | | | | | | | | that call is completely unnecessary because usb_del_gadget_udc() already makes sure the gadget driver is properly unregistered from the UDC. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: net2272: do not call usb_gadget_unregister_driver()Felipe Balbi2014-11-031-10/+0
| | | | | | | | | that call is completely unnecessary because usb_del_gadget_udc() already makes sure the gadget driver is properly unregistered from the UDC. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: dummy: do not call usb_gadget_unregister_driver()Felipe Balbi2014-11-031-1/+0
| | | | | | | | | that call is completely unnecessary because usb_del_gadget_udc() already makes sure the gadget driver is properly unregistered from the UDC. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc2: gadget: do not call usb_gadget_unregister_driver()Felipe Balbi2014-11-031-7/+0
| | | | | | | | | | that call is completely unnecessary because usb_del_gadget_udc() already makes sure the gadget driver is properly unregistered from the UDC. Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: pxa27x_udc: fix clock prepare and enableRobert Jarzmik2014-11-031-21/+5
| | | | | | | | | | | | | | | | | | As the udc clock controls both the output signals and the internal IP, it must be enabled before any UDC register is touched. The bug is revealed when the clock framework disables the clock for a couple of milliseconds during the boot sequence, and the endpoint configuration is lost. The bug is hidden when clock framework is not used, because no "unused clocks disable" occurs. This patch fixes the wrong behaviour by ensuring that : - whenever a UDC register is read or written, the clock is enabled - reworks the endpoints programming to have it done under running clock - reworks suspend/resume to ensure the same thing Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: pxa27x_udc: use devm_* helpersRobert Jarzmik2014-11-031-32/+13
| | | | | | | | | Use devm_* helpers in the probe function to simplify the error path and the remove path. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: pxa27x_udc device-tree documentationRobert Jarzmik2014-11-031-0/+22
| | | | | | | | | | Add documentation for device-tree binding of arm PXA 27x udc (usb device) driver. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: devicetree@vger.kernel.org Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: core: prepend udc_attach_driver with usb_Felipe Balbi2014-11-033-4/+4
| | | | | | | No functional changes, just adding a prefix which should have been there from the start. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: remove unnecessary 'driver' argumentFelipe Balbi2014-11-0332-99/+55
| | | | | | | | | | | | | | | | | | | | | | now that no UDC driver relies on the extra 'driver' argument to ->udc_stop(), we can safely remove it. This commit is based on previous work by Robert Baldyga <r.baldyga@samsung.com> which can be found at [1]; however that patch turned out to have a high probability of regressing many UDC drivers because of a blind search & replace s/driver/$udc->driver/ which caused the 'driver' argument to stop_activity() to be a valid non-NULL pointer when it should be NULL, thus causing UDCs to mistakenly call gadget driver's ->disconnect() callback. [1] http://markmail.org/message/x5zneg4xea4zntab Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: core: fix unregistering messageFelipe Balbi2014-11-031-1/+1
| | | | | | | | Currently, we're printing gadget driver name when registering and UDC name when unregistering. Standardize on always printing gadget driver name. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: gadget: remove bind/unbind messagesFelipe Balbi2014-11-031-5/+0
| | | | | | | | now that we provide generic register/unregister debugging messages from udc-core, we can remove the same messages from this driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: s3c-hsudc: remove bind/unbind messagesFelipe Balbi2014-11-031-5/+0
| | | | | | | | now that we provide generic register/unregister debugging messages from udc-core, we can remove the same messages from this driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: net2280: remove bind/unbind messagesFelipe Balbi2014-11-031-6/+0
| | | | | | | | now that we provide generic register/unregister debugging messages from udc-core, we can remove the same messages from this driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: net2272: remove bind/unbind messagesFelipe Balbi2014-11-031-4/+0
| | | | | | | | now that we provide generic register/unregister debugging messages from udc-core, we can remove the same messages from this driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: gr_udc: remove bind/unbind messagesFelipe Balbi2014-11-031-5/+0
| | | | | | | | now that we provide generic register/unregister debugging messages from udc-core, we can remove the same messages from this driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: fsl_qe: remove bind/unbind messagesFelipe Balbi2014-11-031-4/+0
| | | | | | | | now that we provide generic register/unregister debugging messages from udc-core, we can remove the same messages from this driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: dummy: remove bind/unbind messagesFelipe Balbi2014-11-031-6/+1
| | | | | | | | now that we provide generic register/unregister debugging messages from udc-core, we can remove the same messages from this driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: udc: atmel_usba: remove bind/unbind messagesFelipe Balbi2014-11-031-4/+0
| | | | | | | | now that we provide generic register/unregister debugging messages from udc-core, we can remove the same messages from this driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud