ARM: at91: remove at91_register_uart_fns and headers
Subsystems (4)
RFC PATCH 1/1 ARM: at91: remove at91_register_uart_fns and headers
No AT91/AVR32 boards currently use at91_register_uart_fns so let's remove it.
The only other mach in the kernel that has a *_register_uart_fns function is SA1100 so the demand for this functionality is not great.
--- arch/arm/include/asm/mach/serial_at91.h | 33 ----------------------------- arch/avr32/include/asm/mach/serial_at91.h | 33 ----------------------------- drivers/tty/serial/atmel_serial.c | 18 ---------------- 3 files changed, 84 deletions(-) delete mode 100644 arch/arm/include/asm/mach/serial_at91.h delete mode 100644 arch/avr32/include/asm/mach/serial_at91.h
arch/arm/include/asm/mach/serial_at91.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* arch/arm/include/asm/mach/serial_at91.h -* -* Based on serial_sa1100.h by Nicolas Pitre -* -* Copyright (C) 2002 ATMEL Rousset -* -* Low level machine dependent UART functions. -*/ - -struct uart_port ; - -/* -* This is a temporary structure for registering these -* functions; it is intended to be discarded after boot. -*/ -struct atmel_port_fns { -void (*set_mctrl)(struct uart_port *,u_int ); -u_int (*get_mctrl)(struct uart_port *); -void (*enable_ms)(struct uart_port *); -void (*pm)(struct uart_port *,u_int ,u_int ); -int (*set_wake)(struct uart_port *,u_int ); -int (*open)(struct uart_port *); -void (*close)(struct uart_port *); -}; - -#if defined(CONFIG_SERIAL_ATMEL ) -void atmel_register_uart_fns (struct atmel_port_fns *fns); -#else -#define atmel_register_uart_fns (fns) do { } while (0) -#endif - -
arch/avr32/include/asm/mach/serial_at91.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* linux/include/asm-arm/mach/serial_at91.h -* -* Based on serial_sa1100.h by Nicolas Pitre -* -* Copyright (C) 2002 ATMEL Rousset -* -* Low level machine dependent UART functions. -*/ - -struct uart_port ; - -/* -* This is a temporary structure for registering these -* functions; it is intended to be discarded after boot. -*/ -struct atmel_port_fns { -void (*set_mctrl)(struct uart_port *,u_int ); -u_int (*get_mctrl)(struct uart_port *); -void (*enable_ms)(struct uart_port *); -void (*pm)(struct uart_port *,u_int ,u_int ); -int (*set_wake)(struct uart_port *,u_int ); -int (*open)(struct uart_port *); -void (*close)(struct uart_port *); -}; - -#if defined(CONFIG_SERIAL_ATMEL ) -void atmel_register_uart_fns (struct atmel_port_fns *fns); -#else -#define atmel_register_uart_fns (fns) do { } while (0) -#endif - -
drivers/tty/serial/atmel_serial.c +0 -18
@@ -43,7 +43,6 @@#include <asm/io.h> #include <asm/ioctls.h> -#include <asm/mach/serial_at91.h> #include <mach/board.h> #ifdef CONFIG_ARM
@@ -1509,23 +1508,6 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, } } -/* -* Register board-specific modem-control line handlers. -*/ -void __init atmel_register_uart_fns (struct atmel_port_fns *fns) -{ -if (fns->enable_ms) - atmel_pops.enable_ms = fns->enable_ms; -if (fns->get_mctrl) - atmel_pops.get_mctrl = fns->get_mctrl; -if (fns->set_mctrl) - atmel_pops.set_mctrl = fns->set_mctrl; - atmel_open_hook = fns->open; - atmel_close_hook = fns->close; - atmel_pops.pm = fns->pm; - atmel_pops.set_wake = fns->set_wake; -} -struct platform_device *atmel_default_console_device;/* the serial console device */ #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
Signature · 1 line
1.7.9.6
RFC PATCH 1/1 ARM: at91: remove at91_register_uart_fns and headers
Quoted 5 lines · Joachim Eastwood
No AT91/AVR32 boards currently use
at91_register_uart_fnsso let's remove it.The only other mach in the kernel that has a
*_register_uart_fnsfunction is SA1100 so the demand for this functionality is not great.
Quoted 8 lines
Signed-off-by Joachim Eastwood <[email protected]>---
?arch/arm/include/asm/mach/serial_at91.h ? | ? 33 ----------------------------- ?arch/avr32/include/asm/mach/serial_at91.h | ? 33 ----------------------------- ?drivers/tty/serial/atmel_serial.c ? ? ? ? | ? 18 ----------------?3 files changed, 84 deletions(-)
?delete mode 100644arch/arm/include/asm/mach/serial_at91.h?delete mode 100644arch/avr32/include/asm/mach/serial_at91.h
I forgot to remove the atmel_open_hook/atmel_close_hook from the driver. (This shaves off another 22 lines)
If nobody objects to the removal of at91_register_uart_fns I'll send an updated patch.
regards
Joachim Eastwood
RFC PATCH 1/1 ARM: at91: remove at91_register_uart_fns and headers
In reply to Joachim EastwoodQuoted 4 lines · Joachim Eastwood
No AT91/AVR32 boards currently use
at91_register_uart_fnsso let's remove it.The only other mach in the kernel that has a
*_register_uart_fnsfunction is SA1100 so the demand for this functionality is not great.
I agree with your statement, and I've never used this functionality. I'll leave it to Nicolas to decide, AFAIK there are no AVR32 users of these functions, if there are, they've never submitted any board code upstream.
Quoted 1 line
Signed-off-by Joachim Eastwood <[email protected]>
<snipp diff>
Signature · 2 lines
mvh Hans-Christian Egtvedt
RFC PATCH 1/1 ARM: at91: remove at91_register_uart_fns and headers
Quoted 9 lines · Hans-Christian Egtvedt
Quoted 4 lines · Joachim Eastwood
No AT91/AVR32 boards currently use
at91_register_uart_fnsso let's remove it.The only other mach in the kernel that has a
*_register_uart_fnsfunction is SA1100 so the demand for this functionality is not great.I agree with your statement, and I've never used this functionality. I'll leave it to Nicolas to decide, AFAIK there are no AVR32 users of these functions, if there are, they've never submitted any board code upstream.
Yeah, as far as I know, nobody ever used this functionality on AVR32. In fact, I can't even think of a reason to use it.
But I seem to recall submitting a patch to remove this functionality a long time ago, and it was struck down. I don't remember the reason, but there's a chance it might still be valid. The AT91 people should know.
Quoted 3 lines
Quoted 1 line
Signed-off-by Joachim Eastwood <[email protected]>
RFC PATCH 1/1 ARM: at91: remove at91_register_uart_fns and headers
hi,
Quoted 6 lines
Yeah, as far as I know, nobody ever used this functionality on AVR32. In fact, I can't even think of a reason to use it.
But I seem to recall submitting a patch to remove this functionality a long time ago, and it was struck down. I don't remember the reason, but there's a chance it might still be valid.
Some of the SAN People / Multenet AT91RM9200 boards needed it.... We needed to use GPIO pins for some of the modem-control signals - couldn't use the standard pins since the alternate pin function was being used.
Regards,
Andrew Victor
RFC PATCH 1/1 ARM: at91: remove at91_register_uart_fns and headers
On 04/08/2012 11:55 PM, Andrew Victor :
Quoted 9 lines
hi,
Quoted 6 lines
Yeah, as far as I know, nobody ever used this functionality on AVR32. In fact, I can't even think of a reason to use it.
But I seem to recall submitting a patch to remove this functionality a long time ago, and it was struck down. I don't remember the reason, but there's a chance it might still be valid.
Quoted 7 lines
Some of the SAN People / Multenet AT91RM9200 boards needed it.... We needed to use GPIO pins for some of the modem-control signals - couldn't use the standard pins since the alternate pin function was being used.
Regards,
Andrew Victor
Hi Andrew,
Well if it is of some interest on your side, I am in favor of keeping this feature. It is not a so big amount of code and seems quite easy to maintain...
Thanks a lot to all for your feedback anyway.
Cheers,
Signature · 1 line
Nicolas Ferre
RFC PATCH 1/1 ARM: at91: remove at91_register_uart_fns and headers
Quoted 15 lines · Nicolas Ferre
On 04/08/2012 11:55 PM, Andrew Victor :
Quoted 14 lines
hi,
Quoted 6 lines
Yeah, as far as I know, nobody ever used this functionality on AVR32. In fact, I can't even think of a reason to use it.
But I seem to recall submitting a patch to remove this functionality a long time ago, and it was struck down. I don't remember the reason, but there's a chance it might still be valid.
Some of the SAN People / Multenet AT91RM9200 boards needed it.... We needed to use GPIO pins for some of the modem-control signals - couldn't use the standard pins since the alternate pin function was being used.
Quoted 8 lines
Quoted 2 lines
Regards,
?Andrew VictorHi Andrew,
Well if it is of some interest on your side, I am in favor of keeping this feature. It is not a so big amount of code and seems quite easy to maintain...
It's not a big deal for me whether the code stays or not. The only reason I bumped into it was while trying to get atmel_serial to compile as a module and the serial_at91.h header generated some build error.
But still, why keep a feature with no mainline users. A new kernel feature is never accepted without any users.
I also think it's hard to maintain the code without any users. I may be easy to preserve the code but you can never change/improve the code since you can't change the users of the code.
regards
Joachim Eastwood