[U-Boot] [PATCH 1/2] EXYNOS5: Make all display related code dependent on CONFIG_LCD

u-boot compilation fails for smdk5250 when we deselect CONFIG_LCD from the main config file. This patch fixes it.
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com --- board/samsung/smdk5250/smdk5250.c | 2 ++ include/configs/exynos5250-dt.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 9c4bf9b..7a5f132 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -281,6 +281,7 @@ int board_early_init_f(void) } #endif
+#ifdef CONFIG_LCD void cfg_lcd_gpio(void) { struct exynos5_gpio_part1 *gpio1 = @@ -374,3 +375,4 @@ void init_panel_info(vidinfo_t *vid)
exynos_set_dp_platform_data(&dp_platform_data); } +#endif diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 07bca1d..298bae9 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -299,10 +299,12 @@
/* Display */ #define CONFIG_LCD +#ifdef CONFIG_LCD #define CONFIG_EXYNOS_FB #define CONFIG_EXYNOS_DP #define LCD_XRES 2560 #define LCD_YRES 1600 #define LCD_BPP LCD_COLOR16 +#endif
#endif /* __CONFIG_H */

With this patch, stdout/stderr is assigned to serial and also to LCD. Initially, u-boot output console is observed via serial port. If you also have a DP panel connected onto your SMDK5250 board, you can switch to LCD console by typing "setenv stdout lcd". You can always switch back to serial using "setenv stdout serial". You can switch error console(stderr) as well, using similar commands.
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com --- include/configs/exynos5250-dt.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 298bae9..49c0adf 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -305,6 +305,12 @@ #define LCD_XRES 2560 #define LCD_YRES 1600 #define LCD_BPP LCD_COLOR16 + +/* Override console configuration when LCD is present */ +#define CONFIG_CONSOLE_MUX +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_EXTRA_ENV_SETTINGS \ + "stdout=serial,lcd\0" #endif
#endif /* __CONFIG_H */

Hi Ajay,
On Wed, Jan 9, 2013 at 11:45 PM, Ajay Kumar ajaykumar.rs@samsung.com wrote:
With this patch, stdout/stderr is assigned to serial and also to LCD. Initially, u-boot output console is observed via serial port. If you also have a DP panel connected onto your SMDK5250 board, you can switch to LCD console by typing "setenv stdout lcd". You can always switch back to serial using "setenv stdout serial". You can switch error console(stderr) as well, using similar commands.
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com
Acked-by: Simon Glass sjg@chromium.org
This is OK for now. You could perhaps see what Tegra does here - there is code to patch up the stdout value based on settings I think.
We probably want CONFIG_CONSOLE_MUX to be always defined, so perhaps think about that for a future patch.
include/configs/exynos5250-dt.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 298bae9..49c0adf 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -305,6 +305,12 @@ #define LCD_XRES 2560 #define LCD_YRES 1600 #define LCD_BPP LCD_COLOR16
+/* Override console configuration when LCD is present */ +#define CONFIG_CONSOLE_MUX +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_EXTRA_ENV_SETTINGS \
"stdout=serial,lcd\0"
#endif
#endif /* __CONFIG_H */
1.8.0
Regards, Simon

Hi Ajay,
On Wed, Jan 9, 2013 at 11:45 PM, Ajay Kumar ajaykumar.rs@samsung.com wrote:
u-boot compilation fails for smdk5250 when we deselect CONFIG_LCD from the main config file. This patch fixes it.
Signed-off-by: Ajay Kumar ajaykumar.rs@samsung.com
Acked-by: Simon Glass sjg@chromium.org
What is the error?
board/samsung/smdk5250/smdk5250.c | 2 ++ include/configs/exynos5250-dt.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 9c4bf9b..7a5f132 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -281,6 +281,7 @@ int board_early_init_f(void) } #endif
+#ifdef CONFIG_LCD void cfg_lcd_gpio(void) { struct exynos5_gpio_part1 *gpio1 = @@ -374,3 +375,4 @@ void init_panel_info(vidinfo_t *vid)
exynos_set_dp_platform_data(&dp_platform_data);
} +#endif diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 07bca1d..298bae9 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -299,10 +299,12 @@
/* Display */ #define CONFIG_LCD +#ifdef CONFIG_LCD #define CONFIG_EXYNOS_FB #define CONFIG_EXYNOS_DP #define LCD_XRES 2560 #define LCD_YRES 1600 #define LCD_BPP LCD_COLOR16 +#endif
#endif /* __CONFIG_H */
1.8.0
Regards, Simon
participants (2)
-
Ajay Kumar
-
Simon Glass