Jingoo Han [Tue, 4 Nov 2014 02:01:47 +0000 (11:01 +0900)]
usb: dwc3: exynos: remove non-DT support for Exynos Specific Glue layer
DWC3 Exynos Specific Glue layer can be used only for Exynos SoCs.
In addition, non-DT for EXYNOS SoCs is not supported from v3.11;
thus, there is no need to support non-DT for DWC3 Exynos Specific
Glue layer.
The 'linux/platform_data/dwc3-exynos.h' file has been used for
non-DT support. Thus, the 'dwc3-exynos.h' file is removed, because
it is not used anymore.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Yoshihiro Shimoda [Tue, 4 Nov 2014 01:05:45 +0000 (10:05 +0900)]
usb: renesas_usbhs: fix usbhs_pipe_clear() for DCP PIPE
Since the DCPCTR doesn't have the ACLRM bit, the usbus_pipe_clear()
should not call the usbhsp_pipectrl_set() with ACLRM.
So, this patch fixes this issue to add the usbhs_fifo_clear_dcp()
in fifo.c because the controller needs the CFIFO to clear the
the DCP PIPE.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Yoshihiro Shimoda [Tue, 4 Nov 2014 01:05:44 +0000 (10:05 +0900)]
usb: renesas_usbhs: fix the timing of dcp_control_transfer_done
According to the datasheet, this driver should clear the INTSTS0.CTRT
bit before this controller detects the next stage transition. Otherwise,
the driver may not be able to clear the bit after the controller went to
the next stage transition. After that, the driver will not be able to
clear the INTSTS0.VALID, and a usb control transfer will not finish
finally.
If we use the testusb tool, it is easy to reproduce this issue:
# testusb -a -t 10
Since the previous code handled a data stage and a status stage in
the usbhsf_pio_try_push(), it may not clear the INTSTS0.CTRT at the
right timing.
So, this patch change the timing of usbhs_dcp_control_transfer_done()
to the usbhsg_irq_ctrl_stage().
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Takeshi Kihara [Tue, 4 Nov 2014 01:05:43 +0000 (10:05 +0900)]
usb: renesas_usbhs: gadget: fix the behavior of pullup
This patch fixes an issue that this driver always enable the D+ pullup
after it detected the VBUS connection even though this usb controller
can control the D+ pullup timing by software. So, this driver should
enable the D+ pullup after a gadget driver called usb_gadget_connect().
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Kazuya Mizuguchi [Tue, 4 Nov 2014 01:05:42 +0000 (10:05 +0900)]
usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()
This patch fixes an issue that the NULL pointer dereference happens
when we uses g_audio driver. Since the g_audio driver will call
usb_ep_disable() in afunc_set_alt() before it calls usb_ep_enable(),
the uep->pipe of renesas usbhs driver will be NULL. So, this patch
adds a condition to avoid the oops.
Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fixes: 2f98382dc (usb: renesas_usbhs: Add Renesas USBHS Gadget)
Cc: <stable@vger.kernel.org> # v3.0+
Signed-off-by: Felipe Balbi <balbi@ti.com>
Dinh Nguyen [Tue, 21 Oct 2014 20:31:42 +0000 (15:31 -0500)]
usb: dwc2: allow dwc2 to get built when USB_GADGET=m
This patch allows the gadget portion of the DWC2 driver to get built when
(!USB && USB_GADGET) condition is encountered.
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Huang Rui [Fri, 31 Oct 2014 03:11:18 +0000 (11:11 +0800)]
usb: dwc3: make HIRD threshold configurable
HIRD threshold should be configurable by different platforms.
From DesignWare databook:
When HIRD_Threshold[4] is set to 1b1 and HIRD value is greater than or
equal to the value in HIRD_Threshold[3:0], dwc3 asserts output signals
utmi_l1_suspend_n to put PHY into Deep Low-Power mode in L1.
When HIRD_Threshold[4] is set to 1b0 or the HIRD value is less than
HIRD_Threshold[3:0], dwc3 asserts output signals utmi_sleep_n on L1.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Huang Rui [Fri, 31 Oct 2014 03:11:17 +0000 (11:11 +0800)]
usb: dwc3: add support for AMD Nolan platform
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>
Huang Rui [Fri, 31 Oct 2014 03:11:16 +0000 (11:11 +0800)]
PCI: Prevent xHCI driver from claiming AMD Nolan USB3 DRD device
The AMD Nolan (NL) SoC contains a DesignWare USB3 Dual-Role Device that can
be operated either as a USB Host or a USB Device. In the AMD NL platform,
this device ([1022:7912]) has a class code of PCI_CLASS_SERIAL_USB_XHCI
(0x0c0330), which means the xhci driver will claim it.
But the dwc3 driver is a more specific driver for this device, and we'd
prefer to use it instead of xhci. To prevent xhci from claiming the
device, change the class code to 0x0c03fe, which the PCI r3.0 spec defines
as "USB device (not host controller)". The dwc3 driver can then claim it
based on its Vendor and Device ID.
Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jason Chang <jason.chang@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Huang Rui [Fri, 31 Oct 2014 03:11:15 +0000 (11:11 +0800)]
PCI: Add support for AMD Nolan USB3 DRD
This patch adds PCI id for USB3 Dual-Role Device of AMD Nolan (NL) SoC.
It will be used for PCI quirks and DWC3 device driver.
Signed-off-by: Jason Chang <jason.chang@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Huang Rui [Fri, 31 Oct 2014 03:11:14 +0000 (11:11 +0800)]
usb: dwc3: add disable usb2 suspend phy quirk
This patch adds disable usb2 suspend phy quirk, and some special platforms
can configure that if it is needed.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Huang Rui [Fri, 31 Oct 2014 03:11:13 +0000 (11:11 +0800)]
usb: dwc3: add disable usb3 suspend phy quirk
This patch adds disable usb3 suspend phy quirk, and some special platforms
can configure that if it is needed.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Huang Rui [Fri, 31 Oct 2014 03:11:12 +0000 (11:11 +0800)]
usb: dwc3: add Tx de-emphasis quirk
This patch adds Tx de-emphasis quirk, and the Tx de-emphasis value is
configurable according to PIPE3 specification.
Value Description
0 -6dB de-emphasis
1 -3.5dB de-emphasis
2 No de-emphasis
3 Reserved
It can be configured on DT or platform data.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Huang Rui [Tue, 28 Oct 2014 11:54:35 +0000 (19:54 +0800)]
usb: dwc3: set SUSPHY bit for all cores
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>
Huang Rui [Tue, 28 Oct 2014 11:54:33 +0000 (19:54 +0800)]
usb: dwc3: add rx_detect to polling lfps quirk
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>
Huang Rui [Tue, 28 Oct 2014 11:54:32 +0000 (19:54 +0800)]
usb: dwc3: add lfps filter quirk
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>
Huang Rui [Tue, 28 Oct 2014 11:54:31 +0000 (19:54 +0800)]
usb: dwc3: add delay phy power change quirk
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>
Huang Rui [Tue, 28 Oct 2014 11:54:30 +0000 (19:54 +0800)]
usb: dwc3: add delay p1p2p3 quirk
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>
Huang Rui [Tue, 28 Oct 2014 11:54:29 +0000 (19:54 +0800)]
usb: dwc3: add request p1p2p3 quirk
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>
Huang Rui [Tue, 28 Oct 2014 11:54:28 +0000 (19:54 +0800)]
usb: dwc3: add P3 in U2 SS inactive quirk
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>
Huang Rui [Tue, 28 Oct 2014 11:54:27 +0000 (19:54 +0800)]
usb: dwc3: add u2exit lfps quirk
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>
Huang Rui [Tue, 28 Oct 2014 11:54:26 +0000 (19:54 +0800)]
usb: dwc3: add lpm erratum support
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>
Huang Rui [Tue, 28 Oct 2014 11:54:25 +0000 (19:54 +0800)]
usb: dwc3: add disscramble quirk
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>
Huang Rui [Tue, 28 Oct 2014 11:54:24 +0000 (19:54 +0800)]
usb: dwc3: initialize platform data at pci glue layer
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>
Huang Rui [Tue, 28 Oct 2014 11:54:23 +0000 (19:54 +0800)]
usb: dwc3: add a flag to check if it is fpga board
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>
Huang Rui [Tue, 28 Oct 2014 11:54:22 +0000 (19:54 +0800)]
usb: dwc3: enable hibernation if to be supported
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>
Antoine Tenart [Thu, 30 Oct 2014 17:41:19 +0000 (18:41 +0100)]
usb: chipidea: add support to the generic PHY framework
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>
Antoine Tenart [Thu, 30 Oct 2014 17:41:16 +0000 (18:41 +0100)]
usb: allow to supply the PHY in the drivers when using HCD
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>
Antoine Tenart [Thu, 30 Oct 2014 17:41:15 +0000 (18:41 +0100)]
usb: add support to the generic PHY framework in OTG
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>
Antoine Tenart [Thu, 30 Oct 2014 17:41:14 +0000 (18:41 +0100)]
usb: rename phy to usb_phy in OTG
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>
Antoine Tenart [Thu, 30 Oct 2014 17:41:13 +0000 (18:41 +0100)]
usb: move the OTG state from the USB PHY to the OTG structure
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>
Fengguang Wu [Wed, 29 Oct 2014 14:18:55 +0000 (22:18 +0800)]
usb: gadget: fix ptr_ret.cocci warnings
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>
Pavitrakumar Managutte [Mon, 27 Oct 2014 17:19:26 +0000 (22:49 +0530)]
usb: gadget: function: Added usb_assign_descriptors failure check
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>
Sebastian Andrzej Siewior [Mon, 27 Oct 2014 09:49:42 +0000 (10:49 +0100)]
usb: musb: core: use ->resume instead ->resume_noirq
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>
Marek Szyprowski [Mon, 20 Oct 2014 10:45:39 +0000 (12:45 +0200)]
usb: dwc2: gadget: fix calls to phy control functions in suspend/resume code
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>
Marek Szyprowski [Mon, 20 Oct 2014 10:45:38 +0000 (12:45 +0200)]
usb: dwc2: gadget: use soft-disconnect udc feature in pullup() method
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>
Marek Szyprowski [Mon, 20 Oct 2014 10:45:37 +0000 (12:45 +0200)]
usb: dwc2: gadget: move phy control calls out of pullup() method
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>
Marek Szyprowski [Mon, 20 Oct 2014 10:45:36 +0000 (12:45 +0200)]
usb: dwc2: gadget: decouple setting soft-disconnect from s3c_hsotg_core_init
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>
Marek Szyprowski [Mon, 20 Oct 2014 10:45:35 +0000 (12:45 +0200)]
usb: dwc2: gadget: move setting last reset time to s3c_hsotg_core_init
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>
Varka Bhadram [Wed, 29 Oct 2014 16:00:19 +0000 (21:30 +0530)]
usb: musb: core: remove duplicate check on resource
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>
Varka Bhadram [Wed, 29 Oct 2014 16:00:18 +0000 (21:30 +0530)]
usb: musb: dsps: remove duplicate check on resource
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>
Varka Bhadram [Wed, 29 Oct 2014 16:00:17 +0000 (21:30 +0530)]
usb: phy: rcar-usb: remove duplicate check on resource
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>
Varka Bhadram [Wed, 29 Oct 2014 16:00:16 +0000 (21:30 +0530)]
usb: renesas_usbhs: common: remove duplicate check on resource
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>
Varka Bhadram [Wed, 29 Oct 2014 16:00:15 +0000 (21:30 +0530)]
usb: dwc3: keystone: remove duplicate check on resource
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>
Sergei Shtylyov [Thu, 23 Oct 2014 20:34:12 +0000 (00:34 +0400)]
usb: musb: omap2430: use MUSB_DEVCTL_BDEVICE
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>
Felipe Balbi [Sat, 18 Oct 2014 01:19:41 +0000 (20:19 -0500)]
usb: gadget: udc: pxa27x: do not call usb_gadget_unregister_driver()
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>
Felipe Balbi [Sat, 18 Oct 2014 01:19:02 +0000 (20:19 -0500)]
usb: gadget: udc: net2272: do not call usb_gadget_unregister_driver()
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>
Felipe Balbi [Sat, 18 Oct 2014 01:18:23 +0000 (20:18 -0500)]
usb: gadget: udc: dummy: do not call usb_gadget_unregister_driver()
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>
Felipe Balbi [Sat, 18 Oct 2014 01:15:08 +0000 (20:15 -0500)]
usb: dwc2: gadget: do not call usb_gadget_unregister_driver()
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>
Robert Jarzmik [Fri, 17 Oct 2014 20:43:06 +0000 (22:43 +0200)]
usb: gadget: pxa27x_udc: fix clock prepare and enable
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>
Robert Jarzmik [Fri, 17 Oct 2014 20:43:05 +0000 (22:43 +0200)]
usb: gadget: pxa27x_udc: use devm_* helpers
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>
Robert Jarzmik [Fri, 17 Oct 2014 20:43:04 +0000 (22:43 +0200)]
usb: gadget: pxa27x_udc device-tree documentation
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>
Felipe Balbi [Fri, 17 Oct 2014 23:57:06 +0000 (18:57 -0500)]
usb: gadget: udc: core: prepend udc_attach_driver with usb_
No functional changes, just adding a prefix
which should have been there from the start.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 17:05:12 +0000 (12:05 -0500)]
usb: gadget: remove unnecessary 'driver' argument
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>
Felipe Balbi [Fri, 17 Oct 2014 16:54:46 +0000 (11:54 -0500)]
usb: gadget: udc: core: fix unregistering message
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>
Felipe Balbi [Fri, 17 Oct 2014 16:41:33 +0000 (11:41 -0500)]
usb: musb: gadget: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:40:56 +0000 (11:40 -0500)]
usb: gadget: udc: s3c-hsudc: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:40:05 +0000 (11:40 -0500)]
usb: gadget: udc: net2280: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:39:29 +0000 (11:39 -0500)]
usb: gadget: udc: net2272: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:38:39 +0000 (11:38 -0500)]
usb: gadget: udc: gr_udc: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:38:09 +0000 (11:38 -0500)]
usb: gadget: udc: fsl_qe: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:37:38 +0000 (11:37 -0500)]
usb: gadget: udc: dummy: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:37:04 +0000 (11:37 -0500)]
usb: gadget: udc: atmel_usba: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:35:52 +0000 (11:35 -0500)]
usb: gadget: udc: at91: remove bind/unbind messages
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>
Felipe Balbi [Fri, 17 Oct 2014 16:34:07 +0000 (11:34 -0500)]
usb: gadget: udc: pass a single argument to usb_gadget_udc_start/stop
We know that our udc points to our gadget and our
gadget_driver, simplify the interface by passing
a single argument.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:26:46 +0000 (11:26 -0500)]
usb: musb: gadget: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:25:50 +0000 (11:25 -0500)]
usb: gadget: udc: s3c-hsudc: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:25:04 +0000 (11:25 -0500)]
usb: gadget: udc: pxa27x: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:24:37 +0000 (11:24 -0500)]
usb: gadget: udc: pxa25x: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:23:33 +0000 (11:23 -0500)]
usb: gadget: udc: net2280: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:22:52 +0000 (11:22 -0500)]
usb: gadget: udc: net2272: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:22:11 +0000 (11:22 -0500)]
usb: gadget: udc: mv_udc: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:21:34 +0000 (11:21 -0500)]
usb: gadget: udc: mv_u3d: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:21:03 +0000 (11:21 -0500)]
usb: gadget: udc: lpc32xx: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:20:10 +0000 (11:20 -0500)]
usb: gadget: udc: fsl_qe: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:18:29 +0000 (11:18 -0500)]
usb: gadget: udc: dummy: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:17:08 +0000 (11:17 -0500)]
usb: gadget: udc: at91: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 17 Oct 2014 16:16:04 +0000 (11:16 -0500)]
usb: gadget: udc: amd5536: do not rely on 'driver' argument
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Vinod Koul [Sat, 11 Oct 2014 15:40:38 +0000 (21:10 +0530)]
usb: musb: ux500_dma: use dmaengine_xxx() APIs
The drivers should use dmaengine_terminate_all() or dmaengine_slave_config()
API instead of accessing the device_control which will be deprecated soon
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:19 +0000 (15:56 +0800)]
usb: renesas_usbhs: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:18 +0000 (15:56 +0800)]
usb: phy: phy-mv-usb: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:17 +0000 (15:56 +0800)]
usb: phy: phy-msm-usb: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:16 +0000 (15:56 +0800)]
usb: phy: phy-mxs-usb: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:15 +0000 (15:56 +0800)]
usb: phy: phy-rcar-gen2-usb: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:14 +0000 (15:56 +0800)]
usb: phy: phy-am335x-control: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:13 +0000 (15:56 +0800)]
usb: phy: phy-tegra-usb: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:12 +0000 (15:56 +0800)]
usb: phy: phy-rcar-usb: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:11 +0000 (15:56 +0800)]
usb: musb: musb_dsps: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:10 +0000 (15:56 +0800)]
usb: musb: tusb6010: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:09 +0000 (15:56 +0800)]
usb: musb: blackfin: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:08 +0000 (15:56 +0800)]
usb: musb: omap2430: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:07 +0000 (15:56 +0800)]
usb: musb: ux500: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:06 +0000 (15:56 +0800)]
usb: musb: davinci: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:56:00 +0000 (15:56 +0800)]
usb: gadget: s3c-hsudc: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:55:59 +0000 (15:55 +0800)]
usb: gadget: bcm63xx_udc: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:55:58 +0000 (15:55 +0800)]
usb: gadget: fsl_qe_udc: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Peter Chen [Tue, 14 Oct 2014 07:55:57 +0000 (15:55 +0800)]
usb: gadget: mv_udc_core: delete unnecessary 'out of memory' messages
The memory subsystem has already had similar message for it.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Mon, 13 Oct 2014 20:36:16 +0000 (15:36 -0500)]
usb: dwc3: gadget: WARN() on bogus usb_ep_queue()
Some gadget/function drivers might want to do
improper request recycling by allocating a single
request from one particular endpoint and queueing
it to another completely unrelated endpoint.
One such case was found with f_loopback.c.
To prevent such cases from happening again, let's
WARN() so we get a loud enough failure and persuade
users to report errors.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 10 Oct 2014 20:24:00 +0000 (15:24 -0500)]
usb: dwc3: gadget: set state to NOT_ATTACHED on disconnect_irq
whenever we get a Disconnect Interrupt, we should
make sure to update out udc state to NOT_ATTACHED,
otherwise sysfs will show wrong values.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi [Fri, 10 Oct 2014 20:21:56 +0000 (15:21 -0500)]
usb: gadget: udc: document our sysfs ABI
I noticed that this has been missing for quite
some time so I decided it was about time to
document it.
Signed-off-by: Felipe Balbi <balbi@ti.com>