aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorNaveen Krishna Chatradhi <ch.naveen@samsung.com>2014-07-14 07:37:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-17 21:18:22 -0400
commit135f07c3252dc77d0245714d0b413ecc711cd823 (patch)
tree4ef8a12ac1a415767e7e4c0a597abf4201076cc3 /drivers/tty
parentb1261c86fe238cc0da3f5dc837a38a0c39f3e7c4 (diff)
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: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/samsung.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 6be852d4df6d..e49a9451976e 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1295,9 +1295,15 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
1295 dev_get_platdata(&pdev->dev) : 1295 dev_get_platdata(&pdev->dev) :
1296 ourport->drv_data->def_cfg; 1296 ourport->drv_data->def_cfg;
1297 1297
1298 ourport->port.fifosize = (ourport->info->fifosize) ? 1298 if (pdev->dev.of_node)
1299 ourport->info->fifosize : 1299 of_property_read_u32(pdev->dev.of_node,
1300 ourport->drv_data->fifosize[index]; 1300 "samsung,uart-fifosize", &ourport->port.fifosize);
1301
1302 if (!ourport->port.fifosize) {
1303 ourport->port.fifosize = (ourport->info->fifosize) ?
1304 ourport->info->fifosize :
1305 ourport->drv_data->fifosize[index];
1306 }
1301 1307
1302 probe_index++; 1308 probe_index++;
1303 1309