mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
spl: input: Allow input in SPL and TPL
In some cases it is necessary to read the keyboard in early phases of U-Boot. Update the config to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
97f57109bb
commit
985ca3945f
3 changed files with 59 additions and 5 deletions
|
@ -652,7 +652,7 @@ int input_stdio_register(struct stdio_dev *dev)
|
|||
int error;
|
||||
|
||||
error = stdio_register(dev);
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT)
|
||||
/* check if this is the standard input device */
|
||||
if (!error && strcmp(env_get("stdin"), dev->name) == 0) {
|
||||
/* reassign the console */
|
||||
|
@ -660,6 +660,9 @@ int input_stdio_register(struct stdio_dev *dev)
|
|||
console_assign(stdin, dev->name))
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
error = error;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue