summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-21 21:08:46 -0700
committerMinkyu Kang <mk7.kang@samsung.com>2016-05-25 13:25:17 +0900
commit652d15c06e65ea910bada28925b37483b2a1a0d6 (patch)
tree31654a02070a273ae2e9c219b46294246b132d6e
parentb04135c998b88b0d7c1f21fef64219c508dfbcad (diff)
downloadtalos-obmc-uboot-652d15c06e65ea910bada28925b37483b2a1a0d6.tar.gz
talos-obmc-uboot-652d15c06e65ea910bada28925b37483b2a1a0d6.zip
exynos: video: Move struct exynos_platform_mipi_dsim into vidinfo
Put the pointer to this structure in struct vidinfo so that we can reference it without it being global. 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.h5
-rw-r--r--drivers/video/exynos/exynos_fb.c2
-rw-r--r--drivers/video/exynos/exynos_mipi_dsi.c19
-rw-r--r--include/exynos_lcd.h1
4 files changed, 9 insertions, 18 deletions
diff --git a/arch/arm/mach-exynos/include/mach/mipi_dsim.h b/arch/arm/mach-exynos/include/mach/mipi_dsim.h
index a77b5c8b1c..df68186c10 100644
--- a/arch/arm/mach-exynos/include/mach/mipi_dsim.h
+++ b/arch/arm/mach-exynos/include/mach/mipi_dsim.h
@@ -347,9 +347,10 @@ struct mipi_dsim_lcd_driver {
};
#ifdef CONFIG_EXYNOS_MIPI_DSIM
-int exynos_mipi_dsi_init(void);
+int exynos_mipi_dsi_init(struct exynos_platform_mipi_dsim *dsim_pd);
#else
-static inline int exynos_mipi_dsi_init(void)
+static inline int exynos_mipi_dsi_init(
+ struct exynos_platform_mipi_dsim *dsim_pd)
{
return 0;
}
diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c
index abc6091049..22b9723e54 100644
--- a/drivers/video/exynos/exynos_fb.c
+++ b/drivers/video/exynos/exynos_fb.c
@@ -128,7 +128,7 @@ static void lcd_panel_on(struct vidinfo *vid)
exynos_enable_ldo(1);
if (vid->mipi_enabled)
- exynos_mipi_dsi_init();
+ exynos_mipi_dsi_init(panel_info.dsim_platform_data_dt);
}
int exynos_lcd_early_init(const void *blob)
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index fd963821ac..b39858a28f 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 exynos_platform_mipi_dsim *dsim_pd;
-static struct exynos_platform_mipi_dsim dsim_platform_data_dt;
static struct mipi_dsim_lcd_device mipi_lcd_device_dt;
struct mipi_dsim_ddi {
@@ -175,7 +173,7 @@ static struct mipi_dsim_master_ops master_ops = {
.clear_dsim_frame_done = exynos_mipi_dsi_clear_frame_done,
};
-int exynos_mipi_dsi_init(void)
+int exynos_mipi_dsi_init(struct exynos_platform_mipi_dsim *dsim_pd)
{
struct mipi_dsim_device *dsim;
struct mipi_dsim_config *dsim_config;
@@ -236,16 +234,6 @@ int exynos_mipi_dsi_init(void)
return 0;
}
-void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd)
-{
- if (pd == NULL) {
- debug("pd is NULL\n");
- return;
- }
-
- dsim_pd = pd;
-}
-
int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt)
{
int node;
@@ -316,7 +304,8 @@ int exynos_dsim_config_parse_dt(const void *blob, struct mipi_dsim_config *dt)
void exynos_init_dsim_platform_data(vidinfo_t *vid)
{
- struct mipi_dsim_config dsim_config_dt;
+ static struct mipi_dsim_config dsim_config_dt;
+ static struct exynos_platform_mipi_dsim dsim_platform_data_dt;
if (exynos_dsim_config_parse_dt(gd->fdt_blob, &dsim_config_dt))
debug("Can't get proper dsim config.\n");
@@ -330,5 +319,5 @@ void exynos_init_dsim_platform_data(vidinfo_t *vid)
mipi_lcd_device_dt.platform_data = (void *)&dsim_platform_data_dt;
exynos_mipi_dsi_register_lcd_device(&mipi_lcd_device_dt);
- dsim_pd = &dsim_platform_data_dt;
+ vid->dsim_platform_data_dt = &dsim_platform_data_dt;
}
diff --git a/include/exynos_lcd.h b/include/exynos_lcd.h
index 1f6c6c75a2..0aa0fc71a3 100644
--- a/include/exynos_lcd.h
+++ b/include/exynos_lcd.h
@@ -76,6 +76,7 @@ typedef struct vidinfo {
unsigned int dual_lcd_enabled;
struct exynos_fb *fimd_ctrl;
+ struct exynos_platform_mipi_dsim *dsim_platform_data_dt;
} vidinfo_t;
#endif
OpenPOWER on IntegriCloud