blob: 3a9059a0b9a57463fb7eb9f6aecb75ad54d9c38e [file] [log] [blame]
Simon Glass7b6a95a2014-04-10 20:01:28 -06001/*
2 * (C) Copyright 2000
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * Add to readline cmdline-editing by
6 * (C) Copyright 2005
7 * JinHua Luo, GuangDong Linux Center, <luo.jinhua@gd-linux.com>
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 */
11
12#ifndef __AUTOBOOT_H
13#define __AUTOBOOT_H
14
15#ifdef CONFIG_BOOTDELAY
Simon Glass5b47e302014-04-10 20:01:35 -060016/**
17 * bootdelay_process() - process the bootd delay
18 *
19 * Process the boot delay, boot limit, then get the value of either
20 * bootcmd, failbootcmd or altbootcmd depending on the current state.
21 * Return this command so it can be executed.
22 *
23 * @return command to executed
24 */
25const char *bootdelay_process(void);
26
27/**
28 * autoboot_command() - run the autoboot command
29 *
30 * If enabled, run the autoboot command returned from bootdelay_process().
31 * Also do the CONFIG_MENUKEY processing if enabled.
32 *
33 * @cmd: Command to run
34 */
35void autoboot_command(const char *cmd);
Simon Glass7b6a95a2014-04-10 20:01:28 -060036#else
Simon Glass5b47e302014-04-10 20:01:35 -060037static inline const char *bootdelay_process(void)
38{
39 return NULL;
40}
41
42static inline void autoboot_command(const char *s)
Simon Glass7b6a95a2014-04-10 20:01:28 -060043{
44}
45#endif
46
47#endif