lkml.org 
[lkml]   [2004]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/2]: Serial 8250 optionally skip autodetection
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
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;
\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.030 / U:2.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site