[PATCH 5/5] serial: Rework CONFIG_SYS_BAUDRATE_TABLE

Tom Rini trini at konsulko.com
Tue Sep 14 00:14:03 CEST 2021


On Mon, Sep 13, 2021 at 05:03:13PM -0500, Alex G. wrote:

[snip]
> Suggestion II: Define the Kconfig SYS_BAUDRATE_TABLE table to a C array,
> like 'default "{ 300, 420, 690}" ' and forego the #ifdefs in serial.h

Oh!  And FWIW, I don't _think_ this works.  I'd be quite happy to be
proven wrong, but there's not a useful Kconfig type here.  If we use
"string" and put in "{ 115200 }", we end up with:
static const unsigned long baudrate_table[] = "{ 115200 }";
which isn't what we want.  We'd need something clever next to turn a
string in to something we can use.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210913/51598d6d/attachment.sig>


More information about the U-Boot mailing list