This would be useful for boards which share serial console with some
other device, like MCU, which may unintentionally interrupt boot process.
It is fast and simple solution, for future we should restore functionality
from original U-Boot code, with string stop sequences.
*/
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
static __inline__ int abortboot(int bootdelay){
+#ifdef CONFIG_AUTOBOOT_STOP_CHAR
+ char stopc;
+#endif
int abort = 0;
#ifdef CONFIG_SILENT_CONSOLE
/* we got a key press */
if(tstc()){
+#ifdef CONFIG_AUTOBOOT_STOP_CHAR
+ stopc = getc();
+ if (stopc == CONFIG_AUTOBOOT_STOP_CHAR) {
+ abort = 1;
+ bootdelay = 0;
+
+ break;
+ }
+#else
/* don't auto boot */
abort = 1;
/* no more delay */
/* consume input */
(void) getc();
break;
+#endif /* CONFIG_AUTOBOOT_STOP_CHAR */
}
udelay(10000);
}