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 <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
master
Simon Glass 8 years ago committed by Minkyu Kang
parent 08a7aa1e5b
commit b6feb2675b
  1. 2
      arch/arm/mach-exynos/include/mach/cpu.h
  2. 4
      drivers/video/exynos/exynos_dp_lowlevel.c
  3. 11
      drivers/video/exynos/exynos_fb.c
  4. 7
      drivers/video/exynos/exynos_fimd.c
  5. 4
      drivers/video/exynos/exynos_mipi_dsi.c
  6. 2
      include/exynos_lcd.h

@ -288,9 +288,7 @@ static inline unsigned long __attribute__((no_instrument_function)) \
SAMSUNG_BASE(adc, ADC_BASE) SAMSUNG_BASE(adc, ADC_BASE)
SAMSUNG_BASE(clock, CLOCK_BASE) SAMSUNG_BASE(clock, CLOCK_BASE)
SAMSUNG_BASE(ace_sfr, ACE_SFR_BASE) SAMSUNG_BASE(ace_sfr, ACE_SFR_BASE)
SAMSUNG_BASE(dp, DP_BASE)
SAMSUNG_BASE(sysreg, SYSREG_BASE) SAMSUNG_BASE(sysreg, SYSREG_BASE)
SAMSUNG_BASE(fimd, FIMD_BASE)
SAMSUNG_BASE(i2c, I2C_BASE) SAMSUNG_BASE(i2c, I2C_BASE)
SAMSUNG_BASE(i2s, I2S_BASE) SAMSUNG_BASE(i2s, I2S_BASE)
SAMSUNG_BASE(mipi_dsim, MIPI_DSIM_BASE) SAMSUNG_BASE(mipi_dsim, MIPI_DSIM_BASE)

@ -22,7 +22,6 @@ struct exynos_dp *dp_regs;
void exynos_dp_set_base_addr(void) void exynos_dp_set_base_addr(void)
{ {
#if CONFIG_IS_ENABLED(OF_CONTROL)
unsigned int node = fdtdec_next_compatible(gd->fdt_blob, unsigned int node = fdtdec_next_compatible(gd->fdt_blob,
0, COMPAT_SAMSUNG_EXYNOS5_DP); 0, COMPAT_SAMSUNG_EXYNOS5_DP);
if (node <= 0) if (node <= 0)
@ -32,9 +31,6 @@ void exynos_dp_set_base_addr(void)
node, "reg"); node, "reg");
if (dp_regs == NULL) if (dp_regs == NULL)
debug("Can't get the DP base address\n"); 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) static void exynos_dp_enable_video_input(unsigned int enable)

@ -28,7 +28,6 @@ DECLARE_GLOBAL_DATA_PTR;
static unsigned int panel_width, panel_height; static unsigned int panel_width, panel_height;
#if CONFIG_IS_ENABLED(OF_CONTROL)
vidinfo_t panel_info = { vidinfo_t panel_info = {
/* /*
* Insert a value here so that we don't end up in the BSS * 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, .vl_col = -1,
}; };
#endif
ushort *configuration_get_cmap(void) ushort *configuration_get_cmap(void)
{ {
@ -126,7 +124,6 @@ static void lcd_panel_on(vidinfo_t *vid)
exynos_backlight_on(1); exynos_backlight_on(1);
#if CONFIG_IS_ENABLED(OF_CONTROL)
node = fdtdec_next_compatible(gd->fdt_blob, 0, node = fdtdec_next_compatible(gd->fdt_blob, 0,
COMPAT_SAMSUNG_EXYNOS_FIMD); COMPAT_SAMSUNG_EXYNOS_FIMD);
if (node <= 0) { if (node <= 0) {
@ -141,7 +138,6 @@ static void lcd_panel_on(vidinfo_t *vid)
&bl_en_gpio, &bl_en_gpio,
GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
#endif
exynos_cfg_ldo(); exynos_cfg_ldo();
exynos_enable_ldo(1); exynos_enable_ldo(1);
@ -150,7 +146,6 @@ static void lcd_panel_on(vidinfo_t *vid)
exynos_mipi_dsi_init(); exynos_mipi_dsi_init();
} }
#if CONFIG_IS_ENABLED(OF_CONTROL)
int exynos_lcd_early_init(const void *blob) int exynos_lcd_early_init(const void *blob)
{ {
unsigned int node; unsigned int node;
@ -288,22 +283,16 @@ int exynos_lcd_early_init(const void *blob)
return 0; return 0;
} }
#endif
void lcd_ctrl_init(void *lcdbase) void lcd_ctrl_init(void *lcdbase)
{ {
set_system_display_ctrl(); set_system_display_ctrl();
set_lcd_clk(); set_lcd_clk();
#if CONFIG_IS_ENABLED(OF_CONTROL)
#ifdef CONFIG_EXYNOS_MIPI_DSIM #ifdef CONFIG_EXYNOS_MIPI_DSIM
exynos_init_dsim_platform_data(&panel_info); exynos_init_dsim_platform_data(&panel_info);
#endif #endif
exynos_lcd_misc_init(&panel_info); 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_width = panel_info.vl_width;
panel_height = panel_info.vl_height; panel_height = panel_info.vl_height;

@ -251,7 +251,6 @@ void exynos_fimd_window_off(unsigned int win_id)
writel(cfg, &fimd_ctrl->winshmap); writel(cfg, &fimd_ctrl->winshmap);
} }
#if CONFIG_IS_ENABLED(OF_CONTROL)
/* /*
* The reset value for FIMD SYSMMU register MMU_CTRL is 3 * The reset value for FIMD SYSMMU register MMU_CTRL is 3
* on Exynos5420 and newer versions. * on Exynos5420 and newer versions.
@ -289,13 +288,11 @@ void exynos_fimd_disable_sysmmu(void)
writel(0x0, sysmmufimd); writel(0x0, sysmmufimd);
} }
} }
#endif
void exynos_fimd_lcd_init(vidinfo_t *vid) void exynos_fimd_lcd_init(vidinfo_t *vid)
{ {
unsigned int cfg = 0, rgb_mode; unsigned int cfg = 0, rgb_mode;
unsigned int offset; unsigned int offset;
#if CONFIG_IS_ENABLED(OF_CONTROL)
unsigned int node; unsigned int node;
node = fdtdec_next_compatible(gd->fdt_blob, 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")) if (fdtdec_get_bool(gd->fdt_blob, node, "samsung,disable-sysmmu"))
exynos_fimd_disable_sysmmu(); exynos_fimd_disable_sysmmu();
#else
fimd_ctrl = (struct exynos_fb *)samsung_get_base_fimd();
#endif
offset = exynos_fimd_get_base_offset(); offset = exynos_fimd_get_base_offset();
/* store panel info to global variable */ /* store panel info to global variable */

@ -28,11 +28,9 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
static struct exynos_platform_mipi_dsim *dsim_pd; static struct exynos_platform_mipi_dsim *dsim_pd;
#if CONFIG_IS_ENABLED(OF_CONTROL)
static 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; static struct exynos_platform_mipi_dsim dsim_platform_data_dt;
static struct mipi_dsim_lcd_device mipi_lcd_device_dt; static struct mipi_dsim_lcd_device mipi_lcd_device_dt;
#endif
struct mipi_dsim_ddi { struct mipi_dsim_ddi {
int bus_id; int bus_id;
@ -249,7 +247,6 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd)
dsim_pd = pd; dsim_pd = pd;
} }
#if CONFIG_IS_ENABLED(OF_CONTROL)
int exynos_dsim_config_parse_dt(const void *blob) int exynos_dsim_config_parse_dt(const void *blob)
{ {
int node; int node;
@ -334,4 +331,3 @@ void exynos_init_dsim_platform_data(vidinfo_t *vid)
dsim_pd = &dsim_platform_data_dt; dsim_pd = &dsim_platform_data_dt;
} }
#endif

@ -77,6 +77,4 @@ typedef struct vidinfo {
unsigned int dual_lcd_enabled; unsigned int dual_lcd_enabled;
} vidinfo_t; } vidinfo_t;
void init_panel_info(vidinfo_t *vid);
#endif #endif

Loading…
Cancel
Save