<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/console.c, branch master</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>console: Prefer currently selected serial console as stdio device</title>
<updated>2026-03-30T23:02:17+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-03-17T02:17:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=32dc2866e020edcd89b26366ccb8fa7a2ee2859d'/>
<id>32dc2866e020edcd89b26366ccb8fa7a2ee2859d</id>
<content type='text'>
Adjust the scan for default console stdio device to prefer the
currently selected serial device. This is useful in combination
with CONFIG_SERIAL_PROBE_ALL=y, in which case the system would
instantiate all serial devices as stdio devices in the order in
which they are listed in control DT. The currently selected serial
device may not be the first device listed in DT, in which case the
current console_init_r() implementation unexpectedly switches to
another serial console after listing stderr using "Err:" line, and
just before showing U-Boot shell, which is not the desired behavior.

The scan now iterates over the entire list of stdio devices. If the
current iterator stdio device is the current serial device, or there
is no input or output stdio device assigned to the input or output
stream yet, then the current iterator stdio device is assigned to that
stream. This way, the first suitable stdio device is assigned to the
stream, but the current serial console stdio device can override that
assignment.

As a small optimization, if the current iterator stdio device is the
current serial device and both input and output streams as assigned,
then the loop can terminate, because the current serial device has a
chance to be used as a stdio device at this point.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adjust the scan for default console stdio device to prefer the
currently selected serial device. This is useful in combination
with CONFIG_SERIAL_PROBE_ALL=y, in which case the system would
instantiate all serial devices as stdio devices in the order in
which they are listed in control DT. The currently selected serial
device may not be the first device listed in DT, in which case the
current console_init_r() implementation unexpectedly switches to
another serial console after listing stderr using "Err:" line, and
just before showing U-Boot shell, which is not the desired behavior.

The scan now iterates over the entire list of stdio devices. If the
current iterator stdio device is the current serial device, or there
is no input or output stdio device assigned to the input or output
stream yet, then the current iterator stdio device is assigned to that
stream. This way, the first suitable stdio device is assigned to the
stream, but the current serial console stdio device can override that
assignment.

As a small optimization, if the current iterator stdio device is the
current serial device and both input and output streams as assigned,
then the loop can terminate, because the current serial device has a
chance to be used as a stdio device at this point.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>console: Support a format string for stderr output</title>
<updated>2025-05-02T19:40:20+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-04-01T17:29:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fe2d4d4cef093d24da389fda29a556b15c84829b'/>
<id>fe2d4d4cef093d24da389fda29a556b15c84829b</id>
<content type='text'>
Add a console_printf_select_stderr() function so that it is not
necessary for the caller to process the format string.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a console_printf_select_stderr() function so that it is not
necessary for the caller to process the format string.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: console: move break; statement</title>
<updated>2025-04-10T22:16:39+00:00</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2025-03-25T17:47:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=82f5ce11e669d86ac08e6ba800d4a97ad734665b'/>
<id>82f5ce11e669d86ac08e6ba800d4a97ad734665b</id>
<content type='text'>
In console_setfile(), there is some #ifdef'ed code, updating monitor
functions for a U-Boot proper build. This is called inside a switch/case
statement, but the closing "break;" is inside the #ifdef section.
This doesn't look right: we should not fall through to the error case
for an SPL/TPL build.

Move the "break" to be always effective, solving a compiler warning about
an untagged implicit fallthrough.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In console_setfile(), there is some #ifdef'ed code, updating monitor
functions for a U-Boot proper build. This is called inside a switch/case
statement, but the closing "break;" is inside the #ifdef section.
This doesn't look right: we should not fall through to the error case
for an SPL/TPL build.

Move the "break" to be always effective, solving a compiler warning about
an untagged implicit fallthrough.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>membuf: Rename struct</title>
<updated>2025-04-03T22:54:49+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-03-18T15:20:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=68b0af2127dbd7b304f897f4796c6eb86fd74402'/>
<id>68b0af2127dbd7b304f897f4796c6eb86fd74402</id>
<content type='text'>
Rename the struct to match the function prefix and filenames.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename the struct to match the function prefix and filenames.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>membuff: Rename functions to have membuf_ prefix</title>
<updated>2025-04-03T22:54:49+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-03-18T15:20:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4662e5286aa259e158f314157d0d8f2ad213a321'/>
<id>4662e5286aa259e158f314157d0d8f2ad213a321</id>
<content type='text'>
The double 'f' is not necessary and is a bit annoying as elsewhere in
U-Boot we use 'buf'. Rename all the functions before it is used more
widely.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The double 'f' is not necessary and is a bit annoying as elsewhere in
U-Boot we use 'buf'. Rename all the functions before it is used more
widely.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: console: Delete obsolete VIDCONSOLE_AS_{LCD, NAME} options</title>
<updated>2025-03-14T20:35:56+00:00</updated>
<author>
<name>Dragan Simic</name>
<email>dsimic@manjaro.org</email>
</author>
<published>2025-03-02T14:52:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f853295a6a0913f9d0df72c11dc62834452820f4'/>
<id>f853295a6a0913f9d0df72c11dc62834452820f4</id>
<content type='text'>
The configuration options CONFIG_VIDCONSOLE_AS_LCD and CONFIG_VIDCONSOLE_AS_
NAME have been marked as obsolete and scheduled for deletion in late 2020.

That's already long overdue and the last remaining consumers of these options
have already migrated to using "vidconsole" in their "stdout" and "stderr"
environment variables, so let's delete these two configuration options.

Signed-off-by: Dragan Simic &lt;dsimic@manjaro.org&gt;
Acked-by: Soeren Moch &lt;smoch@web.de&gt; # tbs2910
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The configuration options CONFIG_VIDCONSOLE_AS_LCD and CONFIG_VIDCONSOLE_AS_
NAME have been marked as obsolete and scheduled for deletion in late 2020.

That's already long overdue and the last remaining consumers of these options
have already migrated to using "vidconsole" in their "stdout" and "stderr"
environment variables, so let's delete these two configuration options.

Signed-off-by: Dragan Simic &lt;dsimic@manjaro.org&gt;
Acked-by: Soeren Moch &lt;smoch@web.de&gt; # tbs2910
</pre>
</div>
</content>
</entry>
<entry>
<title>console: Use printascii for lowlevel debug string</title>
<updated>2024-11-17T19:14:09+00:00</updated>
<author>
<name>Kever Yang</name>
<email>kever.yang@rock-chips.com</email>
</author>
<published>2024-11-08T08:36:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4cc94e898a90dce0ff957fa623a336f153cfd0f4'/>
<id>4cc94e898a90dce0ff957fa623a336f153cfd0f4</id>
<content type='text'>
The lowlevel debug with CONFIG_DEBUG_UART has printascii for string
print, and no need to convert to use printch now.

Signed-off-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The lowlevel debug with CONFIG_DEBUG_UART has printascii for string
print, and no need to convert to use printch now.

Signed-off-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD</title>
<updated>2024-10-11T17:44:48+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-09-30T01:49:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1d6132e2a2b1217567b88ddd6d11662afd4001df'/>
<id>1d6132e2a2b1217567b88ddd6d11662afd4001df</id>
<content type='text'>
Complete this rename for all directories outside arch/ board/ drivers/
and include/

Use the new symbol to refer to any 'SPL' build, including TPL and VPL

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Complete this rename for all directories outside arch/ board/ drivers/
and include/

Use the new symbol to refer to any 'SPL' build, including TPL and VPL

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge patch series "Fix various bugs"</title>
<updated>2024-09-18T19:07:19+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-09-18T19:07:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c17805e19b9335e1fb5295c81b59eddf88d1b9ec'/>
<id>c17805e19b9335e1fb5295c81b59eddf88d1b9ec</id>
<content type='text'>
Simon Glass &lt;sjg@chromium.org&gt; says:

This series includes the patches needed to make make the EFI 'boot' test
work. That test has now been split off into a separate series along with
the EFI patches.

This series fixes these problems:
- sandbox memory-mapping conflict with PCI
- the fix for that causes the mbr test to crash as it sets up pointers
  instead of addresses for its 'mmc' commands
- the mmc and read commands which cast addresses to pointers
- a tricky bug to do with USB keyboard and stdio
- a few other minor things
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simon Glass &lt;sjg@chromium.org&gt; says:

This series includes the patches needed to make make the EFI 'boot' test
work. That test has now been split off into a separate series along with
the EFI patches.

This series fixes these problems:
- sandbox memory-mapping conflict with PCI
- the fix for that causes the mbr test to crash as it sets up pointers
  instead of addresses for its 'mmc' commands
- the mmc and read commands which cast addresses to pointers
- a tricky bug to do with USB keyboard and stdio
- a few other minor things
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: usb: Deal with USB keyboard persisting across tests</title>
<updated>2024-09-18T19:01:00+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-09-01T22:26:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bc624321dc358b2d0fb1436533ece68e6422764c'/>
<id>bc624321dc358b2d0fb1436533ece68e6422764c</id>
<content type='text'>
Clear any USB-keyboard devices before running a unit test, to avoid
using a stale udevice pointer in stdio. Add a long comment to explain
this situation and why this solution seems best, at least for now.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clear any USB-keyboard devices before running a unit test, to avoid
using a stale udevice pointer in stdio. Add a long comment to explain
this situation and why this solution seems best, at least for now.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
