<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/dwc2, branch master</title>
<subtitle>Linux Kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/linux.git/atom?h=master</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/'/>
<updated>2017-01-16T09:11:51+00:00</updated>
<entry>
<title>usb: dwc2: host: fix Wmaybe-uninitialized warning</title>
<updated>2017-01-16T09:11:51+00:00</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2017-01-12T16:33:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=efe357f4633a12ca89bdf9bbdd8aaf5a7a0cc3c0'/>
<id>urn:sha1:efe357f4633a12ca89bdf9bbdd8aaf5a7a0cc3c0</id>
<content type='text'>
Uninitialized char* causes a sparse build-warning, fix it up by
initializing it to NULL.

Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: Fix GUSBCFG.USBTRDTIM value</title>
<updated>2017-01-16T09:11:17+00:00</updated>
<author>
<name>Amelie Delaunay</name>
<email>amelie.delaunay@st.com</email>
</author>
<published>2017-01-12T15:09:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=ca02954ada711b08e5b0d84590a631fd63ed39f9'/>
<id>urn:sha1:ca02954ada711b08e5b0d84590a631fd63ed39f9</id>
<content type='text'>
USBTrdTim must be programmed to 0x5 when phy has a UTMI+ 16-bit wide
interface or 0x9 when it has a 8-bit wide interface.
GUSBCFG reset value (Value After Reset: 0x1400) sets USBTrdTim to 0x5.
In case of 8-bit UTMI+, without clearing GUSBCFG.USBTRDTIM mask, USBTrdTim
results in 0xD (0x5 | 0x9).
That's why we need to clear GUSBCFG.USBTRDTIM mask before setting USBTrdTim
value, to ensure USBTrdTim is correctly set in case of 8-bit UTMI+.

Signed-off-by: Amelie Delaunay &lt;amelie.delaunay@st.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Avoid suspending if we're in gadget mode</title>
<updated>2017-01-12T08:02:48+00:00</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2017-01-09T21:10:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=866932e2771f35d20ed2f1865bcf6af8dba765bb'/>
<id>urn:sha1:866932e2771f35d20ed2f1865bcf6af8dba765bb</id>
<content type='text'>
I've found when booting HiKey with the usb gadget cable attached
if I then try to connect via adb, I get an infinite spew of:

dwc2 f72c0000.usb: dwc2_hsotg_ep_sethalt(ep ffffffc0790ecb18 ep1out, 0)
dwc2 f72c0000.usb: dwc2_hsotg_ep_sethalt(ep ffffffc0790eca18 ep1in, 0)

It seems that the usb autosuspend is suspending the bus shortly
after bootup when the gadget cable is attached. So when adbd
then tries to use the device, it doesn't work and it then tries
to restart it over and over via the ep_sethalt calls (via
FUNCTIONFS_CLEAR_HALT ioctl).

Chen Yu suggested this patch to avoid suspending if we're
in device mode, and it avoids the problem.

Cc: Wei Xu &lt;xuwei5@hisilicon.com&gt;
Cc: Guodong Xu &lt;guodong.xu@linaro.org&gt;
Cc: Amit Pundir &lt;amit.pundir@linaro.org&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: John Youn &lt;johnyoun@synopsys.com&gt;
Cc: Douglas Anderson &lt;dianders@chromium.org&gt;
Cc: Chen Yu &lt;chenyu56@huawei.com&gt;
Cc: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Cc: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: linux-usb@vger.kernel.org
Suggested-by: Chen Yu &lt;chenyu56@huawei.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: use u32 for DT binding parameters</title>
<updated>2017-01-12T08:02:20+00:00</updated>
<author>
<name>Leo Yan</name>
<email>leo.yan@linaro.org</email>
</author>
<published>2017-01-09T21:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=b2f92f0ff0a26a6d758ce85167a77d7d1268ca36'/>
<id>urn:sha1:b2f92f0ff0a26a6d758ce85167a77d7d1268ca36</id>
<content type='text'>
Commit 05ee799f2021 ("usb: dwc2: Move gadget settings into core_params")
changes to type u16 for DT binding "g-rx-fifo-size" and
"g-np-tx-fifo-size" but use type u32 for "g-tx-fifo-size". Finally the
the first two parameters cannot be passed successfully with wrong data
format. This is found the data transferring broken on 96boards Hikey.

This patch is to change all parameters to u32 type, and verified on
Hikey board the DT parameters can pass successfully.

[johnyoun: minor rebase]

Signed-off-by: Leo Yan &lt;leo.yan@linaro.org&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Tested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: Fix DMA memory freeing</title>
<updated>2017-01-12T07:58:52+00:00</updated>
<author>
<name>Vardan Mikayelyan</name>
<email>mvardan@synopsys.com</email>
</author>
<published>2017-01-06T02:01:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=9383e084a88d04d442ea2dce128edff05f344e5c'/>
<id>urn:sha1:9383e084a88d04d442ea2dce128edff05f344e5c</id>
<content type='text'>
Remove DMA memory free from EP disable flow by replacing
dma_alloc_coherent with dmam_alloc_coherent.

Tested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Vardan Mikayelyan &lt;mvardan@synopsys.com&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: fix flags for DMA descriptor allocation in dwc2_hsotg_ep_enable</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2016-12-01T09:02:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=86e881e7d769f40bd5ed08677e503bc15d89dec6'/>
<id>urn:sha1:86e881e7d769f40bd5ed08677e503bc15d89dec6</id>
<content type='text'>
dwc2_hsotg_ep_enable can be called from interrupt context, so all
allocations should be done with GFP_ATOMIC flags. This fixes following
issue on ARM architecture:

[&lt;c010d830&gt;] (unwind_backtrace) from [&lt;c010a51c&gt;] (show_stack+0x10/0x14)
[&lt;c010a51c&gt;] (show_stack) from [&lt;c032930c&gt;] (dump_stack+0x74/0x94)
[&lt;c032930c&gt;] (dump_stack) from [&lt;c011cd30&gt;] (__warn+0xd4/0x100)
[&lt;c011cd30&gt;] (__warn) from [&lt;c011cd7c&gt;] (warn_slowpath_null+0x20/0x28)
[&lt;c011cd7c&gt;] (warn_slowpath_null) from [&lt;c0187e04&gt;] (smp_call_function_many+0xcc/0x2a4)
[&lt;c0187e04&gt;] (smp_call_function_many) from [&lt;c0188014&gt;] (on_each_cpu_mask+0x38/0xa8)
[&lt;c0188014&gt;] (on_each_cpu_mask) from [&lt;c01ddfe0&gt;] (start_isolate_page_range+0x134/0x1b8)
[&lt;c01ddfe0&gt;] (start_isolate_page_range) from [&lt;c01a3c14&gt;] (alloc_contig_range+0xac/0x2f8)
[&lt;c01a3c14&gt;] (alloc_contig_range) from [&lt;c01de3e4&gt;] (cma_alloc+0xe0/0x1a8)
[&lt;c01de3e4&gt;] (cma_alloc) from [&lt;c0110acc&gt;] (__alloc_from_contiguous+0x38/0xe0)
[&lt;c0110acc&gt;] (__alloc_from_contiguous) from [&lt;c0110ba4&gt;] (cma_allocator_alloc+0x30/0x38)
[&lt;c0110ba4&gt;] (cma_allocator_alloc) from [&lt;c0111034&gt;] (__dma_alloc+0x1c0/0x2c8)
[&lt;c0111034&gt;] (__dma_alloc) from [&lt;c01111b4&gt;] (arm_dma_alloc+0x3c/0x48)
[&lt;c01111b4&gt;] (arm_dma_alloc) from [&lt;c04ad800&gt;] (dwc2_hsotg_ep_enable+0xec/0x46c)
[&lt;c04ad800&gt;] (dwc2_hsotg_ep_enable) from [&lt;c04da610&gt;] (usb_ep_enable+0x2c/0x3c)
[&lt;c04da610&gt;] (usb_ep_enable) from [&lt;c04dc0c0&gt;] (ecm_set_alt+0xa8/0x154)
[&lt;c04dc0c0&gt;] (ecm_set_alt) from [&lt;c04d678c&gt;] (composite_setup+0xd74/0x1540)
[&lt;c04d678c&gt;] (composite_setup) from [&lt;c04ae048&gt;] (dwc2_hsotg_complete_setup+0xb8/0x370)
[&lt;c04ae048&gt;] (dwc2_hsotg_complete_setup) from [&lt;c04d987c&gt;] (usb_gadget_giveback_request+0xc/0x10)
[&lt;c04d987c&gt;] (usb_gadget_giveback_request) from [&lt;c04acafc&gt;] (dwc2_hsotg_complete_request+0x78/0x128)
[&lt;c04acafc&gt;] (dwc2_hsotg_complete_request) from [&lt;c04aed28&gt;] (dwc2_hsotg_epint+0x69c/0x81c)
[&lt;c04aed28&gt;] (dwc2_hsotg_epint) from [&lt;c04af6c4&gt;] (dwc2_hsotg_irq+0xfc/0x748)
[&lt;c04af6c4&gt;] (dwc2_hsotg_irq) from [&lt;c0163264&gt;] (__handle_irq_event_percpu+0x58/0x140)
[&lt;c0163264&gt;] (__handle_irq_event_percpu) from [&lt;c0163368&gt;] (handle_irq_event_percpu+0x1c/0x58)
[&lt;c0163368&gt;] (handle_irq_event_percpu) from [&lt;c01633dc&gt;] (handle_irq_event+0x38/0x5c)
[&lt;c01633dc&gt;] (handle_irq_event) from [&lt;c01666e4&gt;] (handle_fasteoi_irq+0xc4/0x19c)
[&lt;c01666e4&gt;] (handle_fasteoi_irq) from [&lt;c0162a2c&gt;] (generic_handle_irq+0x18/0x28)
[&lt;c0162a2c&gt;] (generic_handle_irq) from [&lt;c0162b40&gt;] (__handle_domain_irq+0x6c/0xe4)
[&lt;c0162b40&gt;] (__handle_domain_irq) from [&lt;c0101470&gt;] (gic_handle_irq+0x50/0x9c)
[&lt;c0101470&gt;] (gic_handle_irq) from [&lt;c010b00c&gt;] (__irq_svc+0x6c/0xa8)

Fixes: 5f54c54b0ba83 ("usb: dwc2: gadget: Add DDMA chain pointers to
	dwc2_hsotg_ep structure")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: fix default value for gadget-dma-desc</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@i2se.com</email>
</author>
<published>2016-11-20T21:26:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=efc95b2ca42424de222119a3a260624f3a050f8e'/>
<id>urn:sha1:efc95b2ca42424de222119a3a260624f3a050f8e</id>
<content type='text'>
The current default for gadget DMA descriptor results on bcm2835 in a
unnecessary error message:

  Invalid value 1 for param gadget-dma-desc

So fix this by using hw-&gt;dma_desc_enable as default value.

Fixes: dec4b55677e ("usb: dwc2: gadget: Add descriptor DMA parameter")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: fix default value for DMA support</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@i2se.com</email>
</author>
<published>2016-11-20T21:26:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=6118d0647b10eaca06b278dee2022602d8f2f07a'/>
<id>urn:sha1:6118d0647b10eaca06b278dee2022602d8f2f07a</id>
<content type='text'>
The current defaults for DMA results on a non-DMA platform in a unnecessary
error message:

  Invalid value 0 for param gadget-dma

So fix this by using dma_capable as default value.

Fixes: 9962b62f1be ("usb: dwc2: Deprecate g-use-dma binding")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: fix dwc2_get_device_property for u8 and u16</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@i2se.com</email>
</author>
<published>2016-11-20T21:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=de02238d6a7982a71682fe8da2996993a5a5eee7'/>
<id>urn:sha1:de02238d6a7982a71682fe8da2996993a5a5eee7</id>
<content type='text'>
According to the Devicetree ePAPR [1] the datatypes u8 and u16 are
not defined. So using device_property_read_u16() would result in
a partial read of a 32-bit big-endian integer which is not intended.
So we better read the complete 32-bit value. This fixes a regression
on bcm2835 where the values for g-rx-fifo-size and g-np-tx-fifo-size
always read as zero:

  Invalid value 0 for param g-rx-fifo-size
  Invalid value 0 for param g-np-tx-fifo-size

[1] - http://elinux.org/images/c/cf/Power_ePAPR_APPROVED_v1.1.pdf

Fixes: 05ee799f202 ("usb: dwc2: Move gadget settings into core_params")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Do not set host parameter in peripheral mode</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@i2se.com</email>
</author>
<published>2016-11-20T21:26:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=f3419735279564d40467ebe4147d8a41cef00685'/>
<id>urn:sha1:f3419735279564d40467ebe4147d8a41cef00685</id>
<content type='text'>
Since commit "usb: dwc2: Improve handling of host and device hwparams" the
host mode specific hardware parameter aren't initialized in peripheral mode
from the register settings anymore. So we better do not set them in this
case which avoids the following warnings on bcm2835:

  256 invalid for host_nperio_tx_fifo_size. Check HW configuration.
  512 invalid for host_perio_tx_fifo_size. Check HW configuration.

Fixes: 55e1040e424b ("usb: dwc2: Improve handling of host and device hwparams")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
</feed>
