summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorBoojin Kim <boojin.kim@samsung.com>2011-05-27 19:04:03 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-07 09:25:34 -0700
commit470f22975448a65a1084a6f0721fa5df15323f02 (patch)
tree91557ad66ac89f6d244150a012eba3c4d7fa09ef /drivers/tty
parentaf99d6f0037d970084b03d9690f50e34d6f70dae (diff)
downloadlinux-3.10-470f22975448a65a1084a6f0721fa5df15323f02.tar.gz
linux-3.10-470f22975448a65a1084a6f0721fa5df15323f02.tar.bz2
linux-3.10-470f22975448a65a1084a6f0721fa5df15323f02.zip
ARM: SAMSUNG: serial: Fix on handling of one clock source for UART
This patch fixes the way of comparison for handling of two or more clock sources for UART. For example, if just only one clock source is defined even though there are two clock sources for UART, the serial driver does not set proper clock up. Of course, it is problem. So this patch changes the condition of comparison to avoid useless setup clock and adds a flag 'NO_NEED_CHECK_CLKSRC' which means selection of source clock is not required. In addition, since the Exynos4210 has only one clock source for UART this patch adds the flag into its common_init_uarts(). Signed-off-by: Boojin Kim <boojin.kim@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/s5pv210.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/s5pv210.c b/drivers/tty/serial/s5pv210.c
index fb2619f93d8..dd194dc80ee 100644
--- a/drivers/tty/serial/s5pv210.c
+++ b/drivers/tty/serial/s5pv210.c
@@ -30,7 +30,7 @@ static int s5pv210_serial_setsource(struct uart_port *port,
struct s3c2410_uartcfg *cfg = port->dev->platform_data;
unsigned long ucon = rd_regl(port, S3C2410_UCON);
- if ((cfg->clocks_size) == 1)
+ if (cfg->flags & NO_NEED_CHECK_CLKSRC)
return 0;
if (strcmp(clk->name, "pclk") == 0)
@@ -55,7 +55,7 @@ static int s5pv210_serial_getsource(struct uart_port *port,
clk->divisor = 1;
- if ((cfg->clocks_size) == 1)
+ if (cfg->flags & NO_NEED_CHECK_CLKSRC)
return 0;
switch (ucon & S5PV210_UCON_CLKMASK) {