From 135f07c3252dc77d0245714d0b413ecc711cd823 Mon Sep 17 00:00:00 2001 From: Naveen Krishna Chatradhi Date: Mon, 14 Jul 2014 17:07:16 +0530 Subject: 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 Reviewed-by: Tomasz Figa Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/samsung.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'drivers/tty') 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) dev_get_platdata(&pdev->dev) : ourport->drv_data->def_cfg; - ourport->port.fifosize = (ourport->info->fifosize) ? - ourport->info->fifosize : - ourport->drv_data->fifosize[index]; + if (pdev->dev.of_node) + of_property_read_u32(pdev->dev.of_node, + "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++; -- cgit v1.2.3