* [PATCH] serial: imx: Remove unused platform data support
@ 2020-11-10 21:48 Fabio Estevam
2020-11-11 2:08 ` [EXT] " Andy Duan
2020-11-11 9:57 ` Uwe Kleine-König
0 siblings, 2 replies; 5+ messages in thread
From: Fabio Estevam @ 2020-11-10 21:48 UTC (permalink / raw)
To: gregkh; +Cc: s.hauer, linux-serial, fugang.duan, Fabio Estevam
Since 5.10-rc1 i.MX is a devicetree-only platform and the existing
platform data support in this driver was only useful for old non-devicetree
platforms.
Get rid of the platform data support since it is no longer used.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/tty/serial/imx.c | 32 +++---------------------
include/linux/platform_data/serial-imx.h | 15 -----------
2 files changed, 3 insertions(+), 44 deletions(-)
delete mode 100644 include/linux/platform_data/serial-imx.h
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1731d9728865..7ce38ade9a8e 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -30,7 +30,6 @@
#include <linux/dma-mapping.h>
#include <asm/irq.h>
-#include <linux/platform_data/serial-imx.h>
#include <linux/platform_data/dma-imx.h>
#include "serial_mctrl_gpio.h"
@@ -2191,10 +2190,9 @@ static struct uart_driver imx_uart_uart_driver = {
.cons = IMX_CONSOLE,
};
-#ifdef CONFIG_OF
/*
- * This function returns 1 iff pdev isn't a device instatiated by dt, 0 iff it
- * could successfully get all information from dt or a negative errno.
+ * This function returns 0 iff it could successfully get all information
+ * from dt or a negative errno.
*/
static int imx_uart_probe_dt(struct imx_port *sport,
struct platform_device *pdev)
@@ -2232,28 +2230,6 @@ static int imx_uart_probe_dt(struct imx_port *sport,
return 0;
}
-#else
-static inline int imx_uart_probe_dt(struct imx_port *sport,
- struct platform_device *pdev)
-{
- return 1;
-}
-#endif
-
-static void imx_uart_probe_pdata(struct imx_port *sport,
- struct platform_device *pdev)
-{
- struct imxuart_platform_data *pdata = dev_get_platdata(&pdev->dev);
-
- sport->port.line = pdev->id;
- sport->devdata = (struct imx_uart_data *) pdev->id_entry->driver_data;
-
- if (!pdata)
- return;
-
- if (pdata->flags & IMXUART_HAVE_RTSCTS)
- sport->have_rtscts = 1;
-}
static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t)
{
@@ -2295,9 +2271,7 @@ static int imx_uart_probe(struct platform_device *pdev)
return -ENOMEM;
ret = imx_uart_probe_dt(sport, pdev);
- if (ret > 0)
- imx_uart_probe_pdata(sport, pdev);
- else if (ret < 0)
+ if (ret < 0)
return ret;
if (sport->port.line >= ARRAY_SIZE(imx_uart_ports)) {
diff --git a/include/linux/platform_data/serial-imx.h b/include/linux/platform_data/serial-imx.h
deleted file mode 100644
index 0844b21372c7..000000000000
--- a/include/linux/platform_data/serial-imx.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
- */
-
-#ifndef ASMARM_ARCH_UART_H
-#define ASMARM_ARCH_UART_H
-
-#define IMXUART_HAVE_RTSCTS (1<<0)
-
-struct imxuart_platform_data {
- unsigned int flags;
-};
-
-#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [EXT] [PATCH] serial: imx: Remove unused platform data support
2020-11-10 21:48 [PATCH] serial: imx: Remove unused platform data support Fabio Estevam
@ 2020-11-11 2:08 ` Andy Duan
2020-11-11 9:57 ` Uwe Kleine-König
1 sibling, 0 replies; 5+ messages in thread
From: Andy Duan @ 2020-11-11 2:08 UTC (permalink / raw)
To: Fabio Estevam, gregkh; +Cc: s.hauer, linux-serial
From: Fabio Estevam <festevam@gmail.com> Sent: Wednesday, November 11, 2020 5:49 AM
> Since 5.10-rc1 i.MX is a devicetree-only platform and the existing platform data
> support in this driver was only useful for old non-devicetree platforms.
>
> Get rid of the platform data support since it is no longer used.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
> ---
> drivers/tty/serial/imx.c | 32 +++---------------------
> include/linux/platform_data/serial-imx.h | 15 -----------
> 2 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644
> include/linux/platform_data/serial-imx.h
>
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index
> 1731d9728865..7ce38ade9a8e 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -30,7 +30,6 @@
> #include <linux/dma-mapping.h>
>
> #include <asm/irq.h>
> -#include <linux/platform_data/serial-imx.h>
> #include <linux/platform_data/dma-imx.h>
>
> #include "serial_mctrl_gpio.h"
> @@ -2191,10 +2190,9 @@ static struct uart_driver imx_uart_uart_driver = {
> .cons = IMX_CONSOLE,
> };
>
> -#ifdef CONFIG_OF
> /*
> - * This function returns 1 iff pdev isn't a device instatiated by dt, 0 iff it
> - * could successfully get all information from dt or a negative errno.
> + * This function returns 0 iff it could successfully get all
> + information
> + * from dt or a negative errno.
> */
> static int imx_uart_probe_dt(struct imx_port *sport,
> struct platform_device *pdev) @@
> -2232,28 +2230,6 @@ static int imx_uart_probe_dt(struct imx_port *sport,
>
> return 0;
> }
> -#else
> -static inline int imx_uart_probe_dt(struct imx_port *sport,
> - struct platform_device *pdev)
> -{
> - return 1;
> -}
> -#endif
> -
> -static void imx_uart_probe_pdata(struct imx_port *sport,
> - struct platform_device *pdev)
> -{
> - struct imxuart_platform_data *pdata =
> dev_get_platdata(&pdev->dev);
> -
> - sport->port.line = pdev->id;
> - sport->devdata = (struct imx_uart_data *)
> pdev->id_entry->driver_data;
> -
> - if (!pdata)
> - return;
> -
> - if (pdata->flags & IMXUART_HAVE_RTSCTS)
> - sport->have_rtscts = 1;
> -}
>
> static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) { @@
> -2295,9 +2271,7 @@ static int imx_uart_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> ret = imx_uart_probe_dt(sport, pdev);
> - if (ret > 0)
> - imx_uart_probe_pdata(sport, pdev);
> - else if (ret < 0)
> + if (ret < 0)
> return ret;
>
> if (sport->port.line >= ARRAY_SIZE(imx_uart_ports)) { diff --git
> a/include/linux/platform_data/serial-imx.h
> b/include/linux/platform_data/serial-imx.h
> deleted file mode 100644
> index 0844b21372c7..000000000000
> --- a/include/linux/platform_data/serial-imx.h
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-or-later */
> -/*
> - * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
> - */
> -
> -#ifndef ASMARM_ARCH_UART_H
> -#define ASMARM_ARCH_UART_H
> -
> -#define IMXUART_HAVE_RTSCTS (1<<0)
> -
> -struct imxuart_platform_data {
> - unsigned int flags;
> -};
> -
> -#endif
> --
> 2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: imx: Remove unused platform data support
2020-11-10 21:48 [PATCH] serial: imx: Remove unused platform data support Fabio Estevam
2020-11-11 2:08 ` [EXT] " Andy Duan
@ 2020-11-11 9:57 ` Uwe Kleine-König
2020-11-11 12:36 ` Fabio Estevam
1 sibling, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2020-11-11 9:57 UTC (permalink / raw)
To: Fabio Estevam; +Cc: gregkh, s.hauer, linux-serial, fugang.duan
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
Hello,
On Tue, Nov 10, 2020 at 06:48:40PM -0300, Fabio Estevam wrote:
> Since 5.10-rc1 i.MX is a devicetree-only platform and the existing
> platform data support in this driver was only useful for old non-devicetree
> platforms.
>
> Get rid of the platform data support since it is no longer used.
Great, I missed that platform data support is gone.
Is it a problem if you build with SERIAL_IMX=y, COMPILE_TEST=y and
ARCH_MXC + CONFIG_OF unset?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: imx: Remove unused platform data support
2020-11-11 9:57 ` Uwe Kleine-König
@ 2020-11-11 12:36 ` Fabio Estevam
2020-11-11 17:19 ` Uwe Kleine-König
0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2020-11-11 12:36 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Greg Kroah-Hartman, Sascha Hauer, linux-serial, Fugang Duan
Hi Uwe,
On Wed, Nov 11, 2020 at 6:57 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> Is it a problem if you build with SERIAL_IMX=y, COMPILE_TEST=y and
> ARCH_MXC + CONFIG_OF unset?
I tried your suggested combination and it built fine.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: imx: Remove unused platform data support
2020-11-11 12:36 ` Fabio Estevam
@ 2020-11-11 17:19 ` Uwe Kleine-König
0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2020-11-11 17:19 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Greg Kroah-Hartman, Sascha Hauer, linux-serial, Fugang Duan
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
On Wed, Nov 11, 2020 at 09:36:44AM -0300, Fabio Estevam wrote:
> Hi Uwe,
>
> On Wed, Nov 11, 2020 at 6:57 AM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
>
> > Is it a problem if you build with SERIAL_IMX=y, COMPILE_TEST=y and
> > ARCH_MXC + CONFIG_OF unset?
>
> I tried your suggested combination and it built fine.
fine, then:
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-11 17:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 21:48 [PATCH] serial: imx: Remove unused platform data support Fabio Estevam
2020-11-11 2:08 ` [EXT] " Andy Duan
2020-11-11 9:57 ` Uwe Kleine-König
2020-11-11 12:36 ` Fabio Estevam
2020-11-11 17:19 ` Uwe Kleine-König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.