From: Youngmin Nam Date: Sat, 8 Aug 2015 03:42:45 +0000 (+0900) Subject: serial: samsung: remove serial_get/setsource function X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b547bf0cf24a99c57be202ed72f6a46f73d6b61;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git serial: samsung: remove serial_get/setsource function This patch removes serial_get/setsource function that are not necessary. On Exynos5 and Exynos7, the number of clk source of baudrate is 1. That is, "num_clks" is always 1, we don't need to change clock source of baudrate. Change-Id: I0284788f0074d6d7ae7ecc43f7e6c4d8e27ed63e Signed-off-by: Youngmin Nam --- diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 8d4daf0e286c..0a0ae037e769 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -781,37 +781,6 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, #define MAX_CLK_NAME_LENGTH 15 -static inline int s3c24xx_serial_getsource(struct uart_port *port) -{ - struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - unsigned int ucon; - - if (info->num_clks == 1) - return 0; - - ucon = rd_regl(port, S3C2410_UCON); - ucon &= info->clksel_mask; - return ucon >> info->clksel_shift; -} - -static void s3c24xx_serial_setsource(struct uart_port *port, - unsigned int clk_sel) -{ - struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - unsigned int ucon; - - if (info->num_clks == 1) - return; - - ucon = rd_regl(port, S3C2410_UCON); - if ((ucon & info->clksel_mask) >> info->clksel_shift == clk_sel) - return; - - ucon &= ~info->clksel_mask; - ucon |= clk_sel << info->clksel_shift; - wr_regl(port, S3C2410_UCON, ucon); -} - static unsigned int s3c24xx_serial_getclk(struct s3c24xx_uart_port *ourport, unsigned int req_baud, struct clk **best_clk, unsigned int *clk_num)