<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/usb/musb/musb_cppi41.c, branch v4.4.79</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer</title>
<updated>2017-03-30T07:35:17+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2017-03-10T20:43:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=47285be050ca3e9ca45f22966b0b655b5b83c250'/>
<id>47285be050ca3e9ca45f22966b0b655b5b83c250</id>
<content type='text'>
commit 0090114d336a9604aa2d90bc83f20f7cd121b76c upstream.

The CPPI 4.1 driver polls register to workaround the premature TX
interrupt issue, but it causes audio playback underrun when triggered in
Isoch transfers.

Isoch doesn't do back-to-back transfers, the TX should be done by the
time the next transfer is scheduled. So skip this polling workaround for
Isoch transfer.

Fixes: a655f481d83d6 ("usb: musb: musb_cppi41: handle pre-mature TX complete interrupt")
Reported-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Acked-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Tested-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0090114d336a9604aa2d90bc83f20f7cd121b76c upstream.

The CPPI 4.1 driver polls register to workaround the premature TX
interrupt issue, but it causes audio playback underrun when triggered in
Isoch transfers.

Isoch doesn't do back-to-back transfers, the TX should be done by the
time the next transfer is scheduled. So skip this polling workaround for
Isoch transfer.

Fixes: a655f481d83d6 ("usb: musb: musb_cppi41: handle pre-mature TX complete interrupt")
Reported-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Acked-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Tested-by: Alexandre Bailon &lt;abailon@baylibre.com&gt;
Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: fix cppi channel teardown for isoch transfer</title>
<updated>2015-09-21T19:42:36+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2015-08-24T20:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b431ba8803666e56c1d178a421b3cbc36e8d3d33'/>
<id>b431ba8803666e56c1d178a421b3cbc36e8d3d33</id>
<content type='text'>
After a few iterations of start/stop UVC camera streaming, the streaming
stops.

This patch adds 250us delay in the cppi channel abort path to let cppi
drain properly.

Using 50us delay seems to be too aggressive, some webcams are still
broken. 250us is the original value used in TI 3.2 kernel.

Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After a few iterations of start/stop UVC camera streaming, the streaming
stops.

This patch adds 250us delay in the cppi channel abort path to let cppi
drain properly.

Using 50us delay seems to be too aggressive, some webcams are still
broken. 250us is the original value used in TI 3.2 kernel.

Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: cppi41: allow it to work again</title>
<updated>2015-08-06T15:51:29+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2015-08-06T15:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b0a688ddcc5015eb26000c63841db7c46cfb380a'/>
<id>b0a688ddcc5015eb26000c63841db7c46cfb380a</id>
<content type='text'>
since commit 33c300cb90a6 ("usb: musb: dsps:
don't fake of_node to musb core") we have been
preventing CPPI 4.1 from probing due to NULL
of_node. We can't revert said commit otherwise
a different regression would show up, so the fix
is to look for the parent device's (glue layer's)
of_node instead, since that's the thing which
is actually described in DTS.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since commit 33c300cb90a6 ("usb: musb: dsps:
don't fake of_node to musb core") we have been
preventing CPPI 4.1 from probing due to NULL
of_node. We can't revert said commit otherwise
a different regression would show up, so the fix
is to look for the parent device's (glue layer's)
of_node instead, since that's the thing which
is actually described in DTS.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: Set up function pointers for DMA</title>
<updated>2015-05-07T18:35:51+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2015-05-01T19:29:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7f6283ed6fe867ce168ee3eea2ced4f6cdeeb37a'/>
<id>7f6283ed6fe867ce168ee3eea2ced4f6cdeeb37a</id>
<content type='text'>
Set up function pointers for DMA so get closer to
being able to build in all the DMA engines.

Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set up function pointers for DMA so get closer to
being able to build in all the DMA engines.

Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: cppi41: fix condition to call cppi41_trans_done().</title>
<updated>2015-03-11T16:34:37+00:00</updated>
<author>
<name>Takeyoshi Kikuchi</name>
<email>kikuchi@centurysys.co.jp</email>
</author>
<published>2015-03-02T02:03:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=72a472d2f912292457d6e3579df342c1138f26d5'/>
<id>72a472d2f912292457d6e3579df342c1138f26d5</id>
<content type='text'>
connect AR9271(USB wifi) to AM335x, and send a flood ping from Mac OSX,
AR9271 is stopped.

on USB bus, the following occurs.

 - OUT transaction is ACKed (NYET).
 - IN transaction is ACKed (512bytes).
 - PING-NAK transaction is continued for about 2 seconds (AR9271 timeout?).

In current imprementation, IN-transaction is not completed because it
checks the empty of TX-FIFO in cppi41_dma_callback().
As a result, communication to AR9271 stops.

This patch modified to check the empty of TX-FIFO only when OUT-transaction.

Signed-off-by: Takeyoshi Kikuchi &lt;kikuchi@centurysys.co.jp&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
connect AR9271(USB wifi) to AM335x, and send a flood ping from Mac OSX,
AR9271 is stopped.

on USB bus, the following occurs.

 - OUT transaction is ACKed (NYET).
 - IN transaction is ACKed (512bytes).
 - PING-NAK transaction is continued for about 2 seconds (AR9271 timeout?).

In current imprementation, IN-transaction is not completed because it
checks the empty of TX-FIFO in cppi41_dma_callback().
As a result, communication to AR9271 stops.

This patch modified to check the empty of TX-FIFO only when OUT-transaction.

Signed-off-by: Takeyoshi Kikuchi &lt;kikuchi@centurysys.co.jp&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: cppi41: do not call udelay()</title>
<updated>2015-03-10T20:33:32+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2015-02-27T19:22:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=043f5b75dd2b1fbd45d5f367d50e5ae5b4afa955'/>
<id>043f5b75dd2b1fbd45d5f367d50e5ae5b4afa955</id>
<content type='text'>
according to comment in code, HS completion
will happen pretty fast, instead of using
udelay(), let's just busy loop and drop a
cpu_relax() where udelay() was.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
according to comment in code, HS completion
will happen pretty fast, instead of using
udelay(), let's just busy loop and drop a
cpu_relax() where udelay() was.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: cppi41: exit early when tx fifo is empty</title>
<updated>2015-03-10T20:33:32+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2015-02-27T19:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=af63429cf046210d7313805b579dd779d10ad1c0'/>
<id>af63429cf046210d7313805b579dd779d10ad1c0</id>
<content type='text'>
as soon as we find out tx fifo is empty, there's
no need to break out of the loop just to have another
branch to complete the transfer. We can just complete
transfer and exit early.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as soon as we find out tx fifo is empty, there's
no need to break out of the loop just to have another
branch to complete the transfer. We can just complete
transfer and exit early.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: cppi41: decrease indentation level</title>
<updated>2015-03-10T20:33:32+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2015-02-27T19:19:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1b61625f8b5d87caf9633d7dbfbaf1ea8270036d'/>
<id>1b61625f8b5d87caf9633d7dbfbaf1ea8270036d</id>
<content type='text'>
no functional changes, clean up only.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
no functional changes, clean up only.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: cppi41: improve rx channel abort routine</title>
<updated>2015-01-27T15:34:58+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2015-01-26T22:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cb83df77f3ec151d68a1b6be957207e6fc7b7f50'/>
<id>cb83df77f3ec151d68a1b6be957207e6fc7b7f50</id>
<content type='text'>
1. set AUTOREQ to NONE at the beginning of teardown;

2. add delay for dma pipeline to drain;

3. Do not set USB_TDOWN bit for RX teardown.

  The CPPI hw has an issue that when tearing down a RX channel, if
  another RX channel is receiving data, the CPPI will lockup.

  To workaround the issue, do not set the CPPI TD bit. The steps before
  this point ensures the CPPI channel will be torn down properly.

Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. set AUTOREQ to NONE at the beginning of teardown;

2. add delay for dma pipeline to drain;

3. Do not set USB_TDOWN bit for RX teardown.

  The CPPI hw has an issue that when tearing down a RX channel, if
  another RX channel is receiving data, the CPPI will lockup.

  To workaround the issue, do not set the CPPI TD bit. The steps before
  this point ensures the CPPI channel will be torn down properly.

Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: musb: cppi41: correct the macro name EP_MODE_AUTOREG_*</title>
<updated>2015-01-27T15:34:58+00:00</updated>
<author>
<name>Bin Liu</name>
<email>b-liu@ti.com</email>
</author>
<published>2015-01-26T22:22:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0149b07a9e28b0d8bd2fc1c238ffe7d530c2673f'/>
<id>0149b07a9e28b0d8bd2fc1c238ffe7d530c2673f</id>
<content type='text'>
The macro EP_MODE_AUTOREG_* should be called EP_MODE_AUTOREQ_*, as they
are used for register AUTOREQ.

Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macro EP_MODE_AUTOREG_* should be called EP_MODE_AUTOREQ_*, as they
are used for register AUTOREQ.

Signed-off-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
