[PATCH 3/3] gta01: load NAND kernel upon AUX press
Marc Andre Tanner
openmoko at brain-dump.org
Wed Dec 2 01:52:54 CET 2009
From: Marc Andre Tanner <mat at brain-dump.org>
Signed-off-by: Marc Andre Tanner <mat at brain-dump.org>
---
src/cpu/s3c2410/gta01.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/cpu/s3c2410/gta01.c b/src/cpu/s3c2410/gta01.c
index 4686fa2..242c46f 100644
--- a/src/cpu/s3c2410/gta01.c
+++ b/src/cpu/s3c2410/gta01.c
@@ -218,18 +218,24 @@ static u8 get_ui_keys_gta01(void)
u8 ret = 0;
static u8 old_keys = 0; /* previous state for debounce */
static u8 older_keys = 0; /* previous debounced output for edge detect */
+ static u8 kernel_ui = 0;
/* GPF6 is AUX on GTA01, map to UI_ACTION_SKIPKERNEL, down = 0 */
keys = ! (rGPFDAT & (1 << 6));
/* edge action */
- if ((old_keys & 1) && !(older_keys & 1))
- ret |= UI_ACTION_SKIPKERNEL;
+ if ((old_keys & 1) && !(older_keys & 1)) {
+ /* only generate 1 skip event if a bootmenu kernel is configured
+ * otherwise we would probably end up skipping the ui kernel too */
+ if (!board_api_gta01.kernel_ui || !kernel_ui)
+ ret |= UI_ACTION_SKIPKERNEL;
+ kernel_ui = UI_ACTION_UI_KERNEL;
+ }
older_keys = old_keys;
old_keys = keys;
- return ret;
+ return ret | kernel_ui;
}
static u8 get_ui_debug_gta01(void)
@@ -309,4 +315,6 @@ const struct board_api board_api_gta01 = {
"root=/dev/mtdblock4 ",
},
},
+ /* boot NAND kernel on AUX press */
+ .kernel_ui = 3,
};
--
1.6.5
More information about the openmoko-kernel
mailing list