]> git.dujemihanovic.xyz Git - u-boot.git/commit
serial: ns16550: Try get serial clock rate from DT before CLK
authorJonas Karlman <jonas@kwiboo.se>
Sun, 4 Aug 2024 15:09:52 +0000 (15:09 +0000)
committerTom Rini <trini@konsulko.com>
Mon, 7 Oct 2024 21:10:05 +0000 (15:10 -0600)
commit556ea53c838e278efca5375584acef1db4998f7e
tree144ee6cb26e8d0f0be58b179186aa9b65474aaf5
parentf4df9f53b7a97e29afb06e466a9ebab1a201b63d
serial: ns16550: Try get serial clock rate from DT before CLK

Initializing a clock driver to read a known static clock rate can take
some time at U-Boot proper pre-reloc phase.

Change to first try and read clock rate from DT to speed up boot time,
fall back to getting the clock rate from clock driver.

This help reduce boot time by around:
- ~35ms on a Radxa ROCK Pi 4 (RK3399)
- ~15ms on a Radxa ZERO 3W (RK3566)
Time that is wasted getting a static rate known at compile time.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/serial/ns16550.c