summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-21 21:08:47 -0700
committerMinkyu Kang <mk7.kang@samsung.com>2016-05-25 13:25:17 +0900
commit37ea446b9d7942c0deb5833fede6eb7cabd5bc6d (patch)
tree273586d6fd717082151636c79251b1cc3c465594
parent652d15c06e65ea910bada28925b37483b2a1a0d6 (diff)
exynos: video: Move mipi_lcd_device_dt into a function
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>
-rw-r--r--arch/arm/mach-exynos/include/mach/mipi_dsim.h2
-rw-r--r--drivers/video/exynos/exynos_mipi_dsi.c17
2 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/mach-exynos/include/mach/mipi_dsim.h b/arch/arm/mach-exynos/include/mach/mipi_dsim.h
index df68186c10..43b5c017fe 100644
--- a/arch/arm/mach-exynos/include/mach/mipi_dsim.h
+++ b/arch/arm/mach-exynos/include/mach/mipi_dsim.h
@@ -320,7 +320,7 @@ struct mipi_dsim_lcd_device {
int reverse_panel;
struct mipi_dsim_device *master;
- void *platform_data;
+ struct exynos_platform_mipi_dsim *platform_data;
};
/*
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index b39858a28f..a5d9b59218 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -27,8 +27,6 @@
DECLARE_GLOBAL_DATA_PTR;
-static struct mipi_dsim_lcd_device mipi_lcd_device_dt;
-
struct mipi_dsim_ddi {
int bus_id;
struct list_head list;
@@ -234,7 +232,8 @@ int exynos_mipi_dsi_init(struct exynos_platform_mipi_dsim *dsim_pd)
return 0;
}
-int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt)
+int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt,
+ struct mipi_dsim_lcd_device *lcd_dt)
{
int node;
@@ -287,16 +286,16 @@ int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt)
dt->rx_timeout = fdtdec_get_int(blob, node,
"samsung,dsim-config-rx-timeout", 0);
- mipi_lcd_device_dt.name = fdtdec_get_config_string(blob,
+ lcd_dt->name = fdtdec_get_config_string(blob,
"samsung,dsim-device-name");
- mipi_lcd_device_dt.id = fdtdec_get_int(blob, node,
+ lcd_dt->id = fdtdec_get_int(blob, node,
"samsung,dsim-device-id", 0);
- mipi_lcd_device_dt.bus_id = fdtdec_get_int(blob, node,
+ lcd_dt->bus_id = fdtdec_get_int(blob, node,
"samsung,dsim-device-bus_id", 0);
- mipi_lcd_device_dt.reverse_panel = fdtdec_get_int(blob, node,
+ lcd_dt->reverse_panel = fdtdec_get_int(blob, node,
"samsung,dsim-device-reverse-panel", 0);
return 0;
@@ -306,8 +305,10 @@ void exynos_init_dsim_platform_data(vidinfo_t *vid)
{
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;
- if (exynos_dsim_config_parse_dt(gd->fdt_blob, &dsim_config_dt))
+ if (exynos_dsim_config_parse_dt(gd->fdt_blob, &dsim_config_dt,
+ &mipi_lcd_device_dt))
debug("Can't get proper dsim config.\n");
strcpy(dsim_platform_data_dt.lcd_panel_name, mipi_lcd_device_dt.name);