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

Re: [Xen-devel] [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk



Hi Oleksandr,

On 2/18/19 8:45 PM, Oleksandr wrote:

On 18.02.19 22:41, Oleksandr wrote:

On 18.02.19 16:05, Julien Grall wrote:
Hi,


Hi



On 01/02/2019 12:37, Oleksandr Tyshchenko wrote:
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

Add support for Renesas "Stout" development board based on
R-Car H2 SoC which has SCIFA compatible UART.

Actually existing SCIF UART support (debug-scif.inc) and
newly added SCIFA UART support (debug-scifa.inc) differ only
in registers offsets.

Can we try to merge the two then? One solution is to provide another options similar to how we deal with REG_SHIFT on the 8250.


Actually, the main difference for the "early printk" support is in two reg offsets:

+#define SCIFA_SCASSR   0x14    /* Serial status register */
+#define SCIFA_SCAFTDR  0x20    /* Transmit FIFO data register */

+#define SCIF_SCFSR             0x10    /* Serial status register */
+#define SCIF_SCFTDR            0x0c    /* Transmit FIFO data register */


I am not mistaken, we will have to introduce two options to cover this case, as the offsets are not correlated with each other, no?

You don't need two options. For instance, you can only introduce an option SCIF_VERSION that would be 0 for SCIF and 61 (ascii 'a') for SCIFA.

Then in the code, you can use SCIF_VERSION to decides which sets of macros you are using.

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®.