[U-Boot] serial : Device tree support for multiple serial devices.

hanumant hanumant07 at gmail.com
Mon Jan 23 22:01:24 CET 2012


Hi

	The board that I am working on has multiple serial ports.
I am trying to use device trees to configure board resource of these 
ports as well as the serial framework. So the driver doesnot know 
apriori the number of uart ports on the board. But querries the device 
tree for it.I am facing the following issues.

1) Ports are memory mapped and each port has its own register space.
As such the serial framework apis dont provide for passing a port id at 
the time of the call. So how do i access the correct register space for 
the corresponding port?. Or should i define for my own set of apis to be 
called by clients, allowing me to access specific ports corresponding 
address space, and use the serial framework api's only for the default 
serial console?

2) the default serial console, also gets configured based on information 
obtained from the device tree, at run time. If i keep a global 
representation of the default serial console with its base address etc, 
it will still have to be reinitialized after relocation. The 
default_serial_console() gives me an opportunity to reinitialize the 
global structure. Is that the way to go?

Thanks
Hanumant




More information about the U-Boot mailing list