diff options
author | Holger Brunck <holger.brunck@keymile.com> | 2011-09-27 02:54:31 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-11-03 22:56:22 +0100 |
commit | 6264800e61fa77bb14df3ac0c54fb1190394c5a9 (patch) | |
tree | cd915c55a10bcbd2c6b9091be029742f09a5c46a /board/keymile/km_arm | |
parent | c675fc6d8bd223e6e799f60ece8049153c49d2bb (diff) | |
download | u-boot-imx-6264800e61fa77bb14df3ac0c54fb1190394c5a9.zip u-boot-imx-6264800e61fa77bb14df3ac0c54fb1190394c5a9.tar.gz u-boot-imx-6264800e61fa77bb14df3ac0c54fb1190394c5a9.tar.bz2 |
arm/km/mgcoge3un: enhance "waitforne" feature
The mgcoge3un waits to be released from mgcoge3ne at startup.
This patch enhances this feature with the possibility to interrupt
this wait if a key is pressed.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Diffstat (limited to 'board/keymile/km_arm')
-rw-r--r-- | board/keymile/km_arm/km_arm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 6ef5e5d..6e32249 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -207,8 +207,14 @@ int misc_init_r(void) if (wait_for_ne != NULL) { if (strcmp(wait_for_ne, "true") == 0) { int cnt = 0; + int abort = 0; puts("NE go: "); while (startup_allowed() == 0) { + if (tstc()) { + (void) getc(); /* consume input */ + abort = 1; + break; + } udelay(200000); cnt++; if (cnt == 5) @@ -218,7 +224,10 @@ int misc_init_r(void) puts(" \b\b\b\b"); } } - puts("OK\n"); + if (abort == 1) + printf("\nAbort waiting for ne\n"); + else + puts("OK\n"); } } #endif |