* 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.
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).
Please note that this is the last warning folk will have before the
functions are removed.
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)
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
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.
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
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.
Signed-off-by: Alan Cox <al...@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);
It seems we can simply kill these dummies with this patch.
Signed-off-by: Adrian Bunk <bu...@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)
-{
-}
Thanks, applied.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
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);
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
It doesn't need serial.h included. So here it is again.
max
Signed-off-by: Max Asbock <mas...@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);
}