[RFC PATCH] RFC: Replace CONFIG_SYS_BAUDRATE_TABLE by board and UART driver rounding functions

Tom Rini trini at konsulko.com
Sat Sep 25 15:51:08 CEST 2021


On Sat, Sep 25, 2021 at 02:19:58PM +0200, Pali Rohár wrote:

> Add new functions which returns the nearest baudrate and use them instead
> of hardcoded and incomplete CONFIG_SYS_BAUDRATE_TABLE compile time option.
> 
> Add implementation of rounding function for serial_mvebu_a3700 driver and
> also for A3720 Espressobin board which has integrated pl2303 USB<->UART
> converter, which basically limits baudrates which can user set.
> 
> Completely remove CONFIG_SYS_BAUDRATE_TABLE defines from all A3720 boards
> as now with rounding functions it is not used anymore.
> 
> NOTE: This is just an example how to kill CONFIG_SYS_BAUDRATE_TABLE compile
> time definitions. I tested it that it works on A3720 Turris Mox board. I
> have not tested A3720 Espressobin board yet.
> 
> More discussion on this approach is required, so take this just as RFC
> change.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>

Thanks for doing this.  My first question is, is this really per-board?
Or per SoC / UART chipset.  I would hope for example that for plain old
ns16550s this would be a generic function, perhaps with an optional
board call-out for board design limitations.  This does feel like a
reasonable amount of code for platforms like this that were supporting
what was the maximal rate table before.

-- 
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/20210925/ce114600/attachment.sig>


More information about the U-Boot mailing list