From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Russell King <rmk+serial@arm.linux.org.uk>, linux-serial@vger.kernel.org
Cc: Adam Belay <ambx1@neo.rr.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] SERIAL: add MMIO support to 8250_pnp
Date: Wed, 27 Jul 2005 16:47:12 -0600 [thread overview]
Message-ID: <200507271647.12882.bjorn.helgaas@hp.com> (raw)
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)
next reply other threads:[~2005-07-27 22:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-27 22:47 Bjorn Helgaas [this message]
2005-07-29 10:32 ` [PATCH] SERIAL: add MMIO support to 8250_pnp Russell King
2005-07-29 11:22 ` Andrew Morton
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=200507271647.12882.bjorn.helgaas@hp.com \
--to=bjorn.helgaas@hp.com \
--cc=ambx1@neo.rr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rmk+serial@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