Simon Glass | 66ded17 | 2014-04-10 20:01:28 -0600 | [diff] [blame] | 1 | /* |
| 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 | |
Masahiro Yamada | 41598c8 | 2016-06-20 17:33:39 +0900 | [diff] [blame] | 15 | #ifdef CONFIG_AUTOBOOT |
Simon Glass | affb215 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 16 | /** |
| 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 | */ |
| 25 | const 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 | */ |
| 35 | void autoboot_command(const char *cmd); |
Simon Glass | 66ded17 | 2014-04-10 20:01:28 -0600 | [diff] [blame] | 36 | #else |
Simon Glass | affb215 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 37 | static inline const char *bootdelay_process(void) |
| 38 | { |
| 39 | return NULL; |
| 40 | } |
| 41 | |
| 42 | static inline void autoboot_command(const char *s) |
Simon Glass | 66ded17 | 2014-04-10 20:01:28 -0600 | [diff] [blame] | 43 | { |
| 44 | } |
| 45 | #endif |
| 46 | |
| 47 | #endif |