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

Przemyslaw Marczak p.marczak at samsung.com
Wed Jan 22 11:24:19 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/trats2.h

Changes v4:
- remove include of pmic.h from trats2.h
- remove include of common.h from pmic.h

Changes v5:
- none

Changes v6:
- trats2.c : call boot menu from board file
- trats.h: remove definition CONFIG_TRATS2

 board/samsung/trats2/trats2.c |    5 +++++
 include/configs/trats2.h      |   22 ++++++++++++++++++++++
 include/power/pmic.h          |    1 -
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index b60a2da..62e7fd2 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -28,6 +28,7 @@
 #include <usb.h>
 #include <usb/s3c_udc.h>
 #include <usb_mass_storage.h>
+#include <samsung/misc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -615,6 +616,10 @@ void init_panel_info(vidinfo_t *vid)
 #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/trats2.h b/include/configs/trats2.h
index a856b56..c48e3f5 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -317,6 +317,28 @@ int get_soft_i2c_sda_pin(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/max77686_pmic.h>
+
+#define KEY_PWR_PMIC_NAME		"MAX77686_PMIC"
+#define KEY_PWR_STATUS_REG		MAX77686_REG_PMIC_STATUS1
+#define KEY_PWR_STATUS_MASK		(1 << 0)
+#define KEY_PWR_INTERRUPT_REG		MAX77686_REG_PMIC_INT1
+#define KEY_PWR_INTERRUPT_MASK		(1 << 1)
+
+#define KEY_VOL_UP_GPIO			exynos4x12_gpio_get(2, x2, 2)
+#define KEY_VOL_DOWN_GPIO		exynos4x12_gpio_get(2, x3, 3)
+#endif /* __ASSEMBLY__ */
+
+/* LCD console */
+#define LCD_BPP                 LCD_COLOR16
+#define CONFIG_SYS_WHITE_ON_BLACK
+
 /* LCD */
 #define CONFIG_EXYNOS_FB
 #define CONFIG_LCD
diff --git a/include/power/pmic.h b/include/power/pmic.h
index 0e7aa31..8f282dd 100644
--- a/include/power/pmic.h
+++ b/include/power/pmic.h
@@ -8,7 +8,6 @@
 #ifndef __CORE_PMIC_H_
 #define __CORE_PMIC_H_
 
-#include <common.h>
 #include <linux/list.h>
 #include <i2c.h>
 #include <power/power_chrg.h>
-- 
1.7.9.5



More information about the U-Boot mailing list