[HACK] Fix uart driver code
authorJaehyoung Choi <jkkkkk.choi@samsung.com>
Thu, 3 May 2018 12:08:17 +0000 (21:08 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Thu, 3 May 2018 12:08:17 +0000 (21:08 +0900)
Change-Id: I98f599b91ffd2a55a5b75e234a8d01fc938d24cc
Signed-off-by: Jaehyoung Choi <jkkkkk.choi@samsung.com>
arch/arm64/boot/dts/exynos/exynos9610.dtsi
drivers/tty/serial/samsung.c

index 73119b51a58af19200580b9756e447d87461ee98..2af9dbaf6bd372a1ed78f637b2836faed03ad70d 100644 (file)
                pinctrl-0 = <&uart0_bus>;
                clocks = <&clock GATE_UART_QCH>, <&clock UART>;
                clock-names = "gate_pclk0", "gate_uart0";
-               status = "disabled";
+               status = "okay";
        };
 };
index 8aca18c4cdea4076e8666baff7d7f4953d6a6e1f..aed53f80b50a2457f86dde52ef2eee47630296bf 100644 (file)
@@ -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);