From b6feb2675b75c687b9ddb9e5a493cfe4035e387d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 21 Feb 2016 21:08:39 -0700 Subject: [PATCH] exynos: video: Drop dead code We always use device tree with video, so can drop these #ifdefs. Some of the hardware addresses are not needed either. Signed-off-by: Simon Glass Acked-by: Anatolij Gustschin Acked-by: Anatolij Gustschin Signed-off-by: Minkyu Kang --- arch/arm/mach-exynos/include/mach/cpu.h | 2 -- drivers/video/exynos/exynos_dp_lowlevel.c | 4 ---- drivers/video/exynos/exynos_fb.c | 11 ----------- drivers/video/exynos/exynos_fimd.c | 7 ------- drivers/video/exynos/exynos_mipi_dsi.c | 4 ---- include/exynos_lcd.h | 2 -- 6 files changed, 30 deletions(-) diff --git a/arch/arm/mach-exynos/include/mach/cpu.h b/arch/arm/mach-exynos/include/mach/cpu.h index f12e3d6..1f722df 100644 --- a/arch/arm/mach-exynos/include/mach/cpu.h +++ b/arch/arm/mach-exynos/include/mach/cpu.h @@ -288,9 +288,7 @@ static inline unsigned long __attribute__((no_instrument_function)) \ SAMSUNG_BASE(adc, ADC_BASE) SAMSUNG_BASE(clock, CLOCK_BASE) SAMSUNG_BASE(ace_sfr, ACE_SFR_BASE) -SAMSUNG_BASE(dp, DP_BASE) SAMSUNG_BASE(sysreg, SYSREG_BASE) -SAMSUNG_BASE(fimd, FIMD_BASE) SAMSUNG_BASE(i2c, I2C_BASE) SAMSUNG_BASE(i2s, I2S_BASE) SAMSUNG_BASE(mipi_dsim, MIPI_DSIM_BASE) diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c index acb5bc8..e417cf8 100644 --- a/drivers/video/exynos/exynos_dp_lowlevel.c +++ b/drivers/video/exynos/exynos_dp_lowlevel.c @@ -22,7 +22,6 @@ struct exynos_dp *dp_regs; void exynos_dp_set_base_addr(void) { -#if CONFIG_IS_ENABLED(OF_CONTROL) unsigned int node = fdtdec_next_compatible(gd->fdt_blob, 0, COMPAT_SAMSUNG_EXYNOS5_DP); if (node <= 0) @@ -32,9 +31,6 @@ void exynos_dp_set_base_addr(void) node, "reg"); if (dp_regs == NULL) debug("Can't get the DP base address\n"); -#else - dp_regs = (struct exynos_dp *)samsung_get_base_dp(); -#endif } static void exynos_dp_enable_video_input(unsigned int enable) diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c index 69edc3a..39e3ade 100644 --- a/drivers/video/exynos/exynos_fb.c +++ b/drivers/video/exynos/exynos_fb.c @@ -28,7 +28,6 @@ DECLARE_GLOBAL_DATA_PTR; static unsigned int panel_width, panel_height; -#if CONFIG_IS_ENABLED(OF_CONTROL) vidinfo_t panel_info = { /* * Insert a value here so that we don't end up in the BSS @@ -36,7 +35,6 @@ vidinfo_t panel_info = { */ .vl_col = -1, }; -#endif ushort *configuration_get_cmap(void) { @@ -126,7 +124,6 @@ static void lcd_panel_on(vidinfo_t *vid) exynos_backlight_on(1); -#if CONFIG_IS_ENABLED(OF_CONTROL) node = fdtdec_next_compatible(gd->fdt_blob, 0, COMPAT_SAMSUNG_EXYNOS_FIMD); if (node <= 0) { @@ -141,7 +138,6 @@ static void lcd_panel_on(vidinfo_t *vid) &bl_en_gpio, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); -#endif exynos_cfg_ldo(); exynos_enable_ldo(1); @@ -150,7 +146,6 @@ static void lcd_panel_on(vidinfo_t *vid) exynos_mipi_dsi_init(); } -#if CONFIG_IS_ENABLED(OF_CONTROL) int exynos_lcd_early_init(const void *blob) { unsigned int node; @@ -288,22 +283,16 @@ int exynos_lcd_early_init(const void *blob) return 0; } -#endif void lcd_ctrl_init(void *lcdbase) { set_system_display_ctrl(); set_lcd_clk(); -#if CONFIG_IS_ENABLED(OF_CONTROL) #ifdef CONFIG_EXYNOS_MIPI_DSIM exynos_init_dsim_platform_data(&panel_info); #endif exynos_lcd_misc_init(&panel_info); -#else - /* initialize parameters which is specific to panel. */ - init_panel_info(&panel_info); -#endif panel_width = panel_info.vl_width; panel_height = panel_info.vl_height; diff --git a/drivers/video/exynos/exynos_fimd.c b/drivers/video/exynos/exynos_fimd.c index ac001a8..019d88f 100644 --- a/drivers/video/exynos/exynos_fimd.c +++ b/drivers/video/exynos/exynos_fimd.c @@ -251,7 +251,6 @@ void exynos_fimd_window_off(unsigned int win_id) writel(cfg, &fimd_ctrl->winshmap); } -#if CONFIG_IS_ENABLED(OF_CONTROL) /* * The reset value for FIMD SYSMMU register MMU_CTRL is 3 * on Exynos5420 and newer versions. @@ -289,13 +288,11 @@ void exynos_fimd_disable_sysmmu(void) writel(0x0, sysmmufimd); } } -#endif void exynos_fimd_lcd_init(vidinfo_t *vid) { unsigned int cfg = 0, rgb_mode; unsigned int offset; -#if CONFIG_IS_ENABLED(OF_CONTROL) unsigned int node; node = fdtdec_next_compatible(gd->fdt_blob, @@ -311,10 +308,6 @@ void exynos_fimd_lcd_init(vidinfo_t *vid) if (fdtdec_get_bool(gd->fdt_blob, node, "samsung,disable-sysmmu")) exynos_fimd_disable_sysmmu(); -#else - fimd_ctrl = (struct exynos_fb *)samsung_get_base_fimd(); -#endif - offset = exynos_fimd_get_base_offset(); /* store panel info to global variable */ diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c index b597acc..5001e16 100644 --- a/drivers/video/exynos/exynos_mipi_dsi.c +++ b/drivers/video/exynos/exynos_mipi_dsi.c @@ -28,11 +28,9 @@ DECLARE_GLOBAL_DATA_PTR; static struct exynos_platform_mipi_dsim *dsim_pd; -#if CONFIG_IS_ENABLED(OF_CONTROL) 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; -#endif struct mipi_dsim_ddi { int bus_id; @@ -249,7 +247,6 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } -#if CONFIG_IS_ENABLED(OF_CONTROL) int exynos_dsim_config_parse_dt(const void *blob) { int node; @@ -334,4 +331,3 @@ void exynos_init_dsim_platform_data(vidinfo_t *vid) dsim_pd = &dsim_platform_data_dt; } -#endif diff --git a/include/exynos_lcd.h b/include/exynos_lcd.h index 3969a6a..e1769f0 100644 --- a/include/exynos_lcd.h +++ b/include/exynos_lcd.h @@ -77,6 +77,4 @@ typedef struct vidinfo { unsigned int dual_lcd_enabled; } vidinfo_t; -void init_panel_info(vidinfo_t *vid); - #endif