]> git.karo-electronics.de Git - linux-beck.git/commitdiff
serial: 8250_dw: Map IO memory
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Thu, 10 Jan 2013 09:25:07 +0000 (11:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2013 07:03:00 +0000 (23:03 -0800)
This needs to be done in order to later access the
Designware specific registers.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c

index ff83ea518760d64f441c9204913ece8460e5df4f..e1749012e8e388c4450701f8fa3d643966541bc6 100644 (file)
@@ -111,10 +111,13 @@ static int dw8250_probe(struct platform_device *pdev)
        uart.port.irq = irq->start;
        uart.port.handle_irq = dw8250_handle_irq;
        uart.port.type = PORT_8250;
-       uart.port.flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP |
-               UPF_FIXED_PORT;
+       uart.port.flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_FIXED_PORT;
        uart.port.dev = &pdev->dev;
 
+       uart.port.membase = ioremap(regs->start, resource_size(regs));
+       if (!uart.port.membase)
+               return -ENOMEM;
+
        uart.port.iotype = UPIO_MEM;
        uart.port.serial_in = dw8250_serial_in;
        uart.port.serial_out = dw8250_serial_out;