* Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW
2005-08-31 9:33 [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Russell King
@ 2005-08-31 13:00 ` Alan Cox
2005-08-31 12:52 ` Russell King
2005-08-31 15:49 ` Alan Cox
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Alan Cox @ 2005-08-31 13:00 UTC (permalink / raw)
To: Russell King; +Cc: Linux Kernel List, amax, ralf, starvik
On Mer, 2005-08-31 at 10:33 +0100, Russell King wrote:
> Unfortunately, it appears that some of these drivers do not contain
> email addresses for their maintainers, neither are they listed in
> the MAINTAINERS file. (mwavedd and serial_txx9).
I'll have a quick look at mwave. If I remember rightly it just needs to
tell someone that an "ISA" 16450 serial port materialised by magic at
the addresses it selected.
The mwave firmware is loaded into a DSP and until its loaded there isn't
a serial port.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW
2005-08-31 13:00 ` Alan Cox
@ 2005-08-31 12:52 ` Russell King
2005-08-31 13:38 ` Alan Cox
0 siblings, 1 reply; 10+ messages in thread
From: Russell King @ 2005-08-31 12:52 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux Kernel List, amax, ralf, starvik
On Wed, Aug 31, 2005 at 02:00:24PM +0100, Alan Cox wrote:
> On Mer, 2005-08-31 at 10:33 +0100, Russell King wrote:
> > Unfortunately, it appears that some of these drivers do not contain
> > email addresses for their maintainers, neither are they listed in
> > the MAINTAINERS file. (mwavedd and serial_txx9).
>
> I'll have a quick look at mwave. If I remember rightly it just needs to
> tell someone that an "ISA" 16450 serial port materialised by magic at
> the addresses it selected.
Thanks Alan.
I think that it shouldn't be too big a problem - maybe just using
serial8250_register_port() and serial8250_unregister_port() instead
of register_serial()/unregister_serial(), and changing the structure.
The key thing is that port.dev should be set appropriately and the
relevant calls to serial8250_suspend_port/serial8250_resume_port
be made (or port.dev should be NULL if no power management is
expected - in which case it may be managed as a generic platform
port.)
Also, port.uartclk must be set, and since this is an add-in card,
it should not be using BASE_BAUD but the clock rate for the UART
on the card itself. (BASE_BAUD being an architecture defined
constant has no business being used in connection with add-in
cards with on-board UART clock generators.)
I hope the above is useful, thanks.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW
2005-08-31 12:52 ` Russell King
@ 2005-08-31 13:38 ` Alan Cox
0 siblings, 0 replies; 10+ messages in thread
From: Alan Cox @ 2005-08-31 13:38 UTC (permalink / raw)
To: Russell King; +Cc: Linux Kernel List, amax, ralf, starvik
On Mer, 2005-08-31 at 13:52 +0100, Russell King wrote:
> The key thing is that port.dev should be set appropriately and the
> relevant calls to serial8250_suspend_port/serial8250_resume_port
> be made (or port.dev should be NULL if no power management is
> expected - in which case it may be managed as a generic platform
> port.)
Thanks. Thats all I needed to know to whack that into shape once I've
put a legacy 32bit build environment back together for this and for
something akpm wants me to fix in another diff.
Power management is umm special. The port will die on suspend/resume via
Linux (via APM seems to be ok) and need a userspace firmware reload to
come back.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW
2005-08-31 9:33 [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Russell King
2005-08-31 13:00 ` Alan Cox
@ 2005-08-31 15:49 ` Alan Cox
2005-09-01 23:12 ` [2.6 patch] drivers/serial/crisv10.c: remove {,un}register_serial dummies Adrian Bunk
2005-09-07 19:12 ` [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Max Asbock
3 siblings, 0 replies; 10+ messages in thread
From: Alan Cox @ 2005-08-31 15:49 UTC (permalink / raw)
To: Russell King; +Cc: Linux Kernel List, amax, ralf, starvik
I think this is all that is needed for Mwave.
Signed-off-by: Alan Cox <alan@redhat.com>
--- ../linux.vanilla-2.6.13-rc6-mm2/drivers/char/mwave/mwavedd.c 2005-08-25 17:04:20.000000000 +0100
+++ drivers/char/mwave/mwavedd.c 2005-08-31 16:16:29.128028248 +0100
@@ -57,6 +57,7 @@
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
+#include <linux/serial_8250.h>
#include "smapi.h"
#include "mwavedd.h"
#include "3780i.h"
@@ -410,8 +411,8 @@
static int register_serial_portandirq(unsigned int port, int irq)
{
- struct serial_struct serial;
-
+ struct uart_port uart;
+
switch ( port ) {
case 0x3f8:
case 0x2f8:
@@ -442,12 +443,14 @@
} /* switch */
/* irq is okay */
- memset(&serial, 0, sizeof(serial));
- serial.port = port;
- serial.irq = irq;
- serial.flags = ASYNC_SHARE_IRQ;
-
- return register_serial(&serial);
+ memset(&uart, 0, sizeof(struct uart_port));
+
+ uart.uartclk = 1843200;
+ uart.iobase = port;
+ uart.irq = irq;
+ uart.iotype = UPIO_PORT;
+ uart.flags = UPF_SHARE_IRQ;
+ return serial8250_register_port(&uart);
}
@@ -523,7 +526,7 @@
#endif
if ( pDrvData->sLine >= 0 ) {
- unregister_serial(pDrvData->sLine);
+ serial8250_unregister_port(pDrvData->sLine);
}
if (pDrvData->bMwaveDevRegistered) {
misc_deregister(&mwave_misc_dev);
^ permalink raw reply [flat|nested] 10+ messages in thread* [2.6 patch] drivers/serial/crisv10.c: remove {,un}register_serial dummies
2005-08-31 9:33 [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Russell King
2005-08-31 13:00 ` Alan Cox
2005-08-31 15:49 ` Alan Cox
@ 2005-09-01 23:12 ` Adrian Bunk
2005-09-02 15:58 ` Russell King
2005-09-07 19:12 ` [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Max Asbock
3 siblings, 1 reply; 10+ messages in thread
From: Adrian Bunk @ 2005-09-01 23:12 UTC (permalink / raw)
To: Linux Kernel List, amax, ralf, starvik; +Cc: dev-etrax
On Wed, Aug 31, 2005 at 10:33:52AM +0100, Russell King wrote:
>...
> In addition, the following drivers declare functions of the same name.
> The maintainers of these need to look to see why, and eliminate them
> where possible.
>
> drivers/serial/crisv10.c:register_serial(struct serial_struct *req)
> drivers/serial/crisv10.c:void unregister_serial(int line)
It seems we can simply kill these dummies with this patch.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.13-mm1-full/drivers/serial/crisv10.c.old 2005-09-02 01:10:07.000000000 +0200
+++ linux-2.6.13-mm1-full/drivers/serial/crisv10.c 2005-09-02 01:10:27.000000000 +0200
@@ -5038,17 +5038,3 @@
/* this makes sure that rs_init is called during kernel boot */
module_init(rs_init);
-
-/*
- * register_serial and unregister_serial allows for serial ports to be
- * configured at run-time, to support PCMCIA modems.
- */
-int
-register_serial(struct serial_struct *req)
-{
- return -1;
-}
-
-void unregister_serial(int line)
-{
-}
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [2.6 patch] drivers/serial/crisv10.c: remove {,un}register_serial dummies
2005-09-01 23:12 ` [2.6 patch] drivers/serial/crisv10.c: remove {,un}register_serial dummies Adrian Bunk
@ 2005-09-02 15:58 ` Russell King
0 siblings, 0 replies; 10+ messages in thread
From: Russell King @ 2005-09-02 15:58 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Linux Kernel List, amax, ralf, starvik, dev-etrax
On Fri, Sep 02, 2005 at 01:12:58AM +0200, Adrian Bunk wrote:
> On Wed, Aug 31, 2005 at 10:33:52AM +0100, Russell King wrote:
> >...
> > In addition, the following drivers declare functions of the same name.
> > The maintainers of these need to look to see why, and eliminate them
> > where possible.
> >
> > drivers/serial/crisv10.c:register_serial(struct serial_struct *req)
> > drivers/serial/crisv10.c:void unregister_serial(int line)
>
> It seems we can simply kill these dummies with this patch.
Thanks, applied.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW
2005-08-31 9:33 [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Russell King
` (2 preceding siblings ...)
2005-09-01 23:12 ` [2.6 patch] drivers/serial/crisv10.c: remove {,un}register_serial dummies Adrian Bunk
@ 2005-09-07 19:12 ` Max Asbock
2005-09-07 19:25 ` Russell King
3 siblings, 1 reply; 10+ messages in thread
From: Max Asbock @ 2005-09-07 19:12 UTC (permalink / raw)
To: Russell King; +Cc: Linux Kernel List, amax, ralf, starvik
On Wed, 2005-08-31 at 02:33, Russell King wrote:
> As per the feature-removal.txt file, I will be removing the following
> functions shortly:
>
> * register_serial
> * unregister_serial
> * uart_register_port
> * uart_unregister_port
>
> However, there are still some drivers which use these functions:
>
> drivers/char/mwave/mwavedd.c: return register_serial(&serial);
> drivers/char/mwave/mwavedd.c: unregister_serial(pDrvData->sLine);
> drivers/misc/ibmasm/uart.c: sp->serial_line = register_serial(&serial);
> drivers/misc/ibmasm/uart.c: unregister_serial(sp->serial_line);
> drivers/net/ioc3-eth.c: register_serial(&req);
> drivers/net/ioc3-eth.c: register_serial(&req);
> drivers/serial/serial_txx9.c: line = uart_register_port(&serial_txx9_reg, &port);
> drivers/serial/serial_txx9.c: uart_unregister_port(&serial_txx9_reg, line);
>
> These drivers really really really need fixing in the next few days
> if they aren't going to break. I hereby ask that the maintainers of
> the above drivers show some willingness to update their drivers.
>
Here is a patch for the ibmasm driver. Let me know it I missed
something.
thanks,
max
diff -urNp linux-2.6.13-git6/drivers/misc/Kconfig linux-2.6.13-git6-ibmasm/drivers/misc/Kconfig
--- linux-2.6.13-git6/drivers/misc/Kconfig 2005-09-06 13:42:34.000000000 -0700
+++ linux-2.6.13-git6-ibmasm/drivers/misc/Kconfig 2005-09-07 12:09:09.000000000 -0700
@@ -6,7 +6,7 @@ menu "Misc devices"
config IBM_ASM
tristate "Device driver for IBM RSA service processor"
- depends on X86 && PCI && EXPERIMENTAL && BROKEN
+ depends on X86 && PCI && EXPERIMENTAL
---help---
This option enables device driver support for in-band access to the
IBM RSA (Condor) service processor in eServer xSeries systems.
diff -urNp linux-2.6.13-git6/drivers/misc/ibmasm/uart.c linux-2.6.13-git6-ibmasm/drivers/misc/ibmasm/uart.c
--- linux-2.6.13-git6/drivers/misc/ibmasm/uart.c 2005-09-06 13:42:34.000000000 -0700
+++ linux-2.6.13-git6-ibmasm/drivers/misc/ibmasm/uart.c 2005-09-06 13:43:45.000000000 -0700
@@ -27,13 +27,14 @@
#include <linux/serial_core.h>
#include <linux/serial.h>
#include <linux/serial_reg.h>
+#include <linux/serial_8250.h>
#include "ibmasm.h"
#include "lowlevel.h"
void ibmasm_register_uart(struct service_processor *sp)
{
- struct serial_struct serial;
+ struct uart_port uport;
void __iomem *iomem_base;
iomem_base = sp->base_address + SCOUT_COM_B_BASE;
@@ -47,14 +48,14 @@ void ibmasm_register_uart(struct service
return;
}
- memset(&serial, 0, sizeof(serial));
- serial.irq = sp->irq;
- serial.baud_base = 3686400 / 16;
- serial.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ;
- serial.io_type = UPIO_MEM;
- serial.iomem_base = iomem_base;
+ memset(&uport, 0, sizeof(struct uart_port));
+ uport.irq = sp->irq;
+ uport.uartclk = 3686400;
+ uport.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ;
+ uport.iotype = UPIO_MEM;
+ uport.membase = iomem_base;
- sp->serial_line = register_serial(&serial);
+ sp->serial_line = serial8250_register_port(&uport);
if (sp->serial_line < 0) {
dev_err(sp->dev, "Failed to register serial port\n");
return;
@@ -68,5 +69,5 @@ void ibmasm_unregister_uart(struct servi
return;
disable_uart_interrupts(sp->base_address);
- unregister_serial(sp->serial_line);
+ serial8250_unregister_port(sp->serial_line);
}
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW
2005-09-07 19:12 ` [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW Max Asbock
@ 2005-09-07 19:25 ` Russell King
2005-09-07 20:13 ` Max Asbock
0 siblings, 1 reply; 10+ messages in thread
From: Russell King @ 2005-09-07 19:25 UTC (permalink / raw)
To: Max Asbock; +Cc: Linux Kernel List, amax, ralf, starvik
On Wed, Sep 07, 2005 at 12:12:54PM -0700, Max Asbock wrote:
> Here is a patch for the ibmasm driver. Let me know it I missed
> something.
Thanks. Does it still need to include serial.h?
Also, can I have a signed-off-by line as per the DCO v1.1 please
(see Documentation/SubmittingPatches) ?
Thanks again.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [FINAL WARNING] Removal of deprecated serial functions - please update your drivers NOW
2005-09-07 19:25 ` Russell King
@ 2005-09-07 20:13 ` Max Asbock
0 siblings, 0 replies; 10+ messages in thread
From: Max Asbock @ 2005-09-07 20:13 UTC (permalink / raw)
To: Russell King; +Cc: Linux Kernel List, amax, ralf, starvik
On Wed, 2005-09-07 at 12:25, Russell King wrote:
> On Wed, Sep 07, 2005 at 12:12:54PM -0700, Max Asbock wrote:
> > Here is a patch for the ibmasm driver. Let me know it I missed
> > something.
>
> Thanks. Does it still need to include serial.h?
>
> Also, can I have a signed-off-by line as per the DCO v1.1 please
> (see Documentation/SubmittingPatches) ?
>
> Thanks again.
It doesn't need serial.h included. So here it is again.
max
Signed-off-by: Max Asbock <masbock@us.ibm.com>
diff -urNp linux-2.6.13-git6/drivers/misc/Kconfig linux-2.6.13-git6-ibmasm/drivers/misc/Kconfig
--- linux-2.6.13-git6/drivers/misc/Kconfig 2005-09-06 13:42:34.000000000 -0700
+++ linux-2.6.13-git6-ibmasm/drivers/misc/Kconfig 2005-09-07 12:09:09.000000000 -0700
@@ -6,7 +6,7 @@ menu "Misc devices"
config IBM_ASM
tristate "Device driver for IBM RSA service processor"
- depends on X86 && PCI && EXPERIMENTAL && BROKEN
+ depends on X86 && PCI && EXPERIMENTAL
---help---
This option enables device driver support for in-band access to the
IBM RSA (Condor) service processor in eServer xSeries systems.
diff -urNp linux-2.6.13-git6/drivers/misc/ibmasm/uart.c linux-2.6.13-git6-ibmasm/drivers/misc/ibmasm/uart.c
--- linux-2.6.13-git6/drivers/misc/ibmasm/uart.c 2005-09-06 13:42:34.000000000 -0700
+++ linux-2.6.13-git6-ibmasm/drivers/misc/ibmasm/uart.c 2005-09-07 13:07:02.000000000 -0700
@@ -25,15 +25,15 @@
#include <linux/termios.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
-#include <linux/serial.h>
#include <linux/serial_reg.h>
+#include <linux/serial_8250.h>
#include "ibmasm.h"
#include "lowlevel.h"
void ibmasm_register_uart(struct service_processor *sp)
{
- struct serial_struct serial;
+ struct uart_port uport;
void __iomem *iomem_base;
iomem_base = sp->base_address + SCOUT_COM_B_BASE;
@@ -47,14 +47,14 @@ void ibmasm_register_uart(struct service
return;
}
- memset(&serial, 0, sizeof(serial));
- serial.irq = sp->irq;
- serial.baud_base = 3686400 / 16;
- serial.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ;
- serial.io_type = UPIO_MEM;
- serial.iomem_base = iomem_base;
+ memset(&uport, 0, sizeof(struct uart_port));
+ uport.irq = sp->irq;
+ uport.uartclk = 3686400;
+ uport.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ;
+ uport.iotype = UPIO_MEM;
+ uport.membase = iomem_base;
- sp->serial_line = register_serial(&serial);
+ sp->serial_line = serial8250_register_port(&uport);
if (sp->serial_line < 0) {
dev_err(sp->dev, "Failed to register serial port\n");
return;
@@ -68,5 +68,5 @@ void ibmasm_unregister_uart(struct servi
return;
disable_uart_interrupts(sp->base_address);
- unregister_serial(sp->serial_line);
+ serial8250_unregister_port(sp->serial_line);
}
^ permalink raw reply [flat|nested] 10+ messages in thread