serial: samsung: remove UART baudrate clock enable
authorYoungmin Nam <youngmin.nam@samsung.com>
Fri, 7 Aug 2015 04:51:48 +0000 (13:51 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Wed, 9 May 2018 12:14:45 +0000 (21:14 +0900)
This patch removes clock enable routine for baudrate.
On Exynos5 and Exynos7, uart baudrate clock will be either
sclk or divider of sclk which is parent clock of sclk.
So, we don't need to enable baudrate clock. Because
when we enable sclk, baudrate clock is also enabled.

Change-Id: I3316cac79559746f8a4c27c844bc793743fe5ee6
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
drivers/tty/serial/samsung.c

index ac7dd6f5a9470df7c8576ee86242094b0564bb90..8d4daf0e286c89894e3dd9952aae3a8f27c6ea86 100644 (file)
@@ -930,18 +930,8 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
        if (IS_ERR(clk))
                return;
 
-       /* check to see if we need  to change clock source */
-
+       /* setting clock for baud rate */
        if (ourport->baudclk != clk) {
-               s3c24xx_serial_setsource(port, clk_sel);
-
-               if (!IS_ERR(ourport->baudclk)) {
-                       clk_disable_unprepare(ourport->baudclk);
-                       ourport->baudclk = ERR_PTR(-EINVAL);
-               }
-
-               clk_prepare_enable(clk);
-
                ourport->baudclk = clk;
                ourport->baudclk_rate = clk ? clk_get_rate(clk) : 0;
        }