All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2]: Serial 8250 optionally skip autodetection
@ 2004-08-16 12:57 Tony Lindgren
  2004-08-16 13:04 ` [PATCH 2/2]: Serial 8250 OMAP support Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2004-08-16 12:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: Russell King

[-- 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;

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

end of thread, other threads:[~2004-08-16 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-16 12:57 [PATCH 1/2]: Serial 8250 optionally skip autodetection Tony Lindgren
2004-08-16 13:04 ` [PATCH 2/2]: Serial 8250 OMAP support Tony Lindgren

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.