<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/serial, branch v2023.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>risc-v: implement DBCN based debug console</title>
<updated>2023-09-05T02:53:55+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-09-04T11:24:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dfe08374943c0e898fcfaf7327f69e0fb56b7d23'/>
<id>dfe08374943c0e898fcfaf7327f69e0fb56b7d23</id>
<content type='text'>
Use the DBCN SBI extension to implement a debug console.
Make it the default for S-mode RISC-V.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Leo Yu-Chi Liang &lt;ycliang@andestech.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the DBCN SBI extension to implement a debug console.
Make it the default for S-mode RISC-V.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Leo Yu-Chi Liang &lt;ycliang@andestech.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: stm32: extend TC timeout</title>
<updated>2023-08-16T13:38:23+00:00</updated>
<author>
<name>Valentin Caron</name>
<email>valentin.caron@foss.st.com</email>
</author>
<published>2023-08-04T14:09:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9e8cbea1a74516235820ccd50d513c961e43cb70'/>
<id>9e8cbea1a74516235820ccd50d513c961e43cb70</id>
<content type='text'>
Waiting 150us TC bit couldn't be enough.

If TFA lets 16 bits in USART fifo, we has to wait 16 times 87 us (time
of 10 bits (1 byte in most use cases) at a baud rate of 115200).

Fixes: b4dbc5d65a67 ("serial: stm32: Wait TC bit before performing initialization")

Signed-off-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Waiting 150us TC bit couldn't be enough.

If TFA lets 16 bits in USART fifo, we has to wait 16 times 87 us (time
of 10 bits (1 byte in most use cases) at a baud rate of 115200).

Fixes: b4dbc5d65a67 ("serial: stm32: Wait TC bit before performing initialization")

Signed-off-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: mtk: initial priv data before using</title>
<updated>2023-08-03T13:40:49+00:00</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2023-07-19T09:16:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0fd96bf224c1af7f8fc3bbdc814eba0349d0c334'/>
<id>0fd96bf224c1af7f8fc3bbdc814eba0349d0c334</id>
<content type='text'>
This patch ensures driver private data being fully initialized in
_debug_uart_init which is not covered by .priv_auto ops.

Signed-off-by: Sam Shih &lt;sam.shih@mediatek.com&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch ensures driver private data being fully initialized in
_debug_uart_init which is not covered by .priv_auto ops.

Signed-off-by: Sam Shih &lt;sam.shih@mediatek.com&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: pl01x: Modify pending callback to test if transmit FIFO is empty</title>
<updated>2023-07-11T12:40:04+00:00</updated>
<author>
<name>Lukasz Majewski</name>
<email>lukma@denx.de</email>
</author>
<published>2023-05-19T10:43:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a21789194873d768ba829eb0169c7f0e3ceb85ef'/>
<id>a21789194873d768ba829eb0169c7f0e3ceb85ef</id>
<content type='text'>
Before this change the FR_TXFF (Transmit FIFO full) bit (5 in
HW_UARTDBG_FR) has been used to assess if there is still data pending
to be sent via UART.

This approach is problematic, as it may happen that serial is in the
middle of transmission (so the TX FIFO is NOT full anymore) and this
test returns true infinitely. As a result, for example in _serial_flush()
DM serial function we are locked in endless while().

The fix here is to test explicitly if the TX FIFO is empty.

Signed-off-by: Lukasz Majewski &lt;lukma@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this change the FR_TXFF (Transmit FIFO full) bit (5 in
HW_UARTDBG_FR) has been used to assess if there is still data pending
to be sent via UART.

This approach is problematic, as it may happen that serial is in the
middle of transmission (so the TX FIFO is NOT full anymore) and this
test returns true infinitely. As a result, for example in _serial_flush()
DM serial function we are locked in endless while().

The fix here is to test explicitly if the TX FIFO is empty.

Signed-off-by: Lukasz Majewski &lt;lukma@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA</title>
<updated>2023-07-11T12:40:04+00:00</updated>
<author>
<name>Lukasz Majewski</name>
<email>lukma@denx.de</email>
</author>
<published>2023-05-19T10:43:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=875752adc8b6a25ebaf9f45cb3fd206065a80f0e'/>
<id>875752adc8b6a25ebaf9f45cb3fd206065a80f0e</id>
<content type='text'>
This commit prepares the pl01x serial driver to be used with
SPL_OF_PLATDATA enabled.

Signed-off-by: Lukasz Majewski &lt;lukma@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit prepares the pl01x serial driver to be used with
SPL_OF_PLATDATA enabled.

Signed-off-by: Lukasz Majewski &lt;lukma@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: pl01x: Change OF_CONTROL to OF_REAL</title>
<updated>2023-07-11T12:40:04+00:00</updated>
<author>
<name>Lukasz Majewski</name>
<email>lukma@denx.de</email>
</author>
<published>2023-05-19T10:43:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fdef5e1502a6b847acf3252c0f21739a3a4e181c'/>
<id>fdef5e1502a6b847acf3252c0f21739a3a4e181c</id>
<content type='text'>
Before this change, building this driver for SPL with enabled SPL_DM_SERIAL
was problematic, as '-Wunused-const-variable=' warning was visible.

Now, the code is only considered when u-boot proper is build.

Signed-off-by: Lukasz Majewski &lt;lukma@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this change, building this driver for SPL with enabled SPL_DM_SERIAL
was problematic, as '-Wunused-const-variable=' warning was visible.

Now, the code is only considered when u-boot proper is build.

Signed-off-by: Lukasz Majewski &lt;lukma@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: stm32: BRR must be set only when usart is disable</title>
<updated>2023-06-16T09:29:29+00:00</updated>
<author>
<name>Patrice Chotard</name>
<email>patrice.chotard@foss.st.com</email>
</author>
<published>2023-05-31T06:01:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8ab9e8ffdf0977ce5101a4d71b75655667eced5e'/>
<id>8ab9e8ffdf0977ce5101a4d71b75655667eced5e</id>
<content type='text'>
To avoid spurious chars, BRR register must only be written when
USART is disabled.

Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid spurious chars, BRR register must only be written when
USART is disabled.

Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: stm32: Wait TC bit before performing initialization</title>
<updated>2023-06-16T09:29:29+00:00</updated>
<author>
<name>Patrice Chotard</name>
<email>patrice.chotard@foss.st.com</email>
</author>
<published>2023-05-31T06:01:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b4dbc5d65a67456db9cfe874d123e1c87860301d'/>
<id>b4dbc5d65a67456db9cfe874d123e1c87860301d</id>
<content type='text'>
In case there is still chars from previous bootstage to transmit, wait
for TC (Transmission Complete) bit to be set which ensure that the last
data written in the USART_TDR has been transmitted out of the shift
register.

Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case there is still chars from previous bootstage to transmit, wait
for TC (Transmission Complete) bit to be set which ensure that the last
data written in the USART_TDR has been transmitted out of the shift
register.

Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: meson: fix meson_serial_pending() tx logic</title>
<updated>2023-06-07T08:09:20+00:00</updated>
<author>
<name>Mattijs Korpershoek</name>
<email>mkorpershoek@baylibre.com</email>
</author>
<published>2023-06-06T16:07:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=afa85a2247297d660a63295bfbdd6e24e8e56902'/>
<id>afa85a2247297d660a63295bfbdd6e24e8e56902</id>
<content type='text'>
According to the dm_serial_ops documentation, pending() should:
&gt; @return number of waiting characters, 0 for none, -ve on error

And:
&gt; It is acceptable to return 1 if an indeterminant number
&gt; of characters is waiting.

With the current implementation, we have:
* FIFO is full           -&gt; pending() returns 0
* FIFO is partially used -&gt; pending() returns 1
* FIFO is empty          -&gt; pending() returns 1

This is not the same as what the documentation requires.

Moreover, since [1], arm reset now flushes all console devices
(including serial) before the cpu gets reset.
Because of the flawed logic:

  =&gt; reset # user calls reset
  flush() is called
  _serial_flush() is called
  ops-&gt;pending(dev, false) # never returns false
  # board hangs indefinitely without resetting.

Fix it by using AML_UART_TX_EMPTY instead of AML_UART_TX_FULL.

[1] commit c5f4cdb8eb60 ("console: Use flush() before panic and reset"),

Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Acked-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20230606-fix-meson-serial-pending-v1-1-6a54d4a01f76@baylibre.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the dm_serial_ops documentation, pending() should:
&gt; @return number of waiting characters, 0 for none, -ve on error

And:
&gt; It is acceptable to return 1 if an indeterminant number
&gt; of characters is waiting.

With the current implementation, we have:
* FIFO is full           -&gt; pending() returns 0
* FIFO is partially used -&gt; pending() returns 1
* FIFO is empty          -&gt; pending() returns 1

This is not the same as what the documentation requires.

Moreover, since [1], arm reset now flushes all console devices
(including serial) before the cpu gets reset.
Because of the flawed logic:

  =&gt; reset # user calls reset
  flush() is called
  _serial_flush() is called
  ops-&gt;pending(dev, false) # never returns false
  # board hangs indefinitely without resetting.

Fix it by using AML_UART_TX_EMPTY instead of AML_UART_TX_FULL.

[1] commit c5f4cdb8eb60 ("console: Use flush() before panic and reset"),

Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Acked-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20230606-fix-meson-serial-pending-v1-1-6a54d4a01f76@baylibre.com
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: mxs: Add MXS AUART driver</title>
<updated>2023-05-21T14:54:41+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2023-05-06T14:43:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ff476897ed698eae1fa439d52b30694a2b40464a'/>
<id>ff476897ed698eae1fa439d52b30694a2b40464a</id>
<content type='text'>
Add trivial driver for the MXS AUART IP. This is the other UART IP
present in i.MX23 and i.MX28, used to drive the non-DUART ports.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add trivial driver for the MXS AUART IP. This is the other UART IP
present in i.MX23 and i.MX28, used to drive the non-DUART ports.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
