Skip to content

Commit f93366f

Browse files
Heikki Krogerusgregkh
authored andcommitted
serial: 8250_dw: Map IO memory
This needs to be done in order to later access the Designware specific registers. Signed-off-by: Heikki Krogerus <[email protected]> Reviewed-by: Jamie Iles <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 966c4e3 commit f93366f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/tty/serial/8250/8250_dw.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,13 @@ static int dw8250_probe(struct platform_device *pdev)
111111
uart.port.irq = irq->start;
112112
uart.port.handle_irq = dw8250_handle_irq;
113113
uart.port.type = PORT_8250;
114-
uart.port.flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP |
115-
UPF_FIXED_PORT;
114+
uart.port.flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_FIXED_PORT;
116115
uart.port.dev = &pdev->dev;
117116

117+
uart.port.membase = ioremap(regs->start, resource_size(regs));
118+
if (!uart.port.membase)
119+
return -ENOMEM;
120+
118121
uart.port.iotype = UPIO_MEM;
119122
uart.port.serial_in = dw8250_serial_in;
120123
uart.port.serial_out = dw8250_serial_out;

0 commit comments

Comments
 (0)