summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-01-30usb: dwc2: gadget: fix phy interface configurationMian Yousaf Kaukab1-3/+7
hsotg->phyif is set in dwc2_gadget_init according to phy interface width. Use it for configuration instead of hardcoded value. Moreover, set USB turnaround time according to phy width. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: gadget: fix debug message for zlpMian Yousaf Kaukab1-1/+6
Print debug message according to zlp direction. Always saying "Sending" is misleading. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: gadget: don't modify pullup status during resetGregory Herrero1-1/+0
Pullup doesn't need to be enabled during usb reset since it is already enabled. This leads to shorter chirp-k duration if done during usb reset. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: gadget: add reset flag in init functionGregory Herrero3-15/+26
Add a flag to request physical reset of the controller when s3c_hsotg_core_init_disconnected is called. During the usb reset, controller must not be fully reconfigured and resetted. Else this leads to shorter chirp-k duration during enumeration. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: gadget: add unaligned buffers supportMian Yousaf Kaukab2-1/+63
When using DMA, dwc2 requires buffers to be 4 bytes aligned. Use bounce buffers if they are not. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: gadget: remove hardcoded if (0) and if (1) checksMian Yousaf Kaukab1-13/+1
Remove dead code as well. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: gadget: fix a typo in commentGregory Herrero1-1/+1
s3c_hsotg_process_req_feature comments was not correct Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: gadget: add TEST_MODE feature supportGregory Herrero2-7/+186
Handle SET_FEATURE TEST_MODE request sent by the host. Slightly rework FEATURE request handling to allow parsing other request types than Endpoint. Also add a debugfs to change test mode value from user space. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: gadget: fix clear halt feature handlingGregory Herrero1-7/+13
When clearing HALT on an endpoint, req->complete of in progress requests must be called with locks off. New request should only be started if there is not already a pending request on the endpoint. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: dwc2: host: resume root hub on remote wakeupGregory Herrero1-2/+4
When a remote wakeup happens during bus_suspend, hcd needs to resume its root hub. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: musb: add omap-control dependencyArnd Bergmann1-1/+1
The omap musb front-end calls into the phy driver directly instead of using a generic phy interface, which causes a link error when the specific driver is not built-in: drivers/built-in.o: In function `omap2430_musb_disable': usb/musb/omap2430.c:480: undefined reference to `omap_control_usb_set_mode' drivers/built-in.o: In function `omap2430_musb_enable': usb/musb/omap2430.c:466: undefined reference to `omap_control_usb_set_mode' usb/musb/omap2430.c:447: undefined reference to `omap_control_usb_set_mode' drivers/built-in.o: In function `omap_musb_set_mailbox': usb/musb/omap2430.c:273: undefined reference to `omap_control_usb_set_mode' usb/musb/omap2430.c:304: undefined reference to `omap_control_usb_set_mode' drivers/built-in.o:(.debug_addr+0xbd9e0): more undefined references to `omap_control_usb_set_mode' follow This adds an explicit dependency. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: ca784be36cc725 ("usb: start using the control module driver") Cc: <stable@vger.kernel.org> # v3.9+ Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: musb: add generic usb phy dependenciesArnd Bergmann1-0/+5
Multiple musb glue drivers depend on the generic usb phy support, but fail to list it as a dependency in Kconfig. This results in build erros like: drivers/built-in.o: In function `am35x_remove': :(.text+0xadacc): undefined reference to `usb_phy_generic_unregister' drivers/built-in.o: In function `am35x_probe': :(.text+0xae1c8): undefined reference to `usb_phy_generic_register' :(.text+0xae244): undefined reference to `usb_phy_generic_unregister' drivers/built-in.o: In function `jz4740_remove': :(.text+0xaf648): undefined reference to `usb_phy_generic_unregister' drivers/built-in.o: In function `jz4740_musb_init': :(.text+0xaf694): undefined reference to `usb_phy_generic_register' This adds the ones that are missing. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: udc-core: add is_selfpowered sys entryPeter Chen1-0/+2
The user can read it through sys entry. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: musb: gadget: use common is_selfpoweredPeter Chen2-4/+2
Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: dwc3: gadget: use common is_selfpoweredPeter Chen3-4/+2
Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: pch_udc: set value for common is_selfpoweredPeter Chen1-0/+1
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: atmel_usba_udc: set value for common is_selfpoweredPeter Chen1-0/+1
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: net2272: use common is_selfpoweredPeter Chen2-6/+2
Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: s3c2410_udc: set value for common is_selfpoweredPeter Chen1-0/+1
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: net2280: use common is_selfpoweredPeter Chen2-4/+3
Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: r8a66597-udc: set value for common is_selfpoweredPeter Chen1-0/+1
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: omap_udc: set value for common is_selfpoweredPeter Chen1-0/+1
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: fsl_udc_core: set value for common is_selfpoweredPeter Chen1-1/+2
fsl udc core assumes itself always self powered, so set is_selfpowered is 1. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: lpc32xx_udc: use common is_selfpoweredPeter Chen1-8/+4
Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: dummy_hcd: set value for common is_selfpoweredPeter Chen1-0/+1
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: bdc_udc: set value for common is_selfpoweredPeter Chen1-0/+1
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: renesas_usbhs: gadget: set value for common is_selfpoweredPeter Chen1-0/+2
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29staging: emxx_udc: use common is_selfpoweredPeter Chen2-7/+3
Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: at91_udc: use common is_selfpoweredPeter Chen2-5/+4
Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: chipidea: udc: add set_selfpowered gaget opsPeter Chen1-2/+16
The gadget power property will be used at get_status request. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: gadget: introduce is_selfpowered for usb_gadgetPeter Chen1-0/+2
Whether the gadget is selfpowerwed or not can be determined by composite core, so we can use a common entry to indicate if the self-powered is supported by gadget, and the related private variable at individual udc driver can be deleted. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29usb: dwc3: gadget: add missing spin_lock()Felipe Balbi1-0/+1
commit 8e74475b0e0a (usb: dwc3: gadget: use udc-core's reset notifier) added support for the new UDC core's reset notifier to dwc3 but while at it, it removed a spin_lock() from dwc3_reset_gadget() which might cause an unbalanced spin_unlock() further down the line Fixes: 8e74475b0e0a (usb: dwc3: gadget: use udc-core's reset notifier) Cc: <stable@vger.kernel.org> # v3.19 Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: dwc3: remove reliance on dev_vdbg()Felipe Balbi4-35/+39
By moving all dev_vdbg() to tracepoints, we can finally get rid of dev_vdbg() usage from dwc3. Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: dwc3: trace: add trace logs for core and gadgetFelipe Balbi1-0/+10
Sometimes we want to just print a formatted string without passing any extra data. The following will be used for removing reliance on dev_vdbg() from dwc3. Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: dwc3: gadget: WARN() in case of unknown IRQFelipe Balbi1-1/+1
if an unknown IRQ event is triggered, that means the HW is really misbehaving. Instead of printing a debug message, let's WARN() so users report when that happens. Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: dwc3: gadget: avoid variable shadowingFelipe Balbi1-6/+1
We already have both ret and dwc defined in this same function. Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: gadget: uvc: comments for iterating over streaming hierarchyAndrzej Pietrasiewicz1-0/+34
The purpose of the functions and their parametrs might not be obvious to the reader, so explain it. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: gadget: uvc: use explicit type instead of void *Andrzej Pietrasiewicz1-2/+2
The first parameter of __uvcg_iter_strm_cls() is always used in the context of struct uvcg_streaming_header, so change the function prototype accordingly. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: phy: mxs: add delay before set phyctrl.clkgatePeter Chen1-3/+9
There is a request from IC engineer that if we doesn't set phypwd as 0xffffffff, we need to delay about five 32Khz cycles before set phy's pwd register, otherwise, the wakeup signal may can't wake up controller. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: phy: mxs: do not set PWD.RXPWD1PT1 for low speed connectionPeter Chen1-1/+46
At very rare cases, the SoF will not send out after resume with low speed connection. The workaround is do not power down PWD.RXPWD1PT1 bit during the suspend. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: phy: mxs: refine mxs_phy_disconnect_lineLi Jun1-1/+14
For non-otg mode, we keep the usage of disconnect line between phy analog and digital unchanging; for otg mode, at peripheral role, we keep the usage unchanging too, at host role, the digital part needs to know dp/dm change to respond device's data pulse when it is at low power mode. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: phy: mxs: don't need IP fix for imx6sxPeter Chen1-2/+1
The RLT code has already done it, so no software operation is needed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: isp1760: Fix USB disabled checkLaurent Pinchart3-9/+21
The isp1760 driver registration function returns an error if USB is disabled. This made sense when the driver only supported host controllers, but now that it supports peripheral controllers host support isn't mandatory anymore. Fix this by returning an error only when both the HCD and UDC functions are disabled, either through the kernel configuration or at runtime. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: isp1760: Remove duplicate usb_disabled() checkLaurent Pinchart1-3/+0
Both isp1760_register() and isp1761_pci_probe() check whether USB is disabled by calling usb_disabled(), and bail out with an error if it is. One check is enough, remove the PCI-specific check. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: isp1760: Make HCD support optionalLaurent Pinchart4-8/+71
Enable compilation of the isp1760 driver in pure host mode, pure device mode, or dual-role mode. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: isp1760: Move driver from drivers/usb/host/ to drivers/usb/isp1760/Laurent Pinchart15-26/+29
Now that this is DRD, it doesn't make sense to keep it under drivers/usb/host. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: isp1760: Add device controller supportLaurent Pinchart7-5/+1768
The ISP1761 is a dual-mode host and device controller backward compatible on the host side with the ISP1760. Add support for the device controller. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: isp1760: Move PORT1 configuration to core codeLaurent Pinchart2-9/+8
Configuring the mode of operation of port 1 doesn't belong to the HCD code, as it's related to the soon to come UDC support. Move the configuration to core code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: isp1760: Initialize the bus interface in core codeLaurent Pinchart4-75/+105
Although the corresponding register is part of the HCD register space, processor bus initialization is not specific to the HCD. To prepare for device controller support, move bus interface initialization to core code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: isp1760: Set IRQF_SHARED flag in core codeLaurent Pinchart2-7/+6
The IRQF_SHARED flag needs to be set regardless of the bus type. Don't require glue code to set it manually. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>