]> git.sur5r.net Git - u-boot/commitdiff
exynos: video: Move dsim_config_dt into a function
authorSimon Glass <sjg@chromium.org>
Mon, 22 Feb 2016 04:08:45 +0000 (21:08 -0700)
committerMinkyu Kang <mk7.kang@samsung.com>
Wed, 25 May 2016 04:25:17 +0000 (13:25 +0900)
In preparation for making this a parameter, move it into the function
that sets it up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/video/exynos/exynos_mipi_dsi.c

index 5001e163d99ae861272f8bcc2998f7936cd859a6..fd963821ac7cd348acf59d4f1bfb6f29f6d5f667 100644 (file)
@@ -28,7 +28,6 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 static struct exynos_platform_mipi_dsim *dsim_pd;
-static struct mipi_dsim_config dsim_config_dt;
 static struct exynos_platform_mipi_dsim dsim_platform_data_dt;
 static struct mipi_dsim_lcd_device mipi_lcd_device_dt;
 
@@ -247,7 +246,7 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd)
        dsim_pd = pd;
 }
 
-int exynos_dsim_config_parse_dt(const void *blob)
+int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt)
 {
        int node;
 
@@ -257,47 +256,47 @@ int exynos_dsim_config_parse_dt(const void *blob)
                return -ENODEV;
        }
 
-       dsim_config_dt.e_interface = fdtdec_get_int(blob, node,
+       dt->e_interface = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-e-interface", 0);
 
-       dsim_config_dt.e_virtual_ch = fdtdec_get_int(blob, node,
+       dt->e_virtual_ch = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-e-virtual-ch", 0);
 
-       dsim_config_dt.e_pixel_format = fdtdec_get_int(blob, node,
+       dt->e_pixel_format = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-e-pixel-format", 0);
 
-       dsim_config_dt.e_burst_mode = fdtdec_get_int(blob, node,
+       dt->e_burst_mode = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-e-burst-mode", 0);
 
-       dsim_config_dt.e_no_data_lane = fdtdec_get_int(blob, node,
+       dt->e_no_data_lane = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-e-no-data-lane", 0);
 
-       dsim_config_dt.e_byte_clk = fdtdec_get_int(blob, node,
+       dt->e_byte_clk = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-e-byte-clk", 0);
 
-       dsim_config_dt.hfp = fdtdec_get_int(blob, node,
+       dt->hfp = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-hfp", 0);
 
-       dsim_config_dt.p = fdtdec_get_int(blob, node,
+       dt->p = fdtdec_get_int(blob, node,
                                          "samsung,dsim-config-p", 0);
-       dsim_config_dt.m = fdtdec_get_int(blob, node,
+       dt->m = fdtdec_get_int(blob, node,
                                          "samsung,dsim-config-m", 0);
-       dsim_config_dt.s = fdtdec_get_int(blob, node,
+       dt->s = fdtdec_get_int(blob, node,
                                          "samsung,dsim-config-s", 0);
 
-       dsim_config_dt.pll_stable_time = fdtdec_get_int(blob, node,
+       dt->pll_stable_time = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-pll-stable-time", 0);
 
-       dsim_config_dt.esc_clk = fdtdec_get_int(blob, node,
+       dt->esc_clk = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-esc-clk", 0);
 
-       dsim_config_dt.stop_holding_cnt = fdtdec_get_int(blob, node,
+       dt->stop_holding_cnt = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-stop-holding-cnt", 0);
 
-       dsim_config_dt.bta_timeout = fdtdec_get_int(blob, node,
+       dt->bta_timeout = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-bta-timeout", 0);
 
-       dsim_config_dt.rx_timeout = fdtdec_get_int(blob, node,
+       dt->rx_timeout = fdtdec_get_int(blob, node,
                                "samsung,dsim-config-rx-timeout", 0);
 
        mipi_lcd_device_dt.name = fdtdec_get_config_string(blob,
@@ -317,7 +316,9 @@ int exynos_dsim_config_parse_dt(const void *blob)
 
 void exynos_init_dsim_platform_data(vidinfo_t *vid)
 {
-       if (exynos_dsim_config_parse_dt(gd->fdt_blob))
+       struct mipi_dsim_config dsim_config_dt;
+
+       if (exynos_dsim_config_parse_dt(gd->fdt_blob, &dsim_config_dt))
                debug("Can't get proper dsim config.\n");
 
        strcpy(dsim_platform_data_dt.lcd_panel_name, mipi_lcd_device_dt.name);