Commit 135f07c3 authored by Naveen Krishna Chatradhi's avatar Naveen Krishna Chatradhi Committed by Greg Kroah-Hartman

serial: samsung: get fifosize via device tree

UART modules on some SoCs only differ in the fifosize of each
UART channel. Its useless to duplicate the drv_data structure
or create a compatible name for such a change.

We can get fifosize via the device tree nodes (not mandating it).

Also updates the documentation.
Signed-off-by: default avatarNaveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: default avatarTomasz Figa <t.figa@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b1261c86
...@@ -29,6 +29,9 @@ Required properties: ...@@ -29,6 +29,9 @@ Required properties:
[1] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt [1] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
[2] Documentation/devicetree/bindings/clock/clock-bindings.txt [2] Documentation/devicetree/bindings/clock/clock-bindings.txt
Optional properties:
- samsung,uart-fifosize: The fifo size supported by the UART channel
Note: Each Samsung UART should have an alias correctly numbered in the Note: Each Samsung UART should have an alias correctly numbered in the
"aliases" node, according to serialN format, where N is the port number "aliases" node, according to serialN format, where N is the port number
(non-negative decimal integer) as specified by User's Manual of respective (non-negative decimal integer) as specified by User's Manual of respective
...@@ -51,4 +54,5 @@ Example: ...@@ -51,4 +54,5 @@ Example:
"clk_uart_baud3"; "clk_uart_baud3";
clocks = <&clocks PCLK_UART1>, <&clocks PCLK_UART1>, clocks = <&clocks PCLK_UART1>, <&clocks PCLK_UART1>,
<&clocks SCLK_UART>; <&clocks SCLK_UART>;
samsung,uart-fifosize = <16>;
}; };
...@@ -1295,9 +1295,15 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) ...@@ -1295,9 +1295,15 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
dev_get_platdata(&pdev->dev) : dev_get_platdata(&pdev->dev) :
ourport->drv_data->def_cfg; ourport->drv_data->def_cfg;
ourport->port.fifosize = (ourport->info->fifosize) ? if (pdev->dev.of_node)
ourport->info->fifosize : of_property_read_u32(pdev->dev.of_node,
ourport->drv_data->fifosize[index]; "samsung,uart-fifosize", &ourport->port.fifosize);
if (!ourport->port.fifosize) {
ourport->port.fifosize = (ourport->info->fifosize) ?
ourport->info->fifosize :
ourport->drv_data->fifosize[index];
}
probe_index++; probe_index++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment