public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SERIAL: add MMIO support to 8250_pnp
@ 2005-07-27 22:47 Bjorn Helgaas
  2005-07-29 10:32 ` Russell King
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2005-07-27 22:47 UTC (permalink / raw)
  To: Russell King, linux-serial; +Cc: Adam Belay, linux-kernel

Add support for UARTs in MMIO space and clean up a little whitespace.

HP legacy-free ia64 machines need this.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work/drivers/serial/8250_pnp.c
===================================================================
--- work.orig/drivers/serial/8250_pnp.c	2005-07-27 09:57:10.000000000 -0600
+++ work/drivers/serial/8250_pnp.c	2005-07-27 10:07:09.000000000 -0600
@@ -394,7 +394,7 @@
 }
 
 static int __devinit
-serial_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id)
+serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
 {
 	struct uart_port port;
 	int ret, line, flags = dev_id->driver_data;
@@ -406,15 +406,23 @@
 	}
 
 	memset(&port, 0, sizeof(struct uart_port));
-	port.irq = pnp_irq(dev,0);
-	port.iobase = pnp_port_start(dev, 0);
+	port.irq = pnp_irq(dev, 0);
+	if (pnp_port_valid(dev, 0)) {
+		port.iobase = pnp_port_start(dev, 0);
+		port.iotype = UPIO_PORT;
+	} else if (pnp_mem_valid(dev, 0)) {
+		port.mapbase = pnp_mem_start(dev, 0);
+		port.iotype = UPIO_MEM;
+		port.flags = UPF_IOREMAP;
+	} else
+		return -ENODEV;
 
 #ifdef SERIAL_DEBUG_PNP
-	printk("Setup PNP port: port %x, irq %d, type %d\n",
-	       port.iobase, port.irq, port.iotype);
+	printk("Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
+	       port.iobase, port.mapbase, port.irq, port.iotype);
 #endif
 
-	port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
+	port.flags |= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
 	port.uartclk = 1843200;
 	port.dev = &dev->dev;
 
@@ -426,7 +434,7 @@
 
 }
 
-static void __devexit serial_pnp_remove(struct pnp_dev * dev)
+static void __devexit serial_pnp_remove(struct pnp_dev *dev)
 {
 	long line = (long)pnp_get_drvdata(dev);
 	if (line)

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

* Re: [PATCH] SERIAL: add MMIO support to 8250_pnp
  2005-07-27 22:47 [PATCH] SERIAL: add MMIO support to 8250_pnp Bjorn Helgaas
@ 2005-07-29 10:32 ` Russell King
  2005-07-29 11:22   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2005-07-29 10:32 UTC (permalink / raw)
  To: Bjorn Helgaas, Andrew Morton; +Cc: linux-serial, Adam Belay, linux-kernel

On Wed, Jul 27, 2005 at 04:47:12PM -0600, Bjorn Helgaas wrote:
> Add support for UARTs in MMIO space and clean up a little whitespace.
> 
> HP legacy-free ia64 machines need this.

Due to the restrictions caused by the new new kernel development model,
I'm unable to merge this for 2.6.13.  I already have other stuff already
queued in my serial tree which probably isn't suitable for merging.

If someone else (Andrew or Adam) wishes to merge this then fine - it
looks reasonable.  Let me know what you're doing so I know whether to
add it to my serial tree or not.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

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

* Re: [PATCH] SERIAL: add MMIO support to 8250_pnp
  2005-07-29 10:32 ` Russell King
@ 2005-07-29 11:22   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2005-07-29 11:22 UTC (permalink / raw)
  To: Russell King; +Cc: bjorn.helgaas, linux-serial, ambx1, linux-kernel

Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> On Wed, Jul 27, 2005 at 04:47:12PM -0600, Bjorn Helgaas wrote:
> > Add support for UARTs in MMIO space and clean up a little whitespace.
> > 
> > HP legacy-free ia64 machines need this.
> 
> Due to the restrictions caused by the new new kernel development model,
> I'm unable to merge this for 2.6.13.  I already have other stuff already
> queued in my serial tree which probably isn't suitable for merging.
> 
> If someone else (Andrew or Adam) wishes to merge this then fine - it
> looks reasonable.  Let me know what you're doing so I know whether to
> add it to my serial tree or not.

Yup, I queued it up.

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

end of thread, other threads:[~2005-07-29 11:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-27 22:47 [PATCH] SERIAL: add MMIO support to 8250_pnp Bjorn Helgaas
2005-07-29 10:32 ` Russell King
2005-07-29 11:22   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox