diff options
author | Mans Rullgard <mans@mansr.com> | 2015-03-08 10:30:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 17:50:33 -0400 |
commit | 0787691230d88af8cdfc6d4085957bbf7cec1e5d (patch) | |
tree | 805ffa5b96b791f9abd055f9dc9add186ced2f06 /drivers/tty/serial | |
parent | ee97d0e3f06498487671c23cad4230bf9aa5fd88 (diff) |
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 <mans@mansr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/of_serial.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, | |||
89 | 89 | ||
90 | spin_lock_init(&port->lock); | 90 | spin_lock_init(&port->lock); |
91 | port->mapbase = resource.start; | 91 | port->mapbase = resource.start; |
92 | port->mapsize = resource_size(&resource); | ||
92 | 93 | ||
93 | /* Check for shifted address mapping */ | 94 | /* Check for shifted address mapping */ |
94 | if (of_property_read_u32(np, "reg-offset", &prop) == 0) | 95 | if (of_property_read_u32(np, "reg-offset", &prop) == 0) |