All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: Russell King <linux@arm.linux.org.uk>
Subject: [PATCH 1/2]: Serial 8250 optionally skip autodetection
Date: Mon, 16 Aug 2004 05:57:03 -0700	[thread overview]
Message-ID: <20040816125702.GE11621@atomide.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

Hi Russell,

Following patch allows 8250 compatible serial drivers to optionally
define the port type to allow skipping the serial port autodetection.

This is needed for OMAP serial port, which is 8250 compatible, but
requires extra FIFO settings, and does not reliably work with the
autodetection. The OMAP serial port support is in patch 2/2.

Regards,

Tony

[-- Attachment #2: patch-2.6.8.1-8250-serial-optional-skip-autodetect --]
[-- Type: text/plain, Size: 1225 bytes --]

diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c
--- a/drivers/serial/8250.c	2004-08-16 05:15:19 -07:00
+++ b/drivers/serial/8250.c	2004-08-16 05:15:19 -07:00
@@ -2056,6 +2056,7 @@
 {
 	struct uart_port port;
 
+	port.type     = req->type;
 	port.iobase   = req->port;
 	port.membase  = req->iomem_base;
 	port.irq      = req->irq;
@@ -2063,9 +2064,12 @@
 	port.fifosize = req->xmit_fifo_size;
 	port.regshift = req->iomem_reg_shift;
 	port.iotype   = req->io_type;
-	port.flags    = req->flags | UPF_BOOT_AUTOCONF;
+	port.flags    = req->flags;
 	port.mapbase  = req->iomap_base;
 	port.line     = line;
+
+	if (req->type != PORT_OMAP)
+		req->flags |= UPF_BOOT_AUTOCONF;
 
 	if (share_irqs)
 		port.flags |= UPF_SHARE_IRQ;
diff -Nru a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
--- a/drivers/serial/serial_core.c	2004-08-16 05:15:19 -07:00
+++ b/drivers/serial/serial_core.c	2004-08-16 05:15:19 -07:00
@@ -2375,6 +2375,7 @@
 		 * If the port is already initialised, don't touch it.
 		 */
 		if (state->port->type == PORT_UNKNOWN) {
+			state->port->type     = port->type;
 			state->port->iobase   = port->iobase;
 			state->port->membase  = port->membase;
 			state->port->irq      = port->irq;

             reply	other threads:[~2004-08-16 12:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-16 12:57 Tony Lindgren [this message]
2004-08-16 13:04 ` [PATCH 2/2]: Serial 8250 OMAP support Tony Lindgren

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=20040816125702.GE11621@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@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 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.