From 0787691230d88af8cdfc6d4085957bbf7cec1e5d Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sun, 8 Mar 2015 14:30:05 +0000 Subject: [PATCH] serial: of: set port iomem size from devicetree Make the 8250 driver reserve exactly the mmio region specified in the devicetree. This prevents conflicts between UPIO_AU type UARTs and other devices mapped closer than the default size of 0x1000 (or 0x100 for RT2880). Signed-off-by: Mans Rullgard Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/of_serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index d8c4eea23b7c..aa00154c4a6d 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c @@ -89,6 +89,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev, spin_lock_init(&port->lock); port->mapbase = resource.start; + port->mapsize = resource_size(&resource); /* Check for shifted address mapping */ if (of_property_read_u32(np, "reg-offset", &prop) == 0) -- 2.39.2