summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2010-09-10 17:17:12 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2010-09-10 17:23:18 +0800
commitdaae245a544d8b23dfa74c6108c35cebef81b8e7 (patch)
treea35f6e1eb2b46e6a7431d4f071ebe5299917d093 /include
parent7bbe5d7a5203a07496ec372ab55563a2e230d03e (diff)
downloadu-boot-imx-daae245a544d8b23dfa74c6108c35cebef81b8e7.zip
u-boot-imx-daae245a544d8b23dfa74c6108c35cebef81b8e7.tar.gz
u-boot-imx-daae245a544d8b23dfa74c6108c35cebef81b8e7.tar.bz2
ENGR00127368 UBOOT: Make the android recovery code common for platformsrel_imx_2.6.31_10.09.00
Move the android recovery codes into common/recovery.c. Cut the keypad detecting time. Now we only need detect there's POWER and HOME key pressing at the time scanning keyboard matrix. So user must hold these two keys when bootup to enter recovery mode. This can reduce the uboot boot time with recovery mode configured. Later /cache file checking for recovery command should be merged into the common/recovery.c Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-mx51/keypad.h10
-rw-r--r--include/asm-arm/arch-mx51/mx51.h5
-rw-r--r--include/configs/mx51_3stack_android.h7
-rw-r--r--include/configs/mx51_bbg_android.h14
-rw-r--r--include/mxc_keyb.h4
5 files changed, 13 insertions, 27 deletions
diff --git a/include/asm-arm/arch-mx51/keypad.h b/include/asm-arm/arch-mx51/keypad.h
index 5846364..1e67547 100644
--- a/include/asm-arm/arch-mx51/keypad.h
+++ b/include/asm-arm/arch-mx51/keypad.h
@@ -52,14 +52,4 @@
#define KEY_MENU 139 /* Menu (show menu) */
#define KEY_BACK 158 /* AC Back */
-#if defined(CONFIG_MX51_BBG)
-#define TEST_HOME_KEY_DEPRESS(k, e) (((k) == (KEY_F1)) && (((e) == (KDepress))))
-#define TEST_POWER_KEY_DEPRESS(k, e) (((k) == (KEY_F3)) && (((e) == (KDepress))))
-#elif defined(CONFIG_MX51_3DS)
-#define TEST_HOME_KEY_DEPRESS(k, e) (((k) == (KEY_MENU)) && (((e) == (KDepress))))
-#define TEST_POWER_KEY_DEPRESS(k, e) (((k) == (KEY_F2)) && (((e) == (KDepress))))
-#else
-# error Undefined board type!
-#endif
-
#endif
diff --git a/include/asm-arm/arch-mx51/mx51.h b/include/asm-arm/arch-mx51/mx51.h
index 11aba01..816e792 100644
--- a/include/asm-arm/arch-mx51/mx51.h
+++ b/include/asm-arm/arch-mx51/mx51.h
@@ -441,10 +441,11 @@
#ifndef __ASSEMBLER__
enum boot_device {
- UNKNOWN_BOOT,
- NAND_BOOT,
+ UNKNOWN_BOOT = -1,
+ NAND_BOOT = 0,
SPI_NOR_BOOT,
MMC_BOOT,
+ END_BOOT,
};
enum mxc_clock {
diff --git a/include/configs/mx51_3stack_android.h b/include/configs/mx51_3stack_android.h
index 3189269..81eb819 100644
--- a/include/configs/mx51_3stack_android.h
+++ b/include/configs/mx51_3stack_android.h
@@ -114,7 +114,9 @@
*/
#include <asm/arch/keypad.h>
-#define CONFIG_FSL_ANDROID
+#define CONFIG_ANDROID_RECOVERY
+#define CONFIG_POWER_KEY KEY_F2
+#define CONFIG_HOME_KEY KEY_MENU
#define CONFIG_MXC_KPD
#define CONFIG_MXC_KEYMAPPING \
@@ -135,7 +137,6 @@
#define CONFIG_ANDROID_RECOVERY_BOOTCMD_NAND \
"run bootargs_base bootargs_android;nand read ${loadaddr} 0x300000 0x250000;bootm"
#define CONFIG_ANDROID_RECOVERY_CMD_FILE "/recovery/command"
-#define CONFIG_ANDROID_BOOTMOD_DELAY 3
#define CONFIG_ANDROID_CACHE_PARTITION_MMC 6
#define CONFIG_ANDROID_UBIFS_PARTITION_NM "ROOT"
#define CONFIG_ANDROID_CACHE_PARTITION_NAND "cache"
@@ -162,7 +163,7 @@
#undef CONFIG_CMD_IMLS
-#define CONFIG_BOOTDELAY 3
+#define CONFIG_BOOTDELAY 1
#define CONFIG_PRIME "FEC0"
diff --git a/include/configs/mx51_bbg_android.h b/include/configs/mx51_bbg_android.h
index 79aae09..4641222 100644
--- a/include/configs/mx51_bbg_android.h
+++ b/include/configs/mx51_bbg_android.h
@@ -88,7 +88,9 @@
*/
#include <asm/arch/keypad.h>
-#define CONFIG_FSL_ANDROID
+#define CONFIG_ANDROID_RECOVERY
+#define CONFIG_POWER_KEY KEY_F3
+#define CONFIG_HOME_KEY KEY_F1
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITIONS
@@ -102,13 +104,6 @@
KEY_7, KEY_8, KEY_9, KEY_F3, KEY_DOWN, KEY_F4, \
KEY_0, KEY_OK, KEY_ESC, KEY_ENTER, KEY_MENU, KEY_BACK, \
}
- /*
- { \
- KEY_3, KEY_2, KEY_0, KEY_OK, KEY_ESC, KEY_ENTER,
- KEY_F1, KEY_4, KEY_6, KEY_5,
- KEY_LEFT, KEY_1, KEY_ , KEY_8, KEY_9, KEY_RIGHT,
- }
- */
#define CONFIG_MXC_KPD_COLMAX 6
#define CONFIG_MXC_KPD_ROWMAX 4
#define CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC \
@@ -116,7 +111,6 @@
#define CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC \
"run bootargs_base bootargs_android;mmc read 0 ${loadaddr} 0x800 0x1280;bootm"
#define CONFIG_ANDROID_RECOVERY_CMD_FILE "/recovery/command"
-#define CONFIG_ANDROID_BOOTMOD_DELAY 3
#define CONFIG_ANDROID_CACHE_PARTITION_MMC 6
/* allow to overwrite serial and ethaddr */
@@ -140,7 +134,7 @@
#undef CONFIG_CMD_IMLS
-#define CONFIG_BOOTDELAY 3
+#define CONFIG_BOOTDELAY 1
#define CONFIG_PRIME "FEC0"
diff --git a/include/mxc_keyb.h b/include/mxc_keyb.h
index a4b0a4e..6f605ad 100644
--- a/include/mxc_keyb.h
+++ b/include/mxc_keyb.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -196,6 +196,6 @@ struct kpp_key_info {
};
int mxc_kpp_init(void);
-int mxc_kpp_getc(struct kpp_key_info *);
+int mxc_kpp_getc(struct kpp_key_info **);
#endif /* __MXC_KEYB_H__ */