瀏覽代碼

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>
Mans Rullgard 10 年之前
父節點
當前提交
0787691230
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/tty/serial/of_serial.c

+ 1 - 0
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);
 	spin_lock_init(&port->lock);
 	port->mapbase = resource.start;
 	port->mapbase = resource.start;
+	port->mapsize = resource_size(&resource);
 
 
 	/* Check for shifted address mapping */
 	/* Check for shifted address mapping */
 	if (of_property_read_u32(np, "reg-offset", &prop) == 0)
 	if (of_property_read_u32(np, "reg-offset", &prop) == 0)