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

[PATCH] xen/serial: scif: add support for HSCIF


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Tue, 8 Feb 2022 11:23:55 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4mry2wGJogdUgfwuOoSU5+mvvtEAqCj4dHvaLR3FDZI=; b=EsmD33/PzCP3My/U4QOxJXHuODRC3UBE4Io9qmi+URD/074yieOixiJ9MvPobGhjO4/wQhJ2dZQxfKmFpxWS3TExhOWJuxYQWaFrGLVPbBOGauhMdW/3ScRqzTKdvtUqjcIdrOFSSE6J84JZvWgQfO1MDnsVbIX5g8VuXU7qDpXjNhvc7AQKEeFTYwzG8VEAcvPkdhbGydxur51Uv9sdi6S1sOq08vDzzWBfsuAMZjKCHWwV1mjoqXTIAN2cYkPVSb0KOGxZUmbqn8lLGrVjkZZqjQuxb989MY+kBUxku52qoQ2kPfxnwlJJady7Ki2TbZHeicBSL3Iqgn5nzFsJVA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NO1nHYU5Shh3YqrtMThoWiR8p6PVMhfH6IQgW5KzlwAyJeF/3eCkCocXaZoHYzNUGbYshJfLPKK+Fxr48q2i+jQAmSTnAhcKyPPcB6r3lD5IfUh4+4Jd7AEN9USmevdgwzEe+UoS8R9a9Fh1DJJ5QyLiJxddqE0gNgLA+lZwWIpt0bPfv8MKs01sIxGly5/BEXjMRaZDnkJ6xQujtfLenDjbd7FOex+MuZsrDtNVDIFeNFI1pyyrNq5kzx5jsrI95daWvLs8z5hVh3k2yhTxB6f2ZwQ0siG8Ho20JbeGL8pY1/x/Sgvz5bM/ZTRO6RzrTtvcljM6bB1km5Z5bItU6w==
  • Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Delivery-date: Tue, 08 Feb 2022 11:24:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYHN5b+zcSsmlMWk6M2sxqYcvKKw==
  • Thread-topic: [PATCH] xen/serial: scif: add support for HSCIF

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@xxxxxxxx>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

---

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(-)

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@xxxxxxxxxxxxxxx>
  * 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 */ },
 };
 
-- 
2.34.1



 


Rackspace

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