[U-Boot] [PATCH v6 11/11] universal: add LCD download menu support

Przemyslaw Marczak p.marczak at samsung.com
Wed Jan 22 11:24:20 CET 2014


Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>

---
changes v2:
- add definitions for check keys
- cleanup config definitions

Changes v3:
- remove CONFIG_BOARD_NAME from include/configs/5pc210_universal.h

Changes v4:
- none

Changes v5:
- none

Changes v6:
- universal.c : call boot menu from board file.

 board/samsung/universal_c210/universal.c |    5 +++++
 include/configs/s5pc210_universal.h      |   22 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index e300da3..98b387f 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -22,6 +22,7 @@
 #include <usb/s3c_udc.h>
 #include <asm/arch/cpu.h>
 #include <power/max8998_pmic.h>
+#include <samsung/misc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -515,6 +516,10 @@ int board_init(void)
 #ifdef CONFIG_MISC_INIT_R
 int misc_init_r(void)
 {
+#ifdef CONFIG_LCD_MENU
+	keys_init();
+	check_boot_mode();
+#endif
 #ifdef CONFIG_CMD_BMP
 	if (panel_info.logo_on)
 		draw_logo();
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 93b9dfb..bfb044b 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -274,6 +274,28 @@ int universal_spi_read(void);
 
 #define CONFIG_MISC_INIT_R
 
+/* Download menu - Samsung common */
+#define CONFIG_LCD_MENU
+#define CONFIG_LCD_MENU_BOARD
+
+/* Download menu - definitions for check keys */
+#ifndef __ASSEMBLY__
+#include <power/max8998_pmic.h>
+
+#define KEY_PWR_PMIC_NAME		"MAX8998_PMIC"
+#define KEY_PWR_STATUS_REG		MAX8998_REG_STATUS1
+#define KEY_PWR_STATUS_MASK		(1 << 7)
+#define KEY_PWR_INTERRUPT_REG		MAX8998_REG_IRQ1
+#define KEY_PWR_INTERRUPT_MASK		(1 << 7)
+
+#define KEY_VOL_UP_GPIO			exynos4_gpio_get(2, x2, 0)
+#define KEY_VOL_DOWN_GPIO		exynos4_gpio_get(2, x2, 1)
+#endif /* __ASSEMBLY__ */
+
+/* LCD console */
+#define LCD_BPP			LCD_COLOR16
+#define CONFIG_SYS_WHITE_ON_BLACK
+
 /*
  * LCD Settings
  */
-- 
1.7.9.5



More information about the U-Boot mailing list