<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/serial/serial-uclass.c, branch v2024.01-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/drivers/serial/serial-uclass.c?h=v2024.01-rc2</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/serial/serial-uclass.c?h=v2024.01-rc2'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2023-10-24T21:05:24Z</updated>
<entry>
<title>serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE</title>
<updated>2023-10-24T21:05:24Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2023-10-16T08:35:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=35dc728a3cd14338b5fa0b6f231aa555077c98a1'/>
<id>urn:sha1:35dc728a3cd14338b5fa0b6f231aa555077c98a1</id>
<content type='text'>
When debugging, one sometimes only gets partial output lines or
nothing at all from the last printf, because the uart has a largish
buffer, and the code after the printf() may cause the CPU to hang
before the uart IP has time to actually emit all the characters. That
can be very confusing, because one doesn't then know exactly where the
hang happens.

Introduce a config knob allowing one to wait for the uart fifo to
drain whenever a newline character is printed, roughly corresponding
to the effect of setvbuf(..., _IOLBF, ...) in ordinary C programs.

Since this uses IS_ENABLED() instead of cpp ifdef, we can remove the
ifdef around the _serial_flush() definition - if neither
CONSOLE_FLUSH_SUPPORT or CONSOLE_FLUSH_ON_NEWLINE are enabled, the
compiler elides _serial_flush(), but it won't warn about it being
unused.

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>serial: serial-uclass.c: move definition of _serial_flush up a bit</title>
<updated>2023-10-24T21:05:24Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2023-10-16T08:35:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1000e2f96b582a69366f61a71d747c8ee9eb1cab'/>
<id>urn:sha1:1000e2f96b582a69366f61a71d747c8ee9eb1cab</id>
<content type='text'>
Preparation for next patch.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
</content>
</entry>
<entry>
<title>dm: serial: fix serial_post_probe()</title>
<updated>2023-10-09T19:24:31Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-09-29T00:47:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6a1e0ae43e2108a88e022103b3b303c9f4964a64'/>
<id>urn:sha1:6a1e0ae43e2108a88e022103b3b303c9f4964a64</id>
<content type='text'>
The size of the name of a udevice is not limited.

When setting the fixed sized name field of a stdio device we must ensure
that the target string is NUL terminated to avoid buffer overflows.

Fixes: 57d92753d4ca ("dm: Add a uclass for serial devices")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>serial: Remove unused NEEDS_MANUAL_RELOC code bits</title>
<updated>2023-09-14T14:42:25Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2023-09-06T21:30:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d55326d629410e4012201c9f2f0e2f6d8862a1ca'/>
<id>urn:sha1:d55326d629410e4012201c9f2f0e2f6d8862a1ca</id>
<content type='text'>
The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
</entry>
<entry>
<title>serial-uclass: reset gd-&gt;cur_serial_dev to NULL if serial not found</title>
<updated>2023-08-30T21:56:21Z</updated>
<author>
<name>Maksim Kiselev</name>
<email>bigunclemax@gmail.com</email>
</author>
<published>2023-08-18T09:34:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fa03568e46c9f4535b79e16faed4841ff7bfbe5b'/>
<id>urn:sha1:fa03568e46c9f4535b79e16faed4841ff7bfbe5b</id>
<content type='text'>
Reset gd-&gt;cur_serial_dev pointer to avoid calling non-relocated code
from relocated code if a serial driver is not found and
CONFIG_REQUIRE_SERIAL_CONSOLE is disabled.

Here is detailed explanation of what this patch is trying to fix.

U-boot calls the serial_find_console_or_panic() function twice.
The first console setup occurs before U-boot relocation in
the serial_init(). This stage uses simple FDT parsing and
assigns gd-&gt;cur_serial_dev to a "serial" device that lives in
non-relocated code too.

The second console setup after U-boot relocation(from serial_initialize())
may use full live DT (if OF_LIVE enabled) probe sequence with buses,
clocks, resets, etc... And if the console setup fails at this step,
than we should be caught by panic_str("No serial driver found").

But... If we disable CONFIG_REQUIRE_SERIAL_CONSOLE, than we
return from serial_init() with gd-&gt;cur_serial_dev pointing
to the "old"(non-relocated) serial device.

And if this area, where "old" serial device is placed, is changed
(e.g. Linux kernel may be relocated at this address), than we will get
an unexpected crash on the next call of printf().

Signed-off-by: Maksim Kiselev &lt;bigunclemax@gmail.com&gt;
</content>
</entry>
<entry>
<title>serial-uclass: drop redundant code in serial_check_stdout()</title>
<updated>2023-04-06T23:10:08Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2023-03-29T07:57:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f3bb055ecb3f3fde701d22f4d245ad6b4cba06e6'/>
<id>urn:sha1:f3bb055ecb3f3fde701d22f4d245ad6b4cba06e6</id>
<content type='text'>
As the updated comment says, this is already handled by
fdt_path_offset_namelen() itself.

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
</content>
</entry>
<entry>
<title>post: Move CONFIG_SYS_POST to CFG_SYS_POST</title>
<updated>2022-12-23T18:01:13Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2022-12-04T15:14:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1e019503330585e892be057cca3ed4eb1b9c9344'/>
<id>urn:sha1:1e019503330585e892be057cca3ed4eb1b9c9344</id>
<content type='text'>
Migrate the rest of the CONFIG_SYS_POST macros over to CFG_SYS_POST
namespace.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>kbuild: Remove uncmd_spl logic</title>
<updated>2022-12-23T15:15:13Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2022-12-04T15:14:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0478dac62a9add8c73981a900ceaa6da732ae2bb'/>
<id>urn:sha1:0478dac62a9add8c73981a900ceaa6da732ae2bb</id>
<content type='text'>
At this point in the conversion there should be no need to have logic to
disable some symbol during the SPL build as all symbols should have an
SPL counterpart.

The main real changes done here are that we now must make proper use of
CONFIG_IS_ENABLED(DM_SERIAL) rather than many of the odd tricks we
developed prior to CONFIG_IS_ENABLED() being available.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>post: Migrate to Kconfig</title>
<updated>2022-12-05T21:11:50Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2022-11-19T23:45:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9cebc4ad8ebe6832c6d0eca786a85533a3b54ce4'/>
<id>urn:sha1:9cebc4ad8ebe6832c6d0eca786a85533a3b54ce4</id>
<content type='text'>
We move the existing CONFIG_POST_* functionality over to CFG_POST and
then introduce CONFIG_POST to Kconfig.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>global: Move remaining CONFIG_SYS_* to CFG_SYS_*</title>
<updated>2022-12-05T21:06:08Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2022-11-16T18:10:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=65cc0e2a65d2c9f107b2f42db6396d9ade6c5ad8'/>
<id>urn:sha1:65cc0e2a65d2c9f107b2f42db6396d9ade6c5ad8</id>
<content type='text'>
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do
not easily transition to Kconfig. In many cases they likely should come
from the device tree instead. Move these out of CONFIG namespace and in
to CFG namespace.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
