1*0098e179SSimon Glass /* 2*0098e179SSimon Glass * (C) Copyright 2000 3*0098e179SSimon Glass * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4*0098e179SSimon Glass * 5*0098e179SSimon Glass * SPDX-License-Identifier: GPL-2.0+ 6*0098e179SSimon Glass */ 7*0098e179SSimon Glass 8*0098e179SSimon Glass #ifndef __bootretry_h 9*0098e179SSimon Glass #define __bootretry_h 10*0098e179SSimon Glass 11*0098e179SSimon Glass #ifdef CONFIG_BOOT_RETRY_TIME 12*0098e179SSimon Glass /** 13*0098e179SSimon Glass * bootretry_tstc_timeout() - ensure we get a keypress before timeout 14*0098e179SSimon Glass * 15*0098e179SSimon Glass * Check for a keypress repeatedly, resetting the watchdog each time. If a 16*0098e179SSimon Glass * keypress is not received within the command timeout, return an error. 17*0098e179SSimon Glass * 18*0098e179SSimon Glass * @return 0 if a key is received in time, -ETIMEDOUT if not 19*0098e179SSimon Glass */ 20*0098e179SSimon Glass int bootretry_tstc_timeout(void); 21*0098e179SSimon Glass #else 22*0098e179SSimon Glass static inline int bootretry_tstc_timeout(void) 23*0098e179SSimon Glass { 24*0098e179SSimon Glass return 0; 25*0098e179SSimon Glass } 26*0098e179SSimon Glass #endif 27*0098e179SSimon Glass 28*0098e179SSimon Glass void init_cmd_timeout(void); 29*0098e179SSimon Glass void reset_cmd_timeout(void); 30*0098e179SSimon Glass 31*0098e179SSimon Glass #endif 32