From: Jaehyoung Choi Date: Thu, 3 May 2018 12:08:17 +0000 (+0900) Subject: [HACK] Fix uart driver code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97c549b0bf3b6b1fddf704fad5a11f605b40057c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [HACK] Fix uart driver code Change-Id: I98f599b91ffd2a55a5b75e234a8d01fc938d24cc Signed-off-by: Jaehyoung Choi --- diff --git a/arch/arm64/boot/dts/exynos/exynos9610.dtsi b/arch/arm64/boot/dts/exynos/exynos9610.dtsi index 73119b51a58a..2af9dbaf6bd3 100644 --- a/arch/arm64/boot/dts/exynos/exynos9610.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos9610.dtsi @@ -229,6 +229,6 @@ pinctrl-0 = <&uart0_bus>; clocks = <&clock GATE_UART_QCH>, <&clock UART>; clock-names = "gate_pclk0", "gate_uart0"; - status = "disabled"; + status = "okay"; }; }; diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 8aca18c4cdea..aed53f80b50a 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1750,7 +1750,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, goto err; } } - +#if 0 ourport->clk = clk_get(&platdev->dev, "uart"); if (IS_ERR(ourport->clk)) { pr_err("%s: Controller clock not found\n", @@ -1765,7 +1765,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, clk_put(ourport->clk); goto err; } - +#endif /* Keep all interrupts masked and cleared */ if (s3c24xx_serial_has_interrupt_mask(port)) { wr_regl(port, S3C64XX_UINTM, 0xf); @@ -2346,11 +2346,21 @@ static struct s3c24xx_serial_drv_data exynos5433_serial_drv_data = { .fifosize = { 64, 256, 16, 256 }, }; +static struct s3c24xx_serial_drv_data exynos_serial_drv_data = { + EXYNOS_COMMON_SERIAL_DRV_DATA, + .fifosize = { 0, }, +}; + #define EXYNOS4210_SERIAL_DRV_DATA ((kernel_ulong_t)&exynos4210_serial_drv_data) #define EXYNOS5433_SERIAL_DRV_DATA ((kernel_ulong_t)&exynos5433_serial_drv_data) +#define EXYNOS4210_SERIAL_DRV_DATA ((kernel_ulong_t)&exynos4210_serial_drv_data) +#define EXYNOS_SERIAL_DRV_DATA ((kernel_ulong_t)&exynos_serial_drv_data) + #else #define EXYNOS4210_SERIAL_DRV_DATA (kernel_ulong_t)NULL #define EXYNOS5433_SERIAL_DRV_DATA (kernel_ulong_t)NULL +#define EXYNOS4210_SERIAL_DRV_DATA (kernel_ulong_t)NULL +#define EXYNOS_SERIAL_DRV_DATA (kernel_ulong_t)NULL #endif static const struct platform_device_id s3c24xx_serial_driver_ids[] = { @@ -2375,6 +2385,9 @@ static const struct platform_device_id s3c24xx_serial_driver_ids[] = { }, { .name = "exynos5433-uart", .driver_data = EXYNOS5433_SERIAL_DRV_DATA, + }, { + .name = "exynos-uart", + .driver_data = EXYNOS_SERIAL_DRV_DATA, }, { }, }; @@ -2396,6 +2409,8 @@ static const struct of_device_id s3c24xx_uart_dt_match[] = { .data = (void *)EXYNOS4210_SERIAL_DRV_DATA }, { .compatible = "samsung,exynos5433-uart", .data = (void *)EXYNOS5433_SERIAL_DRV_DATA }, + { .compatible = "samsung,exynos-uart", + .data = (void *)EXYNOS_SERIAL_DRV_DATA }, {}, }; MODULE_DEVICE_TABLE(of, s3c24xx_uart_dt_match);