- 21 May, 2018 34 commits
-
-
Felipe Balbi authored
No functional changes, it just makes the code slightly easier to read. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Code is just as readable without it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We can declare it inside list_for_each_entry_safe() loop and reduce its scope. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Misc cleanup. No functional changes. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We will only have event status of IOC when IOC bit is set in TRB. There's no need to check both bits. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We know that only OUT endpoints can trigger SHORT. We also know that count MUST be > 0 whenever SHORT triggers. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
This will make it easier to figure out the reason for the event. That information really helps debugging certain problems. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We can just call reclaim_trb_linear instead of reimplementing it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Minor cleanup, no functional changes. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We are trying to kick transfers on Isochronous endpoints in a more controlled manner now. And this ended up rendering this piece of code unnecessary. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
instead of having one big loop, let's split it down into two smaller handlers: one for linear buffers and one for scatterlist. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Just a minor simplification, no functional changes. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
After all the previous changes, it's now a lot clearer how isoc transfers should be managed. We don't need to try to End Transfers from ep_queue since that's already done by cleanup_requests. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Now, this part of the code is duplicated and brings no extra value to the driver. Let's remove it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
In case we get an event with status set to Missed Isoc, this means we have missed an isochronous interval and should issue End Transfer command and wait for the following XferNotReady. Let's do that early, rather than late. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
It's only written to, never read. We can remove it now. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We don't need to return a value anymore here. Let's remove it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
It has no use anymore. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
By now, it has the same semantics as DWC3_EP_TRANSFER_STARTED, but that has a much more descriptive name. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We will need an up-to-date frame_number from XferInProgress too when future patches improve our handling of Isoc endpoints. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
The core requires the extra two bits of information for properly scheduling Isochronous transfers. This means that we can't rely on __dwc3_gadget_get_frame(). Let's always cache uFrame number from XferNotReady instead. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Endpoint handlers need to know about endpoints, not dwc. If they really need access to dwc (e.g. for printing error messages) we have a reference to it tucked inside the endpoint. This patch has no functional changes, it's simply moving things around. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Cleanup only, no functional changes. Just making code easier to follow. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Cleanup only, no functional changes. This just matches the event name with its handler. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We *KNOW* which events we enable for which endpoint types and we *KNOW* when they'll trigger. The endpoint type checks are pointless. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
That has never proven useful in any way. Just remove it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
This patch simply renames two functions to more descriptive names so that it's easier to understand what they're doing. Cleanup only, no functional changes. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Instead of constantly calling kick transfer everything some event shows up, let's just rely on the fact that we send Update Transfer every time a new request is queued. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Now that we're making sure we don't have XferComplete events, we can rename this function to what it actually handles: dwc3_gadget_endpoint_transfer_in_progress() Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
XferComplete is enabled only for the default control pipe, let's make that clear in the code. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
We don't use XferNotReady for anything other than Default Control Pipe, which is handled in ep0.c, and Isochronous endpoints. Let's make that clear in the code. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Felipe Balbi authored
Interrupt endpoints behave much like Bulk endpoints with the exception that they are periodic. We can pre-issue Start Transfer exactly as we do for Bulk endpoints. While at that, remove one trailing blank line which is unnecessary. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Anurag Kumar Vulisha authored
The present code correctly fetches the req which were previously not queued from the started_list but fails to continue queuing from the sg where it previously stopped queuing (because of the unavailable TRB's). This patch correct's the code to continue queuing from the correct sg present in the sglist. For example, consider 5 sgs in req. Because of limited TRB's among the 5 sgs only 3 got queued. This patch corrects the code to start queuing from correct sg i.e 4th sg when the TRBs are available. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Anurag Kumar Vulisha authored
The code logic in dwc3_prepare_one_trb() incorrectly uses the address and length fields present in req packet for mapping TRB's instead of using the address and length fields of scattergather lists. This patch correct's the code to use sg->address and sg->length when scattergather lists are present. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
- 16 May, 2018 2 commits
-
-
Andrzej Hajda authored
extcon device is used to detect host/device connection. Since extcon OF property is deprecated, alternative method should be added. This method uses OF graph bindings to locate extcon. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Masahiro Yamada authored
Historically, the clocks and resets are handled on the glue layer side instead of the DWC3 core. For simple cases, dwc3-of-simple.c takes care of arbitrary number of clocks and resets. The DT node structure typically looks like as follows: dwc3-glue { compatible = "foo,dwc3"; clocks = ...; resets = ...; ... dwc3 { compatible = "snps,dwc3"; ... }; } By supporting the clocks and the reset in the dwc3/core.c, it will be turned into a single node: dwc3 { compatible = "foo,dwc3", "snps,dwc3"; clocks = ...; resets = ...; ... } This commit adds the binding of clocks and resets specific to this IP. The number of clocks should generally be the same across SoCs, it is just some SoCs either tie clocks together or do not provide software control of some of the clocks. I took the clock names from the Synopsys datasheet: "ref" (ref_clk), "bus_early" (bus_clk_early), and "suspend" (suspend_clk). I found only one reset line in the datasheet, hence the reset-names property is omitted. Those clocks are required for new platforms. Enforcing the new binding breaks existing platforms since they specify clocks (and resets) in their glue layer node, but nothing in the core node. I listed such exceptional cases in the DT binding. The driver code has been relaxed to accept no clock. This change is based on the discussion [1]. I inserted reset_control_deassert() and clk_bulk_enable() before the first register access, i.e. dwc3_cache_hwparams(). [1] https://patchwork.kernel.org/patch/10284265/Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
- 15 May, 2018 4 commits
-
-
Romain Izard authored
Fix the fallout of the conversion to GPIO descriptors in 3df03408. Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Romain Izard authored
The include defines the private platform_data structure used with AVR platforms. It has no user since 7c55984e. Remove it. Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Romain Izard authored
When converting to GPIO descriptors, gpiod_get_value automatically handles the line inversion flags from the device tree. Do not invert the line twice. Fixes: 3df03408 ("usb: gadget: udc: atmel: convert to use GPIO descriptors") Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-
Michel Pollet authored
A message can be forged to crash the stack; here we make sure we don't completely break the system if this occurs Signed-off-by: Michel Pollet <michel.pollet@bp.renesas.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-