All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers
@ 2012-04-06 16:02 Joachim Eastwood
  2012-04-06 16:19 ` Joachim Eastwood
  2012-04-08 18:09 ` Hans-Christian Egtvedt
  0 siblings, 2 replies; 7+ messages in thread
From: Joachim Eastwood @ 2012-04-06 16:02 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
---
 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

diff --git a/arch/arm/include/asm/mach/serial_at91.h b/arch/arm/include/asm/mach/serial_at91.h
deleted file mode 100644
index ea6d063..0000000
--- a/arch/arm/include/asm/mach/serial_at91.h
+++ /dev/null
@@ -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
-
-
diff --git a/arch/avr32/include/asm/mach/serial_at91.h b/arch/avr32/include/asm/mach/serial_at91.h
deleted file mode 100644
index 55b317a..0000000
--- a/arch/avr32/include/asm/mach/serial_at91.h
+++ /dev/null
@@ -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
-
-
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index f9a6be7..513bc3d 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -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
-- 
1.7.9.6

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

* [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers
  2012-04-06 16:02 [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers Joachim Eastwood
@ 2012-04-06 16:19 ` Joachim Eastwood
  2012-04-08 18:09 ` Hans-Christian Egtvedt
  1 sibling, 0 replies; 7+ messages in thread
From: Joachim Eastwood @ 2012-04-06 16:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 6, 2012 at 6:02 PM, Joachim Eastwood <manabian@gmail.com> wrote:
> 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.
>
> Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
> ---
> ?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

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

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

* [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers
  2012-04-06 16:02 [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers Joachim Eastwood
  2012-04-06 16:19 ` Joachim Eastwood
@ 2012-04-08 18:09 ` Hans-Christian Egtvedt
  2012-04-08 21:21   ` Håvard Skinnemoen
  1 sibling, 1 reply; 7+ messages in thread
From: Hans-Christian Egtvedt @ 2012-04-08 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

Around Fri 06 Apr 2012 18:02:29 +0200 or thereabout, Joachim Eastwood wrote:
> 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.

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.

> Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>

Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>

<snipp diff>

-- 
mvh
Hans-Christian Egtvedt

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

* [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers
  2012-04-08 18:09 ` Hans-Christian Egtvedt
@ 2012-04-08 21:21   ` Håvard Skinnemoen
  2012-04-08 21:55     ` Andrew Victor
  0 siblings, 1 reply; 7+ messages in thread
From: Håvard Skinnemoen @ 2012-04-08 21:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 8, 2012 at 11:09 AM, Hans-Christian Egtvedt
<egtvedt@samfundet.no> wrote:
> Around Fri 06 Apr 2012 18:02:29 +0200 or thereabout, Joachim Eastwood wrote:
>> 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.
>
> 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.

>> Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
>
> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>

Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com>

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

* [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers
  2012-04-08 21:21   ` Håvard Skinnemoen
@ 2012-04-08 21:55     ` Andrew Victor
  2012-04-11 11:37       ` Nicolas Ferre
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Victor @ 2012-04-08 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

hi,

> 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

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

* [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers
  2012-04-08 21:55     ` Andrew Victor
@ 2012-04-11 11:37       ` Nicolas Ferre
  2012-04-11 16:35         ` Joachim Eastwood
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Ferre @ 2012-04-11 11:37 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/08/2012 11:55 PM, Andrew Victor :
> hi,
> 
>> 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

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,
-- 
Nicolas Ferre

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

* [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers
  2012-04-11 11:37       ` Nicolas Ferre
@ 2012-04-11 16:35         ` Joachim Eastwood
  0 siblings, 0 replies; 7+ messages in thread
From: Joachim Eastwood @ 2012-04-11 16:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 11, 2012 at 1:37 PM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> On 04/08/2012 11:55 PM, Andrew Victor :
>> hi,
>>
>>> 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
>
> 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...

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

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

end of thread, other threads:[~2012-04-11 16:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 16:02 [PATCH RFC] ARM: at91: remove at91_register_uart_fns and headers Joachim Eastwood
2012-04-06 16:19 ` Joachim Eastwood
2012-04-08 18:09 ` Hans-Christian Egtvedt
2012-04-08 21:21   ` Håvard Skinnemoen
2012-04-08 21:55     ` Andrew Victor
2012-04-11 11:37       ` Nicolas Ferre
2012-04-11 16:35         ` Joachim Eastwood

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.