Uart set up in PBL

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Mar 4 12:59:31 GMT 2021


Hello Renaud,

On 04.03.21 13:28, Barbier, Renaud wrote:
> Looking at many ARM platforms I see the UART is set in the PBL.

Two kinds of UART are set up in PBL:



 - low level debug: DEBUG_LL

	-> This is controlled via Kconfig and thus affects all
	   boards.
 Not meant for production use
, but for very
	   early debugging

 - PBL console: pbl_set_putc

	-> This affects only a single board and each board can decide

	   how to set up UART beforehand. This is for when you want
	   regular output in PBL (e.g. because you chainload from
	   MMC).

> I guess the baud rate is fixed.> I am looking into a way to make the baud rate configurable. 

For non-PBL, you got proper UART drivers, which can have their

baud rate configured via the baudrate device parameter, e.g.

serial1.baudrate=9600. This can come from a non-volatile variable.


> Would it possible from the PBL to read the "baudrate" variable from the environment?

Normally, you would want to avoid doing anything, but the
bare minimum from PBL. Does the baudrate device parameter
work for you?

Cheers,
Ahmad

> 
> Cheers,
> Renaud
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list