<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/usb, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/'/>
<entry>
<title>xhci: translate virtual addresses into the bus's address space</title>
<updated>2021-02-18T10:56:26+00:00</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenzjulienne@suse.de</email>
</author>
<published>2021-01-12T12:55:28+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=1a474559d90a4b4f7acd95050fe759fe52395867'/>
<id>1a474559d90a4b4f7acd95050fe759fe52395867</id>
<content type='text'>
So far we've been content with passing physical addresses when
configuring memory addresses into XHCI controllers, but not all
platforms have buses with transparent mappings. Specifically the
Raspberry Pi 4 might introduce an offset to memory accesses incoming
from its PCIe port.

Introduce xhci_virt_to_bus() and xhci_bus_to_virt() to cater with these
limitations, and make sure we don't break non DM users.

Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
[mb: fix compilation for 32 bit]
Signed-off-by: Matthias Brugger &lt;mbrugger@suse.com&gt;

fix from nicolas
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So far we've been content with passing physical addresses when
configuring memory addresses into XHCI controllers, but not all
platforms have buses with transparent mappings. Specifically the
Raspberry Pi 4 might introduce an offset to memory accesses incoming
from its PCIe port.

Introduce xhci_virt_to_bus() and xhci_bus_to_virt() to cater with these
limitations, and make sure we don't break non DM users.

Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
[mb: fix compilation for 32 bit]
Signed-off-by: Matthias Brugger &lt;mbrugger@suse.com&gt;

fix from nicolas
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: add "u-boot,force-vbus-detection" for stm32</title>
<updated>2020-11-22T12:18:20+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@st.com</email>
</author>
<published>2020-10-15T12:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=5739ef2bcb6dc04414d9a06063d4c85e793884ba'/>
<id>5739ef2bcb6dc04414d9a06063d4c85e793884ba</id>
<content type='text'>
On some board, the ID pin is not connected so the B session must be
overridden with "u-boot,force_b_session_valid" but the VBus sensing
must continue to be handle.

To managed it, this patch adds a new DT field
"u-boot,force-vbus-detection" to use with "u-boot,force_b_session_valid"

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On some board, the ID pin is not connected so the B session must be
overridden with "u-boot,force_b_session_valid" but the VBus sensing
must continue to be handle.

To managed it, this patch adds a new DT field
"u-boot,force-vbus-detection" to use with "u-boot,force_b_session_valid"

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: use macros with parameter to fill ep_info2</title>
<updated>2020-10-01T17:43:05+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-09-08T17:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=23a54ccfb6da1c011c42359b2d20928617928902'/>
<id>23a54ccfb6da1c011c42359b2d20928617928902</id>
<content type='text'>
Use macros with parameter to fill ep_info2, then some macros
for MASK and SHIFT can be removed

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use macros with parameter to fill ep_info2, then some macros
for MASK and SHIFT can be removed

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: convert to TRB_TX_TYPE()</title>
<updated>2020-10-01T17:43:05+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-09-08T17:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=bf58cf9ab1bf13654815d9db35d73c16d4651609'/>
<id>bf58cf9ab1bf13654815d9db35d73c16d4651609</id>
<content type='text'>
Use TRB_TX_TYPE() instead of (TRB_DATA_OUT/IN &lt;&lt; TRB_TX_TYPE_SHIFT)

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use TRB_TX_TYPE() instead of (TRB_DATA_OUT/IN &lt;&lt; TRB_TX_TYPE_SHIFT)

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: convert to TRB_LEN() and TRB_INTR_TARGET()</title>
<updated>2020-10-01T17:43:05+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-09-08T17:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=4312638eaf7f0bd29ffa8c7957bd51c5eb7d5a32'/>
<id>4312638eaf7f0bd29ffa8c7957bd51c5eb7d5a32</id>
<content type='text'>
For normal TRB fields:
use TRB_LEN(x) instead of ((x) &amp; TRB_LEN_MASK);
and use TRB_INTR_TARGET(x) instead of
(((x) &amp; TRB_INTR_TARGET_MASK) &lt;&lt; TRB_INTR_TARGET_SHIFT)

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For normal TRB fields:
use TRB_LEN(x) instead of ((x) &amp; TRB_LEN_MASK);
and use TRB_INTR_TARGET(x) instead of
(((x) &amp; TRB_INTR_TARGET_MASK) &lt;&lt; TRB_INTR_TARGET_SHIFT)

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: convert to TRB_TYPE()</title>
<updated>2020-10-01T17:43:05+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-09-08T16:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=a826d76f2bab971b293b4ba6bf45b81871051383'/>
<id>a826d76f2bab971b293b4ba6bf45b81871051383</id>
<content type='text'>
Use TRB_TYPE(p) instead of ((p) &lt;&lt; TRB_TYPE_SHIFT)

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use TRB_TYPE(p) instead of ((p) &lt;&lt; TRB_TYPE_SHIFT)

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: convert to HCS_MAX_PORTS()</title>
<updated>2020-10-01T17:43:05+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-09-08T16:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=86d1fa17fb91d2579ed059db0125a198c7a388fd'/>
<id>86d1fa17fb91d2579ed059db0125a198c7a388fd</id>
<content type='text'>
Use HCS_MAX_PORTS(p) instead of
((p &amp; HCS_MAX_PORTS_MASK) &gt;&gt; HCS_MAX_PORTS_SHIFT)

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use HCS_MAX_PORTS(p) instead of
((p &amp; HCS_MAX_PORTS_MASK) &gt;&gt; HCS_MAX_PORTS_SHIFT)

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: add quirks flag to support MediaTek xHCI 0.96</title>
<updated>2020-10-01T17:43:05+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-09-08T16:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=740820519c69d84b320199a8a4348e47c447ebfb'/>
<id>740820519c69d84b320199a8a4348e47c447ebfb</id>
<content type='text'>
There some vendor quirks for MTK xHCI 0.96 host controller:
1. It defines some extra SW scheduling parameters for HW
   to minimize the scheduling effort for synchronous and
   interrupt endpoints. The parameters are put into reserved
   DWs of slot context and endpoint context.
2. Its TDS in  Normal TRB defines a number of packets that
   remains to be transferred for a TD after processing all
   Max packets in all previous TRBs.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Tested-by: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There some vendor quirks for MTK xHCI 0.96 host controller:
1. It defines some extra SW scheduling parameters for HW
   to minimize the scheduling effort for synchronous and
   interrupt endpoints. The parameters are put into reserved
   DWs of slot context and endpoint context.
2. Its TDS in  Normal TRB defines a number of packets that
   remains to be transferred for a TD after processing all
   Max packets in all previous TRBs.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Tested-by: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: create one unified function to calculate TRB TD remainder</title>
<updated>2020-10-01T17:43:05+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-09-08T16:59:56+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=e3ea481bee1fbc8f090f46c38354838a64958af4'/>
<id>e3ea481bee1fbc8f090f46c38354838a64958af4</id>
<content type='text'>
xhci versions 1.0 and later report the untransferred data remaining in a
TD a bit differently than older hosts.

We used to have separate functions for these, and needed to check host
version before calling the right function.

Now Mediatek host has an additional quirk on how it uses the TD Size
field for remaining data. To prevent yet another function for calculating
remainder we instead want to make one quirk friendly unified function.

Porting from the Linux:
c840d6ce772d("xhci: create one unified function to calculate TRB TD remainder.")
124c39371114("xhci: use boolean to indicate last trb in td remainder calculation")

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
xhci versions 1.0 and later report the untransferred data remaining in a
TD a bit differently than older hosts.

We used to have separate functions for these, and needed to check host
version before calling the right function.

Now Mediatek host has an additional quirk on how it uses the TD Size
field for remaining data. To prevent yet another function for calculating
remainder we instead want to make one quirk friendly unified function.

Porting from the Linux:
c840d6ce772d("xhci: create one unified function to calculate TRB TD remainder.")
124c39371114("xhci: use boolean to indicate last trb in td remainder calculation")

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: xhci: add a member hci_version in xhci_ctrl struct</title>
<updated>2020-10-01T17:43:05+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2020-09-08T16:59:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=719d7d8df41d2f20be599c38c3ab3e7a904c92c6'/>
<id>719d7d8df41d2f20be599c38c3ab3e7a904c92c6</id>
<content type='text'>
Add a member to save xHCI version, it's used some times.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a member to save xHCI version, it's used some times.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
