linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Porter <mporter@kernel.crashing.org>
To: linux-kernel@vger.kernel.org
Cc: rmk@arm.linux.org.uk
Subject: [PATCH] early_port_register
Date: Thu, 12 Jun 2003 13:20:01 -0700	[thread overview]
Message-ID: <20030612132001.A4693@home.com> (raw)

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 */

             reply	other threads:[~2003-06-12 20:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-12 20:20 Matt Porter [this message]
2003-06-12 20:27 ` [PATCH] early_port_register 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030612132001.A4693@home.com \
    --to=mporter@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).