diff mbox series

xen/serial: scif: add support for HSCIF

Message ID 20220208112304.1191924-1-volodymyr_babchuk@epam.com (mailing list archive)
State New, archived
Headers show
Series xen/serial: scif: add support for HSCIF | expand

Commit Message

Volodymyr Babchuk Feb. 8, 2022, 11:23 a.m. UTC
HSCIF is a high-speed variant of Renesas SCIF serial interface. From
Xen point of view, they almost the same, only difference is in FIFO
size.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

---

V2:
 - Updated header of the file as per Oleksandr's suggestion
 - Added Oleksandr's R-b tag
---
 xen/drivers/char/scif-uart.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

Comments

Julien Grall Feb. 9, 2022, 12:25 p.m. UTC | #1
Hi,

On 08/02/2022 11:23, Volodymyr Babchuk wrote:
> HSCIF is a high-speed variant of Renesas SCIF serial interface. From
> Xen point of view, they almost the same, only difference is in FIFO
> size.
> 
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
> Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

Acked-by: Julien Grall <jgrall@amazon.com>

And committed.

Cheers,
diff mbox series

Patch

diff --git a/xen/drivers/char/scif-uart.c b/xen/drivers/char/scif-uart.c
index ee204a11a4..2fccafe340 100644
--- a/xen/drivers/char/scif-uart.c
+++ b/xen/drivers/char/scif-uart.c
@@ -1,8 +1,8 @@ 
 /*
  * xen/drivers/char/scif-uart.c
  *
- * Driver for SCIF(A) (Serial communication interface with FIFO (A))
- * compatible UART.
+ * Driver for (H)SCIF(A) ((High-speed) Serial communication interface
+ * with FIFO (A)) compatible UART.
  *
  * Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
  * Copyright (C) 2014, Globallogic.
@@ -47,6 +47,7 @@  enum port_types
 {
     SCIF_PORT,
     SCIFA_PORT,
+    HSCIF_PORT,
     NR_PORTS,
 };
 
@@ -88,6 +89,17 @@  static const struct port_params port_params[NR_PORTS] =
                         SCASCR_BRIE,
         .fifo_size    = 64,
     },
+    [HSCIF_PORT] =
+    {
+        .status_reg   = SCIF_SCFSR,
+        .tx_fifo_reg  = SCIF_SCFTDR,
+        .rx_fifo_reg  = SCIF_SCFRDR,
+        .overrun_reg  = SCIF_SCLSR,
+        .overrun_mask = SCLSR_ORER,
+        .error_mask   = SCFSR_PER | SCFSR_FER | SCFSR_BRK | SCFSR_ER,
+        .irq_flags    = SCSCR_RIE | SCSCR_TIE | SCSCR_REIE,
+        .fifo_size    = 128,
+    },
 };
 
 static void scif_uart_interrupt(int irq, void *data, struct cpu_user_regs *regs)
@@ -288,6 +300,7 @@  static const struct dt_device_match scif_uart_dt_match[] __initconst =
 {
     { .compatible = "renesas,scif",  .data = &port_params[SCIF_PORT] },
     { .compatible = "renesas,scifa", .data = &port_params[SCIFA_PORT] },
+    { .compatible = "renesas,hscif", .data = &port_params[HSCIF_PORT] },
     { /* sentinel */ },
 };