linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] remove AR7 platform and associated drivers
@ 2023-09-20 20:10 Wolfram Sang
  2023-09-20 20:10 ` [PATCH 1/6] serial: 8250: remove AR7 support Wolfram Sang
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfram Sang @ 2023-09-20 20:10 UTC (permalink / raw)
  To: linux-mips
  Cc: Jonas Gorski, Florian Fainelli, Wolfram Sang, linux-arm-kernel,
	linux-kernel, linux-mtd, linux-serial, linux-watchdog, netdev

When trying to get rid of the obsolete VLYNQ bus, Jonas and Florian
pointed out that its only user, the AR7 platform can probaly go entirely
[1]. This series does exactly that. Even OpenWRT has removed support
because these devices are "stuck with 3.18" [2].

It removes the drivers first, because watchdog and network include
platform specific headers. Once the drivers are gone, we remove the
platform. The patches are based on 6.6-rc2 and created with
"--irreversible-delete" to save some space.

My suggestion is that everything is merged via the MIPS tree in one go,
so we don't have broken drivers because of missing platform headers. But
maybe there are reasons for a two-cycle removal with the drivers first
and the platform later?

Looking forward to comments.

Happy hacking,

   Wolfram


[1] https://lore.kernel.org/r/3395161f-2543-46f0-83d9-b918800305e1@gmail.com
[2] https://openwrt.org/docs/techref/targets/ar7


Wolfram Sang (6):
  serial: 8250: remove AR7 support
  mtd: parsers: ar7: remove support
  vlynq: remove bus driver
  watchdog: ar7_wdt: remove driver to prepare for platform removal
  net: cpmac: remove driver to prepare for platform removal
  MIPS: AR7: remove platform

 MAINTAINERS                             |   13 -
 arch/arm/configs/pxa_defconfig          |    1 -
 arch/mips/Kbuild.platforms              |    1 -
 arch/mips/Kconfig                       |   22 -
 arch/mips/ar7/Makefile                  |   11 -
 arch/mips/ar7/Platform                  |    5 -
 arch/mips/ar7/clock.c                   |  439 --------
 arch/mips/ar7/gpio.c                    |  332 ------
 arch/mips/ar7/irq.c                     |  165 ---
 arch/mips/ar7/memory.c                  |   51 -
 arch/mips/ar7/platform.c                |  722 -------------
 arch/mips/ar7/prom.c                    |  256 -----
 arch/mips/ar7/setup.c                   |   93 --
 arch/mips/ar7/time.c                    |   31 -
 arch/mips/boot/compressed/uart-16550.c  |    5 -
 arch/mips/configs/ar7_defconfig         |  119 ---
 arch/mips/include/asm/mach-ar7/ar7.h    |  191 ----
 arch/mips/include/asm/mach-ar7/irq.h    |   16 -
 arch/mips/include/asm/mach-ar7/prom.h   |   12 -
 arch/mips/include/asm/mach-ar7/spaces.h |   22 -
 drivers/Kconfig                         |    2 -
 drivers/Makefile                        |    1 -
 drivers/mtd/parsers/Kconfig             |    5 -
 drivers/mtd/parsers/Makefile            |    1 -
 drivers/mtd/parsers/ar7part.c           |  129 ---
 drivers/net/ethernet/ti/Kconfig         |    9 +-
 drivers/net/ethernet/ti/Makefile        |    1 -
 drivers/net/ethernet/ti/cpmac.c         | 1251 -----------------------
 drivers/tty/serial/8250/8250_port.c     |    7 -
 drivers/vlynq/Kconfig                   |   21 -
 drivers/vlynq/Makefile                  |    6 -
 drivers/vlynq/vlynq.c                   |  799 ---------------
 drivers/watchdog/Kconfig                |    6 -
 drivers/watchdog/Makefile               |    1 -
 drivers/watchdog/ar7_wdt.c              |  315 ------
 include/linux/vlynq.h                   |  149 ---
 include/uapi/linux/serial_core.h        |    1 -
 37 files changed, 1 insertion(+), 5210 deletions(-)
 delete mode 100644 arch/mips/ar7/Makefile
 delete mode 100644 arch/mips/ar7/Platform
 delete mode 100644 arch/mips/ar7/clock.c
 delete mode 100644 arch/mips/ar7/gpio.c
 delete mode 100644 arch/mips/ar7/irq.c
 delete mode 100644 arch/mips/ar7/memory.c
 delete mode 100644 arch/mips/ar7/platform.c
 delete mode 100644 arch/mips/ar7/prom.c
 delete mode 100644 arch/mips/ar7/setup.c
 delete mode 100644 arch/mips/ar7/time.c
 delete mode 100644 arch/mips/configs/ar7_defconfig
 delete mode 100644 arch/mips/include/asm/mach-ar7/ar7.h
 delete mode 100644 arch/mips/include/asm/mach-ar7/irq.h
 delete mode 100644 arch/mips/include/asm/mach-ar7/prom.h
 delete mode 100644 arch/mips/include/asm/mach-ar7/spaces.h
 delete mode 100644 drivers/mtd/parsers/ar7part.c
 delete mode 100644 drivers/net/ethernet/ti/cpmac.c
 delete mode 100644 drivers/vlynq/Kconfig
 delete mode 100644 drivers/vlynq/Makefile
 delete mode 100644 drivers/vlynq/vlynq.c
 delete mode 100644 drivers/watchdog/ar7_wdt.c
 delete mode 100644 include/linux/vlynq.h

-- 
2.35.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-20 20:10 [PATCH 0/6] remove AR7 platform and associated drivers Wolfram Sang
@ 2023-09-20 20:10 ` Wolfram Sang
  2023-09-20 21:25   ` Florian Fainelli
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Wolfram Sang @ 2023-09-20 20:10 UTC (permalink / raw)
  To: linux-mips
  Cc: Jonas Gorski, Florian Fainelli, Wolfram Sang, Greg Kroah-Hartman,
	Jiri Slaby, linux-kernel, linux-serial

AR7 is going to be removed from the Kernel, so remove its type
definition from 8250 code. As with previous removals, I checked with
Debian Code Search that 'PORT_AR7' is not used in userspace.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/tty/serial/8250/8250_port.c | 7 -------
 include/uapi/linux/serial_core.h    | 1 -
 2 files changed, 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index fb891b67968f..a4f5d792679a 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -170,13 +170,6 @@ static const struct serial8250_config uart_config[] = {
 		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
 		.flags		= UART_CAP_FIFO,
 	},
-	[PORT_AR7] = {
-		.name		= "AR7",
-		.fifo_size	= 16,
-		.tx_loadsz	= 16,
-		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_00,
-		.flags		= UART_CAP_FIFO /* | UART_CAP_AFE */,
-	},
 	[PORT_U6_16550A] = {
 		.name		= "U6_16550A",
 		.fifo_size	= 64,
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
index add349889d0a..3b51901926f9 100644
--- a/include/uapi/linux/serial_core.h
+++ b/include/uapi/linux/serial_core.h
@@ -32,7 +32,6 @@
 #define PORT_XSCALE	15
 #define PORT_RM9000	16	/* PMC-Sierra RM9xxx internal UART */
 #define PORT_OCTEON	17	/* Cavium OCTEON internal UART */
-#define PORT_AR7	18	/* Texas Instruments AR7 internal UART */
 #define PORT_U6_16550A	19	/* ST-Ericsson U6xxx internal UART */
 #define PORT_TEGRA	20	/* NVIDIA Tegra internal UART */
 #define PORT_XR17D15X	21	/* Exar XR17D15x UART */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-20 20:10 ` [PATCH 1/6] serial: 8250: remove AR7 support Wolfram Sang
@ 2023-09-20 21:25   ` Florian Fainelli
  2023-09-21  7:31   ` Greg Kroah-Hartman
  2023-09-21 10:36   ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2023-09-20 21:25 UTC (permalink / raw)
  To: Wolfram Sang, linux-mips
  Cc: Jonas Gorski, Greg Kroah-Hartman, Jiri Slaby, linux-kernel,
	linux-serial

On 9/20/23 13:10, Wolfram Sang wrote:
> AR7 is going to be removed from the Kernel, so remove its type
> definition from 8250 code. As with previous removals, I checked with
> Debian Code Search that 'PORT_AR7' is not used in userspace.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-20 20:10 ` [PATCH 1/6] serial: 8250: remove AR7 support Wolfram Sang
  2023-09-20 21:25   ` Florian Fainelli
@ 2023-09-21  7:31   ` Greg Kroah-Hartman
  2023-09-21 10:36   ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2023-09-21  7:31 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mips, Jonas Gorski, Florian Fainelli, Jiri Slaby,
	linux-kernel, linux-serial

On Wed, Sep 20, 2023 at 10:10:27PM +0200, Wolfram Sang wrote:
> AR7 is going to be removed from the Kernel, so remove its type
> definition from 8250 code. As with previous removals, I checked with
> Debian Code Search that 'PORT_AR7' is not used in userspace.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-20 20:10 ` [PATCH 1/6] serial: 8250: remove AR7 support Wolfram Sang
  2023-09-20 21:25   ` Florian Fainelli
  2023-09-21  7:31   ` Greg Kroah-Hartman
@ 2023-09-21 10:36   ` Philippe Mathieu-Daudé
  2023-09-21 11:16     ` Andy Shevchenko
  2023-09-21 11:18     ` Andy Shevchenko
  2 siblings, 2 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-09-21 10:36 UTC (permalink / raw)
  To: Wolfram Sang, linux-mips
  Cc: Jonas Gorski, Florian Fainelli, Greg Kroah-Hartman, Jiri Slaby,
	linux-kernel, linux-serial, Andy Shevchenko

Hi Wolfram,

(Adding Andy for commit 54b45ee8bd42 "serial: core: Remove
unused PORT_* definitions").

On 20/9/23 22:10, Wolfram Sang wrote:
> AR7 is going to be removed from the Kernel, so remove its type
> definition from 8250 code. As with previous removals, I checked with
> Debian Code Search that 'PORT_AR7' is not used in userspace.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>   drivers/tty/serial/8250/8250_port.c | 7 -------
>   include/uapi/linux/serial_core.h    | 1 -
>   2 files changed, 8 deletions(-)


> diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
> index add349889d0a..3b51901926f9 100644
> --- a/include/uapi/linux/serial_core.h
> +++ b/include/uapi/linux/serial_core.h
> @@ -32,7 +32,6 @@
>   #define PORT_XSCALE	15
>   #define PORT_RM9000	16	/* PMC-Sierra RM9xxx internal UART */
>   #define PORT_OCTEON	17	/* Cavium OCTEON internal UART */
> -#define PORT_AR7	18	/* Texas Instruments AR7 internal UART */

I'm a bit surprised definitions are removed from the uAPI, isn't
it expected to be very stable? Shouldn't it be better to keep it
defined but modify the comment, mentioning "obsolete" or "deprecated"?

Regards,

Phil.

>   #define PORT_U6_16550A	19	/* ST-Ericsson U6xxx internal UART */
>   #define PORT_TEGRA	20	/* NVIDIA Tegra internal UART */
>   #define PORT_XR17D15X	21	/* Exar XR17D15x UART */


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-21 10:36   ` Philippe Mathieu-Daudé
@ 2023-09-21 11:16     ` Andy Shevchenko
  2023-09-21 11:21       ` Jiri Slaby
  2023-09-21 11:18     ` Andy Shevchenko
  1 sibling, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2023-09-21 11:16 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Wolfram Sang, linux-mips, Jonas Gorski, Florian Fainelli,
	Greg Kroah-Hartman, Jiri Slaby, linux-kernel, linux-serial

On Thu, Sep 21, 2023 at 12:36:05PM +0200, Philippe Mathieu-Daudé wrote:
> On 20/9/23 22:10, Wolfram Sang wrote:

> > --- a/include/uapi/linux/serial_core.h
> > +++ b/include/uapi/linux/serial_core.h
> > @@ -32,7 +32,6 @@
> >   #define PORT_XSCALE	15
> >   #define PORT_RM9000	16	/* PMC-Sierra RM9xxx internal UART */
> >   #define PORT_OCTEON	17	/* Cavium OCTEON internal UART */
> > -#define PORT_AR7	18	/* Texas Instruments AR7 internal UART */
> 
> I'm a bit surprised definitions are removed from the uAPI, isn't
> it expected to be very stable? Shouldn't it be better to keep it
> defined but modify the comment, mentioning "obsolete" or "deprecated"?

The numbers up to 20 must stay, they are being used somewhere, setserial
implementation in busybox (IIRC).

NAK.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-21 10:36   ` Philippe Mathieu-Daudé
  2023-09-21 11:16     ` Andy Shevchenko
@ 2023-09-21 11:18     ` Andy Shevchenko
  1 sibling, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-09-21 11:18 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Wolfram Sang, linux-mips, Jonas Gorski, Florian Fainelli,
	Greg Kroah-Hartman, Jiri Slaby, linux-kernel, linux-serial

On Thu, Sep 21, 2023 at 12:36:05PM +0200, Philippe Mathieu-Daudé wrote:
> On 20/9/23 22:10, Wolfram Sang wrote:

> I'm a bit surprised definitions are removed from the uAPI, isn't
> it expected to be very stable?

They were added to uAPI by mistake to begin with. I don't know why people
still continue adding more there...

Basically we should stop to publish those numbers and move them into
internal header (except those 20 or so, that must stay).

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-21 11:16     ` Andy Shevchenko
@ 2023-09-21 11:21       ` Jiri Slaby
  2023-09-21 11:30         ` Andy Shevchenko
  2023-09-21 12:04         ` Wolfram Sang
  0 siblings, 2 replies; 10+ messages in thread
From: Jiri Slaby @ 2023-09-21 11:21 UTC (permalink / raw)
  To: Andy Shevchenko, Philippe Mathieu-Daudé
  Cc: Wolfram Sang, linux-mips, Jonas Gorski, Florian Fainelli,
	Greg Kroah-Hartman, linux-kernel, linux-serial

On 21. 09. 23, 13:16, Andy Shevchenko wrote:
> On Thu, Sep 21, 2023 at 12:36:05PM +0200, Philippe Mathieu-Daudé wrote:
>> On 20/9/23 22:10, Wolfram Sang wrote:
> 
>>> --- a/include/uapi/linux/serial_core.h
>>> +++ b/include/uapi/linux/serial_core.h
>>> @@ -32,7 +32,6 @@
>>>    #define PORT_XSCALE	15
>>>    #define PORT_RM9000	16	/* PMC-Sierra RM9xxx internal UART */
>>>    #define PORT_OCTEON	17	/* Cavium OCTEON internal UART */
>>> -#define PORT_AR7	18	/* Texas Instruments AR7 internal UART */
>>
>> I'm a bit surprised definitions are removed from the uAPI, isn't
>> it expected to be very stable? Shouldn't it be better to keep it
>> defined but modify the comment, mentioning "obsolete" or "deprecated"?
> 
> The numbers up to 20 must stay, they are being used somewhere, setserial
> implementation in busybox (IIRC).

But they define it if we don't:
#ifndef PORT_AR7
# define PORT_AR7               18
#endif

> NAK.
I don't mind either way. But likely we should reserve the field if we go 
and remove it (setserial has a number->string mapping in busybox). Hm, 
then reserving it or keep it? Perhaps keep it is better... So ack the 
NACK :).

-- 
js
suse labs


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-21 11:21       ` Jiri Slaby
@ 2023-09-21 11:30         ` Andy Shevchenko
  2023-09-21 12:04         ` Wolfram Sang
  1 sibling, 0 replies; 10+ messages in thread
From: Andy Shevchenko @ 2023-09-21 11:30 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Philippe Mathieu-Daudé, Wolfram Sang, linux-mips,
	Jonas Gorski, Florian Fainelli, Greg Kroah-Hartman, linux-kernel,
	linux-serial

On Thu, Sep 21, 2023 at 01:21:46PM +0200, Jiri Slaby wrote:
> On 21. 09. 23, 13:16, Andy Shevchenko wrote:
> > On Thu, Sep 21, 2023 at 12:36:05PM +0200, Philippe Mathieu-Daudé wrote:
> > > On 20/9/23 22:10, Wolfram Sang wrote:

...

> > > > -#define PORT_AR7	18	/* Texas Instruments AR7 internal UART */
> > > 
> > > I'm a bit surprised definitions are removed from the uAPI, isn't
> > > it expected to be very stable? Shouldn't it be better to keep it
> > > defined but modify the comment, mentioning "obsolete" or "deprecated"?
> > 
> > The numbers up to 20 must stay, they are being used somewhere, setserial
> > implementation in busybox (IIRC).
> 
> But they define it if we don't:
> #ifndef PORT_AR7
> # define PORT_AR7               18
> #endif

Yep, but the problem is that we may not use that number anyway, because two
different versions of kernel can clash on the same version of tool that will
think about AR7 while it's something different. That's why instead of having
reserved space, better to leave with names assigned.

> > NAK.
> I don't mind either way. But likely we should reserve the field if we go and
> remove it (setserial has a number->string mapping in busybox). Hm, then
> reserving it or keep it? Perhaps keep it is better... So ack the NACK :).

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/6] serial: 8250: remove AR7 support
  2023-09-21 11:21       ` Jiri Slaby
  2023-09-21 11:30         ` Andy Shevchenko
@ 2023-09-21 12:04         ` Wolfram Sang
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2023-09-21 12:04 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Andy Shevchenko, Philippe Mathieu-Daudé, linux-mips,
	Jonas Gorski, Florian Fainelli, Greg Kroah-Hartman, linux-kernel,
	linux-serial

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]


> I don't mind either way. But likely we should reserve the field if we go and
> remove it (setserial has a number->string mapping in busybox). Hm, then
> reserving it or keep it? Perhaps keep it is better... So ack the NACK :).

Okay. I will resend with this number kept.

Thanks everyone for the input!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-21 20:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 20:10 [PATCH 0/6] remove AR7 platform and associated drivers Wolfram Sang
2023-09-20 20:10 ` [PATCH 1/6] serial: 8250: remove AR7 support Wolfram Sang
2023-09-20 21:25   ` Florian Fainelli
2023-09-21  7:31   ` Greg Kroah-Hartman
2023-09-21 10:36   ` Philippe Mathieu-Daudé
2023-09-21 11:16     ` Andy Shevchenko
2023-09-21 11:21       ` Jiri Slaby
2023-09-21 11:30         ` Andy Shevchenko
2023-09-21 12:04         ` Wolfram Sang
2023-09-21 11:18     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).