linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] early_port_register
@ 2003-06-12 20:20 Matt Porter
  2003-06-12 20:27 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Matt Porter @ 2003-06-12 20:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: rmk

Linus, please apply.

This has been discussed in a previous thread originated by David
Mosberger.  This removed early_serial_setup() in favor of  a
working early_port_register() call.  Many PPC systems rely on
this functionality and are currently hacking around it in the
PPC devel tree.  Last I looked, IA64 still had this in their
devel tree too.

-Matt

===== drivers/serial/8250.c 1.32 vs edited =====
--- 1.32/drivers/serial/8250.c	Thu Jun  5 23:36:47 2003
+++ edited/drivers/serial/8250.c	Thu Jun 12 11:43:54 2003
@@ -2061,9 +2061,15 @@
 	return __register_serial(req, -1);
 }
 
-int __init early_serial_setup(struct serial_struct *req)
+int __init early_register_port(struct uart_port *port)
 {
-	__register_serial(req, req->line);
+	if (port->line >= ARRAY_SIZE(serial8250_ports))
+		return -ENODEV;
+
+	serial8250_isa_init_ports();    /* force ISA defaults */
+	serial8250_ports[port->line].port = *port;
+	serial8250_ports[port->line].port.ops = &serial8250_pops;
+
 	return 0;
 }
 
===== include/linux/serial.h 1.8 vs edited =====
--- 1.8/include/linux/serial.h	Sun Feb 16 12:59:58 2003
+++ edited/include/linux/serial.h	Thu Jun 12 11:43:59 2003
@@ -180,8 +180,10 @@
 extern int register_serial(struct serial_struct *req);
 extern void unregister_serial(int line);
 
+struct uart_port;
+
 /* Allow complicated architectures to specify rs_table[] at run time */
-extern int early_serial_setup(struct serial_struct *req);
+extern int early_register_port(struct uart_port *port);
 
 #ifdef CONFIG_ACPI
 /* tty ports reserved for the ACPI serial console port and debug port */

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

end of thread, other threads:[~2003-06-14 20:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-12 20:20 [PATCH] early_port_register Matt Porter
2003-06-12 20:27 ` Christoph Hellwig
2003-06-12 20:41   ` Matt Porter
2003-06-12 21:53     ` Russell King
2003-06-13  9:52       ` Russell King
2003-06-14 21:02         ` Russell King
2003-06-12 20:50 ` David Mosberger
2003-06-12 21:44 ` Tom Rini

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).