summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--board/freescale/common/recovery.c28
-rw-r--r--board/freescale/mx6sl_evk/mx6sl_evk.c11
-rw-r--r--include/configs/mx6sl_evk_android.h5
3 files changed, 8 insertions, 36 deletions
diff --git a/board/freescale/common/recovery.c b/board/freescale/common/recovery.c
index 31a80768a1f..cd6d40c70a1 100644
--- a/board/freescale/common/recovery.c
+++ b/board/freescale/common/recovery.c
@@ -25,15 +25,14 @@
#include <mxc_keyb.h>
#endif
-extern int check_powerkey_pressed(void);
extern int check_recovery_cmd_file(void);
extern enum boot_device get_boot_device(void);
#ifdef CONFIG_MXC_KPD
-#define PRESSED_HOME 0x01
-#define PRESSED_POWER 0x02
-#define RECOVERY_KEY_MASK (PRESSED_HOME | PRESSED_POWER)
+#define PRESSED_VOL_DOWN 0x01
+#define PRESSED_POWER 0x02
+#define RECOVERY_KEY_MASK (PRESSED_VOL_DOWN | PRESSED_POWER)
inline int test_key(int value, struct kpp_key_info *ki)
{
@@ -53,35 +52,18 @@ int check_key_pressing(void)
udelay(1000);
keys = mxc_kpp_getc(&key_info);
- if (!check_powerkey_pressed())
- keys = 0;
-
-#ifdef CONFIG_MX6SL_EVK
- /* For mx6sl-evk, hold power+vol_down when boot
- will enter recovery mode */
printf("Detecting VOL_DOWN+POWER key for recovery(%d:%d) ...\n",
keys, keys ? key_info->val : 0);
- if (keys > 0) {
- for (i = 0; i < keys; i++) {
- if (test_key(CONFIG_VOL_DOWN_KEY, &key_info[i])) {
- ret = 1;
- break;
- }
- }
- }
-#else
- puts("Detecting HOME+POWER key for recovery ...\n");
if (keys > 1) {
for (i = 0; i < keys; i++) {
if (test_key(CONFIG_POWER_KEY, &key_info[i]))
- state |= PRESSED_HOME;
- else if (test_key(CONFIG_HOME_KEY, &key_info[i]))
state |= PRESSED_POWER;
+ else if (test_key(CONFIG_VOL_DOWN_KEY, &key_info[i]))
+ state |= PRESSED_VOL_DOWN;
}
}
if ((state & RECOVERY_KEY_MASK) == RECOVERY_KEY_MASK)
ret = 1;
-#endif
if (key_info)
free(key_info);
return ret;
diff --git a/board/freescale/mx6sl_evk/mx6sl_evk.c b/board/freescale/mx6sl_evk/mx6sl_evk.c
index e29761ee1f3..8af6b759d9c 100644
--- a/board/freescale/mx6sl_evk/mx6sl_evk.c
+++ b/board/freescale/mx6sl_evk/mx6sl_evk.c
@@ -1003,17 +1003,6 @@ int setup_mxc_kpd(void)
return 0;
}
-
-int check_powerkey_pressed(void)
-{
- mxc_iomux_v3_setup_pad(MX6SL_PAD_WDOG_B__GPIO_3_18);
- gpio_direction_input(GPIO_POWER_KEY);
- udelay(5);
- if (gpio_get_value(GPIO_POWER_KEY) == 0)
- return 1;
- return 0;
-}
-
#endif
diff --git a/include/configs/mx6sl_evk_android.h b/include/configs/mx6sl_evk_android.h
index ded93452566..9b1261c03dd 100644
--- a/include/configs/mx6sl_evk_android.h
+++ b/include/configs/mx6sl_evk_android.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Freescale Semiconductor, Inc.
+ * Copyright (C) 2012-2013 Freescale Semiconductor, Inc.
*
* Configuration settings for the MX6Q Sabre Lite2 Freescale board.
*
@@ -50,7 +50,8 @@
#define CONFIG_CMD_BOOTI
#define CONFIG_ANDROID_RECOVERY
-#define CONFIG_VOL_DOWN_KEY KEY_4
+#define CONFIG_VOL_DOWN_KEY KEY_BACK
+#define CONFIG_POWER_KEY KEY_5
#define CONFIG_MXC_KPD
#define CONFIG_MXC_KEYMAPPING \