- 25 5月, 2020 40 次提交
-
-
由 Thinh Nguyen 提交于
To prepare for handling of XferComplete event, let's refactor and split up dwc3_gadget_endpoint_transfer_in_progress() to handle TRBs completion for different events. The handling of TRBs completion will be the same, but the status of XferComplete event is different than XferInProgress. No functional change in this commit. Signed-off-by: NThinh Nguyen <thinhn@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Thinh Nguyen 提交于
While handling TRBs completion, if a END_TRANSFER command isn't completed, don't kick new transfer or issue END_TRANSFER command. Signed-off-by: NThinh Nguyen <thinhn@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Thinh Nguyen 提交于
Set the request->is_last to each stream request to indicate that the request is the last stream request of a transfer. The DWC3 controller needs to know this info to properly switch streams. The current implementation of f_tcm uses a single request per transfer, so every stream request is the last of its stream. Signed-off-by: NThinh Nguyen <thinhn@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Thinh Nguyen 提交于
To take advantage of DWC3 internal TRB prefetch and cache for performance, inform the controller the last request with stream_id before switching to a different stream transfer. This allows the controller to maintain its transfer burst within the stream ID. Introduce the usb-request is_last field to help inform the DWC3 controller of this. Signed-off-by: NThinh Nguyen <thinhn@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Thinh Nguyen 提交于
DWC_usb32 supports MDWIDTH value larger than 255 and up to 1023. The field HWPARAMS6[9:8] stores the upper 2-bit values of the DWC_usb32's MDWIDTH. Check that parameter and properly get the MDWIDTH for DWC_usb32. Signed-off-by: NThinh Nguyen <thinhn@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Thinh Nguyen 提交于
Synopsys introduces a new controller DWC_usb32. It supports dual-lane and speed up to 20 Gbps, and the DWC3 driver will drive this controller. Currently the driver uses a single field dwc->revision to ID both DWC_usb3 and DWC_usb31 and their version number. This was sufficient for two IPs, but this method doesn't work with additional IPs. As a result, let's separate the dwc->revision field to 2 separate fields: ip and revision. The ip field now stores the ID of the controller's IP while the revision field stores the controller's version number. This new scheme enforces DWC3 to compare the revision within the same IP only. As a result, we must update all the revision check of the controller to check its corresponding IP. To help with this enforcement, we create a few macros to help with the common version checks: DWC3_IP_IS(IP) DWC3_VER_IS(IP, VERSION) DWC3_VER_IS_PRIOR(IP, VERSION) DWC3_VER_IS_WITHIN(IP, LOWER_VERSION, UPPER_VERSION) DWC3_VER_TYPE_IS_WITHIN(IP, VERSION, LOWER_VERSION_TYPE, UPPER_VERSION_TYPE) The DWC_usb32 controller operates using the same programming model and with very similar configurations as its previous controllers. Please note that the various IP and revision checks in this patch match the current checks for DWC_usb31 version 1.90a. Additional configurations that are unique to DWC_usb32 are applied separately. Signed-off-by: NThinh Nguyen <thinhn@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Nagarjuna Kristam 提交于
OTG port on Tegra194 supports GEN1 speeds when in device mode and GEN2 speeds when in host mode. dd port_speed_quirk that configures port to GEN1/GEN2 speds, corresponding to the mode. Based on work by WayneChang <waynec@nvidia.com> Signed-off-by: NNagarjuna Kristam <nkristam@nvidia.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Nagarjuna Kristam 提交于
This commit adds support for XUSB device mode controller support on Tegra194 SoC. This is very similar to the existing Tegra186 XUDC, with lpm support added in addition. Signed-off-by: NNagarjuna Kristam <nkristam@nvidia.com> Acked-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Nagarjuna Kristam 提交于
Extend the Tegra XUSB controller device tree binding with Tegra194 support. Signed-off-by: NNagarjuna Kristam <nkristam@nvidia.com> Acked-by: NThierry Reding <treding@nvidia.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Jules Irenge 提交于
Sparse reports a warning at set_link_state() warning: context imbalance in set_link_state() - unexpected unlock The root cause is the missing annotation at set_link_state() Add the missing __must_hold(&dum->lock) Signed-off-by: NJules Irenge <jbi.octave@gmail.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Jules Irenge 提交于
Sparse reports a warning at xudc_handle_setup() warning: context imbalance in xudc_handle_setup() - unexpected unlock The root cause is the missing annotation at xudc_handle_setup() Add the missing __must_hold(&udc->lock) annotation Signed-off-by: NJules Irenge <jbi.octave@gmail.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Wei Yongjun 提交于
module_usb_composite_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Jason Yan 提交于
Fix the following coccicheck warning: drivers/usb/gadget/udc/omap_udc.c:2579:2-3: Unneeded semicolon Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Jason Yan 提交于
Fix the following coccicheck warning: drivers/usb/gadget/udc/mv_u3d_core.c:1551:5-13: WARNING: Comparison to bool Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Jason Yan 提交于
Fix the following coccicheck warning: drivers/usb/gadget/udc/net2272.c:57:12-19: WARNING: Assignment of 0/1 to bool variable Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Jason Yan 提交于
Fix the following coccicheck warning: drivers/usb/dwc3/drd.c:85:3-24: WARNING: Assignment of 0/1 to bool variable drivers/usb/dwc3/drd.c:59:2-23: WARNING: Assignment of 0/1 to bool variable Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Colin Ian King 提交于
The variable status is being assigned a value that is never read and it is being updated later with a new value. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Nathan Chancellor 提交于
Clang warns: drivers/usb/gadget/udc/s3c2410_udc.c:255:11: warning: comparison of address of 'ep->queue' equal to a null pointer is always false [-Wtautological-pointer-compare] if (&ep->queue == NULL) ~~~~^~~~~ ~~~~ 1 warning generated. It is not wrong, queue is not a pointer so if ep is not NULL, the address of queue cannot be NULL. No other driver does a check like this and this check has been around since the driver was first introduced, presumably with no issues so it does not seem like this check should be something else. Just remove it. Commit afe956c5 ("kbuild: Enable -Wtautological-compare") exposed this but it is not the root cause of the warning. Fixes: 3fc154b6 ("USB Gadget driver for Samsung s3c2410 ARM SoC") Link: https://github.com/ClangBuiltLinux/linux/issues/1004Reviewed-by: NNick Desaulniers <ndesaulniers@google.com> Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NNathan Chancellor <natechancellor@gmail.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Fabrice Gasnier 提交于
Add suspend resume callbacks to notify u_serial of the bus suspend/resume state. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Fabrice Gasnier 提交于
Add suspend resume callbacks to notify u_serial of the bus suspend/resume state. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Fabrice Gasnier 提交于
Add suspend resume callbacks to handle the case seen when the bus is suspended by the HOST, and the device opens the port (cat /dev/ttyGS0). Gadget controller (like DWC2) doesn't accept usb requests to be queued in this case (when in L2 state), from the gs_open() call. Error log is printed - configfs-gadget gadget: acm ttyGS0 can't notify serial state, -11 If the HOST resumes (opens) the bus, the port still isn't functional. Use suspend/resume callbacks to monitor the gadget suspended state by using 'suspended' flag. In case the port gets opened (cat /dev/ttyGS0), the I/O stream will be delayed until the bus gets resumed by the HOST. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Fabrice Gasnier 提交于
When the remote wakeup interrupt is triggered, lx_state is resumed from L2 to L0 state. But when the gadget resume is called, lx_state is still L2. This prevents the resume callback to queue any request. Any attempt to queue a request from resume callback will result in: - "submit request only in active state" debug message to be issued - dwc2_hsotg_ep_queue() returns -EAGAIN Call the gadget resume routine after the core is in L0 state. Fixes: f81f46e1 ("usb: dwc2: implement hibernation during bus suspend/resume") Acked-by: NMinas Harutyunyan <hminas@synopsys.com> Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Michael Grzeschik 提交于
This patch changes the function uvc_video_pump to be a separate scheduled worker. This way the completion handler of each usb request and every direct caller of the pump has only to schedule the worker instead of doing the request handling by itself. Moving the request handling to one thread solves the locking problems between the three queueing cases in the completion handler, v4l2_qbuf and video_enable. Many drivers handle the completion handlers directly in their interrupt handlers. This patch also reduces the workload on each interrupt. Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Nishad Kamdar 提交于
This patch corrects the SPDX License Identifier style in header files related to Renesas USBHS Controller Drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Reviewed-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Suggested-by: NJoe Perches <joe@perches.com> Signed-off-by: NNishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Jason Yan 提交于
Fix the following coccicheck warning: drivers/usb/gadget/function/f_fs.c:2507:2-3: Unneeded semicolon Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Martin Blumenstingl 提交于
There is now an updated bindings for these SoCs making the old compatible obsolete. Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Neil Armstrong 提交于
Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Martin Blumenstingl 提交于
There is now a dedicated driver for these SoCs making the old compatible obsolete. Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Martin Blumenstingl 提交于
The registers which are managed by the meson-gxl-usb3 PHY driver are actually "USB control" registers (which are "glue" registers which manage OTG detection and routing of the OTG capable port between the DWC2 peripheral-only controller and the DWC3 host-only controller). Drop the meson-gxl-usb3 PHY driver now that the dwc3-meson-g12a-usb driver supports the USB control registers on GXL and GXM SoCs (these were previously managed by the meson-gxl-usb3 PHY driver). Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Martin Blumenstingl 提交于
Add the correcly architectured USB Glue node and adapt all the Amlogic GXL and GXM board to the new organization. Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Neil Armstrong 提交于
In order to add support for the Amlogic GXL/GXM USB Glue, this adds the corresponding : - PHY names - clock names - USB2 PHY init and mode set - regmap setup Reviewed-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Neil Armstrong 提交于
On the Amlogic GXL/GXM SoCs, the OTG PHY status signals are always connected to the DWC3 controller, thus crashing the controller when switching to OTG mode when port is not populated with a device/cable to Host. Amlogic added a bit to disconnect the OTG PHY status signals from the DWC3 to be used when switching the OTG PHY as Device to the DWC2 controller. The drawback is that it makes the DWC3 port state machine stall and needs a full reset of the DWC3 controller to get connect status to the port connected to the OTG PHY, but not the other one. Reviewed-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Neil Armstrong 提交于
Refactor the USB init code patch to handle the Amlogic GXL/GXM needing to initialize the OTG port as Peripheral mode for the DWC2 IP to probe correctly. A secondary, post_init callback is added to setup the OTG PHY mode after powering up the PHYs and before probing the DWC2 and DWC3 controllers. Reviewed-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Jason Yan 提交于
Fix the following gcc warning: drivers/usb/gadget/udc/gr_udc.c:51:19: warning: ‘driver_desc’ defined but not used [-Wunused-const-variable=] static const char driver_desc[] = DRIVER_DESC; ^~~~~~~~~~~ Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Christophe JAILLET 提交于
Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'. Fixes: 48ba02b2 ("usb: gadget: add udc driver for max3420") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Nishad Kamdar 提交于
This patch corrects the SPDX License Identifier style in header files related to MediaTek USB3 Dual Role controller. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Reviewed-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Suggested-by: NJoe Perches <joe@perches.com> Signed-off-by: NNishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Peter Chen 提交于
During device mode initialization, lots of device information are printed to console, see below. Change them as debug message. cdns-usb3 5b130000.cdns3: Initialized ep0 support: cdns-usb3 5b130000.cdns3: Initialized ep1out support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep2out support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep3out support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep4out support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep5out support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep6out support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep7out support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep1in support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep2in support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep3in support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep4in support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep5in support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep6in support: BULK, INT ISO cdns-usb3 5b130000.cdns3: Initialized ep7in support: BULK, INT ISO Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Peter Chen 提交于
And delete cdsn3_hw_role_state_machine declare which doesn't be needed. Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Peter Chen 提交于
In short, we have three kinds of role switches: - Based on SoC: ID and VBUS - Based on external connnctor, eg, Type-C or GPIO Connector - Based on user choices through sysfs Since HW handling and usb-role-switch handling are at different places, we do not need role_override any more, and this flag could not judge external connector case well. With role_override deleted, We use cdns3_hw_role_switch for the 1st use case, and usb-role-switch for the 2nd and 3rd cases. Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
由 Peter Chen 提交于
After that, the role switch device (eg, Type-C device) could call cdns3_role_set to finish the role switch. Reviewed-by: NRoger Quadros <rogerq@ti.com> Signed-off-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-