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

[PATCH 1/2] drivers: char: Drop useless suspend/resume stubs in Arm drivers


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 4 Apr 2024 09:51:42 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=5YgJMInRV9+naJSvwvbifqXD4WV1M7F+04rZI69ZOn8=; b=by3dWBn+MgArNyZzfMIDrc3ABuF2ZkmTwtQG0d5UTIwiVwl58NA9jh+Jn9sxA0e25bQk7HwA4rECyiJUJHBbcW+yUTsuLza7YclRRDV/GS00reACBGsPTREVLLaK6sGhD/5cVre7eYTJtjeM7dklpCHCbkCbAwyBYElT4OUerc8NkH3HGsMZIhgcXO3/RtCXVda+Urh+H6S9Al9GDh/uEjMsMYaFNX8q8MVb2fkFgLkLpJLLia8HekF+mFSki+0DSPS0Dj7cksqXlqvbKPruzqrEwuGRLDCJ1EwJrryX6i9R3f8xIG8pPCwGDw1COjT8/WM0hjFp9Z2Z9uPWVlZEew==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bd9854KvNq4S3uQ8+2ks2kiI+T1QakE4UjO6MyWdByl8vZPjuCSu+9W5ZrKpnCgQig/wWcYfGd/bRK4sKKqYAH3WAK9IHjzpQQ/jz09fkxrGyVQfRhW1mhhup/KKJB39OPccE+SGZzktQcGzhYflFNwET17Ab179viif3qKutVwqiy/o+oQ81v3yqbvz8ALS3T3nwWi7Kpvmh4GUC5V9Zj1Q1eob0amx8zMdY8H9jL3VgQRBoFyWttgQglvD7d/YqIngqMonGv5A5w4cSaP3O3HACke5fM3LHq9kdsaWLTGEnMcxt6w5kgJFDuNiCQi1xvpEfrEoD4RUnrwtHCkcnw==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 04 Apr 2024 07:51:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Arm we don't use console_{suspend,resume} and the corresponding
stubs in serial drivers are being redundantly copied whenever a new
driver is added. Drop them as well as useless .endboot = NULL assignment.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 xen/drivers/char/cadence-uart.c    | 13 -------------
 xen/drivers/char/exynos4210-uart.c | 13 -------------
 xen/drivers/char/imx-lpuart.c      | 13 -------------
 xen/drivers/char/meson-uart.c      | 13 -------------
 xen/drivers/char/mvebu-uart.c      | 13 -------------
 xen/drivers/char/omap-uart.c       | 13 -------------
 xen/drivers/char/pl011.c           | 13 -------------
 xen/drivers/char/scif-uart.c       | 13 -------------
 8 files changed, 104 deletions(-)

diff --git a/xen/drivers/char/cadence-uart.c b/xen/drivers/char/cadence-uart.c
index 3618fa88d868..b2f379833f02 100644
--- a/xen/drivers/char/cadence-uart.c
+++ b/xen/drivers/char/cadence-uart.c
@@ -90,16 +90,6 @@ static void __init cuart_init_postirq(struct serial_port 
*port)
     cuart_write(uart, R_UART_IER, UART_SR_INTR_RTRIG);
 }
 
-static void cuart_suspend(struct serial_port *port)
-{
-    BUG();
-}
-
-static void cuart_resume(struct serial_port *port)
-{
-    BUG();
-}
-
 static int cuart_tx_ready(struct serial_port *port)
 {
     struct cuart *uart = port->uart;
@@ -143,9 +133,6 @@ static const struct vuart_info *cuart_vuart(struct 
serial_port *port)
 static struct uart_driver __read_mostly cuart_driver = {
     .init_preirq  = cuart_init_preirq,
     .init_postirq = cuart_init_postirq,
-    .endboot      = NULL,
-    .suspend      = cuart_suspend,
-    .resume       = cuart_resume,
     .tx_ready     = cuart_tx_ready,
     .putc         = cuart_putc,
     .getc         = cuart_getc,
diff --git a/xen/drivers/char/exynos4210-uart.c 
b/xen/drivers/char/exynos4210-uart.c
index b29fd75c5a1c..58901df554cb 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -212,16 +212,6 @@ static void __init exynos4210_uart_init_postirq(struct 
serial_port *port)
     exynos4210_write(uart, UMCON, exynos4210_read(uart, UMCON) | UMCON_INT_EN);
 }
 
-static void exynos4210_uart_suspend(struct serial_port *port)
-{
-    BUG(); // XXX
-}
-
-static void exynos4210_uart_resume(struct serial_port *port)
-{
-    BUG(); // XXX
-}
-
 static int exynos4210_uart_tx_ready(struct serial_port *port)
 {
     struct exynos4210_uart *uart = port->uart;
@@ -286,9 +276,6 @@ static const struct vuart_info 
*exynos4210_vuart_info(struct serial_port *port)
 static struct uart_driver __read_mostly exynos4210_uart_driver = {
     .init_preirq  = exynos4210_uart_init_preirq,
     .init_postirq = exynos4210_uart_init_postirq,
-    .endboot      = NULL,
-    .suspend      = exynos4210_uart_suspend,
-    .resume       = exynos4210_uart_resume,
     .tx_ready     = exynos4210_uart_tx_ready,
     .putc         = exynos4210_uart_putc,
     .getc         = exynos4210_uart_getc,
diff --git a/xen/drivers/char/imx-lpuart.c b/xen/drivers/char/imx-lpuart.c
index 522680a25cec..faf4693b66e1 100644
--- a/xen/drivers/char/imx-lpuart.c
+++ b/xen/drivers/char/imx-lpuart.c
@@ -101,16 +101,6 @@ static void __init imx_lpuart_init_postirq(struct 
serial_port *port)
     imx_lpuart_write(uart, UARTCTRL, temp);
 }
 
-static void imx_lpuart_suspend(struct serial_port *port)
-{
-    BUG();
-}
-
-static void imx_lpuart_resume(struct serial_port *port)
-{
-    BUG();
-}
-
 static int imx_lpuart_tx_ready(struct serial_port *port)
 {
     struct imx_lpuart *uart = port->uart;
@@ -185,9 +175,6 @@ static void imx_lpuart_stop_tx(struct serial_port *port)
 static struct uart_driver __read_mostly imx_lpuart_driver = {
     .init_preirq = imx_lpuart_init_preirq,
     .init_postirq = imx_lpuart_init_postirq,
-    .endboot = NULL,
-    .suspend = imx_lpuart_suspend,
-    .resume = imx_lpuart_resume,
     .tx_ready = imx_lpuart_tx_ready,
     .putc = imx_lpuart_putc,
     .getc = imx_lpuart_getc,
diff --git a/xen/drivers/char/meson-uart.c b/xen/drivers/char/meson-uart.c
index 694381986d07..407a276085b7 100644
--- a/xen/drivers/char/meson-uart.c
+++ b/xen/drivers/char/meson-uart.c
@@ -116,16 +116,6 @@ static void __init meson_uart_init_postirq(struct 
serial_port *port)
             (AML_UART_RX_INT_EN | AML_UART_TX_INT_EN));
 }
 
-static void meson_uart_suspend(struct serial_port *port)
-{
-    BUG();
-}
-
-static void meson_uart_resume(struct serial_port *port)
-{
-    BUG();
-}
-
 static void meson_uart_putc(struct serial_port *port, char c)
 {
     struct meson_uart *uart = port->uart;
@@ -191,9 +181,6 @@ static int meson_uart_tx_ready(struct serial_port *port)
 static struct uart_driver __read_mostly meson_uart_driver = {
     .init_preirq  = meson_uart_init_preirq,
     .init_postirq = meson_uart_init_postirq,
-    .endboot      = NULL,
-    .suspend      = meson_uart_suspend,
-    .resume       = meson_uart_resume,
     .putc         = meson_uart_putc,
     .getc         = meson_uart_getc,
     .tx_ready     = meson_uart_tx_ready,
diff --git a/xen/drivers/char/mvebu-uart.c b/xen/drivers/char/mvebu-uart.c
index 1913fe8b5f91..db2418576ca5 100644
--- a/xen/drivers/char/mvebu-uart.c
+++ b/xen/drivers/char/mvebu-uart.c
@@ -125,16 +125,6 @@ static void __init mvebu3700_uart_init_postirq(struct 
serial_port *port)
     mvebu3700_write(uart, UART_CTRL_REG, reg);
 }
 
-static void mvebu3700_uart_suspend(struct serial_port *port)
-{
-    BUG();
-}
-
-static void mvebu3700_uart_resume(struct serial_port *port)
-{
-    BUG();
-}
-
 static void mvebu3700_uart_putc(struct serial_port *port, char c)
 {
     struct mvebu3700_uart *uart = port->uart;
@@ -213,9 +203,6 @@ static int mvebu3700_uart_tx_ready(struct serial_port *port)
 static struct uart_driver __read_mostly mvebu3700_uart_driver = {
     .init_preirq  = mvebu3700_uart_init_preirq,
     .init_postirq = mvebu3700_uart_init_postirq,
-    .endboot      = NULL,
-    .suspend      = mvebu3700_uart_suspend,
-    .resume       = mvebu3700_uart_resume,
     .putc         = mvebu3700_uart_putc,
     .getc         = mvebu3700_uart_getc,
     .tx_ready     = mvebu3700_uart_tx_ready,
diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c
index e4f5be22894b..f4368c158c06 100644
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -242,16 +242,6 @@ static void __init omap_uart_init_postirq(struct 
serial_port *port)
     omap_write(uart, UART_IER, UART_IER_ERDAI|UART_IER_ETHREI|UART_IER_ELSI);
 }
 
-static void omap_uart_suspend(struct serial_port *port)
-{
-    BUG();
-}
-
-static void omap_uart_resume(struct serial_port *port)
-{
-    BUG();
-}
-
 static int omap_uart_tx_ready(struct serial_port *port)
 {
     struct omap_uart *uart = port->uart;
@@ -307,9 +297,6 @@ static const struct vuart_info *omap_vuart_info(struct 
serial_port *port)
 static struct uart_driver __read_mostly omap_uart_driver = {
     .init_preirq = omap_uart_init_preirq,
     .init_postirq = omap_uart_init_postirq,
-    .endboot = NULL,
-    .suspend = omap_uart_suspend,
-    .resume = omap_uart_resume,
     .tx_ready = omap_uart_tx_ready,
     .putc = omap_uart_putc,
     .getc = omap_uart_getc,
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index 7260a988ca65..5f9913367d51 100644
--- a/xen/drivers/char/pl011.c
+++ b/xen/drivers/char/pl011.c
@@ -166,16 +166,6 @@ static void __init pl011_init_postirq(struct serial_port 
*port)
     pl011_write(uart, IMSC, RTI|OEI|BEI|PEI|FEI|TXI|RXI);
 }
 
-static void pl011_suspend(struct serial_port *port)
-{
-    BUG(); // XXX
-}
-
-static void pl011_resume(struct serial_port *port)
-{
-    BUG(); // XXX
-}
-
 static int pl011_tx_ready(struct serial_port *port)
 {
     struct pl011 *uart = port->uart;
@@ -232,9 +222,6 @@ static void pl011_tx_start(struct serial_port *port)
 static struct uart_driver __read_mostly pl011_driver = {
     .init_preirq  = pl011_init_preirq,
     .init_postirq = pl011_init_postirq,
-    .endboot      = NULL,
-    .suspend      = pl011_suspend,
-    .resume       = pl011_resume,
     .tx_ready     = pl011_tx_ready,
     .putc         = pl011_putc,
     .getc         = pl011_getc,
diff --git a/xen/drivers/char/scif-uart.c b/xen/drivers/char/scif-uart.c
index b7f86f882c85..757793ca4588 100644
--- a/xen/drivers/char/scif-uart.c
+++ b/xen/drivers/char/scif-uart.c
@@ -195,16 +195,6 @@ static void __init scif_uart_init_postirq(struct 
serial_port *port)
                 params->irq_flags);
 }
 
-static void scif_uart_suspend(struct serial_port *port)
-{
-    BUG();
-}
-
-static void scif_uart_resume(struct serial_port *port)
-{
-    BUG();
-}
-
 static int scif_uart_tx_ready(struct serial_port *port)
 {
     struct scif_uart *uart = port->uart;
@@ -284,9 +274,6 @@ static void scif_uart_stop_tx(struct serial_port *port)
 static struct uart_driver __read_mostly scif_uart_driver = {
     .init_preirq  = scif_uart_init_preirq,
     .init_postirq = scif_uart_init_postirq,
-    .endboot      = NULL,
-    .suspend      = scif_uart_suspend,
-    .resume       = scif_uart_resume,
     .tx_ready     = scif_uart_tx_ready,
     .putc         = scif_uart_putc,
     .getc         = scif_uart_getc,
-- 
2.25.1




 


Rackspace

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