提交 6264800e 编写于 作者: H Holger Brunck 提交者: Albert ARIBAUD

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: NHolger Brunck <holger.brunck@keymile.com>
Signed-off-by: NValentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
上级 c675fc6d
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册