[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] arm/acpi: Add Server Base System Architecture UART support





On 30/05/2016 13:08, Julien Grall wrote:


On 30/05/2016 13:00, Stefano Stabellini wrote:
On Fri, 27 May 2016, Julien Grall wrote:
Hello Shanker,

On 27/05/16 15:01, Shanker Donthineni wrote:
On 05/27/2016 08:04 AM, Julien Grall wrote:
On 27/05/16 01:28, Shanker Donthineni wrote:
The ARM Server Base System Architecture describes a generic UART
interface. It doesn't support clock control registers to set
baudrate. So, extend the driver probe() to handle SBSA interface
types and set the baudrate to 115200 for SBSA interfaces.

I cannot find any mention of the baudrate in the SBSA. Where does
it come
from?

Yes, no where mentioned about the baudrate in SBSA document. I used
115200
based on the  the Linux  PL011 driver.

Looking at the Linux code, it is a default when there is no valid
configuration (which may not be suitable for any platform?).

Whilst Linux userspace cares about the baudrate, Xen only use it to
configure
the hardware. Given that the UART should have been configured by the
hardware-specific software, the proper value should be BAUD_AUTO.

If you look at the code, pl011_init_preirq will read the baud rate when
uart->baud == BAUD_AUTO but will never be used after.

The problem is that IBRD and FBRD are not part of the SBSA doc, so to
make the driver compliant, we would have to skip reading the baudrate
too, which shouldn't be a problem.

Well, we are reading the baud rate, but it is never used within the
driver except. So I would drop the code rather than skip it.

Actually, looking a bit more at the code. The code to handle a fixed baud rate (baud != BAUD_AUTO) is likely buggy because the clock frequency (clk_hz) is hardcoded in Xen. Based on the commit log, the value is versatile express specific.

Anyway, the driver is always setting the baud rate to auto. So I will send a patch to drop completely the selection of the baud rate.

Note, that this may not be sufficient to support the SBSA UART.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.