mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 08:40:53 +07:00
[PATCH] serial: add MMIO support to 8250_pnp
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
3d483f4757
commit
655a0a7799
@ -394,7 +394,7 @@ static int __devinit serial_pnp_guess_board(struct pnp_dev *dev, int *flags)
|
||||
}
|
||||
|
||||
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 @@ serial_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id)
|
||||
}
|
||||
|
||||
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 @@ serial_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id)
|
||||
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user