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

Re: [Xen-devel] [RFC PATCH 2/2] xen/arm: Add MESON UART driver for Amlogic S905 SoC



Hi,

On 04/10/2018 08:11, Amit Tomer wrote:
+    reg = meson_s905_read(uart, UART_CONTROL);
+    reg &= ~(UART_RX_RST | UART_TX_RST | UART_CLEAR_ERR);


I am not sure why you are clearing those bits. AFAIU, init_preirq will reset
the serials, so you want to set thoses bits. This seems to be confirmed by
Linux in meson_uart_reset.

Idea here is to set these bits to their default values(which is 0 ) and if you
look at other drivers in XEN, it seems to be done same thing(clear
those bits) with them.

Are you sure about this? RX_RST and TX_RST are bit to reset the
transmission and receive path. Looking at a couple of different drivers
(cache-uart.c and mvebu-uart.c), those 2 bits are set and I suspect be
cleared by the hardware once reset.

It's bit confusing to me, eventually Linux driver seems to clear those bits

But it sets them right before hand. What does the spec says about those bits?

Overall, I feels to me it is better to mimic the Linux driver as I am quite confident that the driver is doing the right thing.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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