serial: of_serial: Handle fifo-size property
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 25 Mar 2013 11:34:45 +0000 (13:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 21:06:44 +0000 (14:06 -0700)
This will reduce the need for extra types in 8250.c just
in case the fifo size differs from the standard.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/tty/serial/of-serial.txt
drivers/tty/serial/of_serial.c

index 8f01cb190f25686747873ab54eaa53652c9b35bc..c13f0ce74da6ae3131940a2a55aca774628f8e5c 100644 (file)
@@ -33,6 +33,7 @@ Optional properties:
   RTAS and should not be registered.
 - no-loopback-test: set to indicate that the port does not implements loopback
   test mode
+- fifo-size: the fifo size of the UART.
 
 Example:
 
index b025d54382754456efbb021e466079727381bcba..267711b5cb4d7f0644577473dfdb002331c3a524 100644 (file)
@@ -97,6 +97,10 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
        if (of_property_read_u32(np, "reg-shift", &prop) == 0)
                port->regshift = prop;
 
+       /* Check for fifo size */
+       if (of_property_read_u32(np, "fifo-size", &prop) == 0)
+               port->fifosize = prop;
+
        port->irq = irq_of_parse_and_map(np, 0);
        port->iotype = UPIO_MEM;
        if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {