console: 16550: Prepare for skipping initialisation
On some platforms the UART might have already been initialised, for
instance by firmware running before TF-A or by a separate management
processor. In this case it would not be need to initialise it again
(doing so could create spurious characters). But more importantly this
saves us from knowing the right baudrate and the right base clock rate
for the UART. This can lead to more robust and versatile firmware builds.

Allow to skip the 16550 UART initialisation and baud rate divisor
programming, by interpreting an input clock rate of "0" to signify this
case. This will just skip the call to console_16550_core_init, but still
will register the console properly.

Users should just pass 0 as the second parameter, the baudrate (third
parameter) will then be ignored as well.

Fix copy & paste typos in comments for the console_16550_register()
function on the way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: I9f8fca5b358f878fac0f31dc411358fd160786ee
1 parent 2b4c5e4 commit cd50ffd2fcbebc47173174151919333960ebe732
@Andre Przywara Andre Przywara authored on 12 Dec 2019
Manish Pandey committed on 30 Dec 2019
Showing 3 changed files
View
drivers/ti/uart/aarch32/16550_console.S
View
drivers/ti/uart/aarch64/16550_console.S
View
include/drivers/ti/uart/uart_16550.h