summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAjay Kumar <ajaykumar.rs@samsung.com>2014-09-05 16:53:30 +0530
committerMinkyu Kang <mk7.kang@samsung.com>2014-09-05 20:37:07 +0900
commitf0017175e33d7c21269deebc5e2ca2827b1e5975 (patch)
treeab5921a656e54385b63f216247aff1b0319b3eab /board
parentb09200639d4c052e2bdf0df6fe843b7a8bcf01cc (diff)
downloadu-boot-imx-f0017175e33d7c21269deebc5e2ca2827b1e5975.zip
u-boot-imx-f0017175e33d7c21269deebc5e2ca2827b1e5975.tar.gz
u-boot-imx-f0017175e33d7c21269deebc5e2ca2827b1e5975.tar.bz2
exynos_fb: Remove usage of static defines
Previously, we used to statically assign values for vl_col, vl_row and vl_bpix using #defines like LCD_XRES, LCD_YRES and LCD_COLOR16. Introducing the function exynos_lcd_early_init() would take care of this assignment on the fly by parsing FIMD DT properties, thereby allowing us to remove LCD_XRES and LCD_YRES from the main config file. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board')
-rw-r--r--board/samsung/common/board.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 3d1cf43..5c3c5bb 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -20,6 +20,7 @@
#include <asm/arch/mmc.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/power.h>
+#include <asm/arch/system.h>
#include <power/pmic.h>
#include <asm/arch/sromc.h>
#include <lcd.h>
@@ -149,6 +150,21 @@ int board_early_init_f(void)
#ifdef CONFIG_SYS_I2C_INIT_BOARD
board_i2c_init(gd->fdt_blob);
#endif
+
+#if defined(CONFIG_OF_CONTROL) && defined(CONFIG_EXYNOS_FB)
+/*
+ * board_init_f(arch/arm/lib/board.c) calls lcd_setmem() which needs
+ * panel_info.vl_col, panel_info.vl_row and panel_info.vl_bpix, to reserve
+ * FB memory at a very early stage. So, we need to fill panel_info.vl_col,
+ * panel_info.vl_row and panel_info.vl_bpix before lcd_setmem() is called.
+ */
+ err = exynos_lcd_early_init(gd->fdt_blob);
+ if (err) {
+ debug("LCD early init failed\n");
+ return err;
+ }
+#endif
+
return exynos_early_init_f();
}
#endif