mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
autoboot: remove CONFIG_ZERO_BOOTDELAY_CHECK
As the help message of CONFIG_BOOTDELAY says, CONFIG_BOOTDELAY=-2 means the autoboot with no delay, with no abort check even if CONFIG_ZERO_BOOTDELAY_CHECK is defined. To sum up, the autoboot behaves as follows: [1] CONFIG_BOOTDELAY=0 && CONFIG_ZERO_BOOTDELAY_CHECK=y autoboot with no delay, but you can abort it by key input [2] CONFIG_BOOTDELAY=0 && CONFIG_ZERO_BOOTDELAY_CHECK=n autoboot with no delay, with no check for abort [3] CONFIG_BOOTDELAY=-1 disable autoboot [4] CONFIG_BOOTDELAY=-2 autoboot with no delay, with no check for abort As you notice, [2] and [4] come to the same result, which means we do not need CONFIG_ZERO_BOOTDELAY_CHECK. We can control all the cases only by CONFIG_BOOTDELAY, like this: [1] CONFIG_BOOTDELAY=0 autoboot with no delay, but you can abort it by key input [2] CONFIG_BOOTDELAY=-1 disable autoboot [3] CONFIG_BOOTDELAY=-2 autoboot with no delay, with no check for abort This commit converts the logic as follow: CONFIG_BOOTDELAY=0 && CONFIG_ZERO_BOOTDELAY_CHECK=n --> CONFIG_BOOTDELAY=-2 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Christian Riesch <christian.riesch@omicronenergy.com> Acked-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
This commit is contained in:
committed by
Tom Rini
parent
9060970f4d
commit
2fbb8462b0
@@ -187,10 +187,8 @@ static int abortboot_keyed(int bootdelay)
|
||||
int abort;
|
||||
uint64_t etime = endtick(bootdelay);
|
||||
|
||||
#ifndef CONFIG_ZERO_BOOTDELAY_CHECK
|
||||
if (bootdelay == 0)
|
||||
if (bootdelay < 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
# ifdef CONFIG_AUTOBOOT_PROMPT
|
||||
/*
|
||||
@@ -230,7 +228,6 @@ static int abortboot_normal(int bootdelay)
|
||||
printf("Hit any key to stop autoboot: %2d ", bootdelay);
|
||||
#endif
|
||||
|
||||
#if defined CONFIG_ZERO_BOOTDELAY_CHECK
|
||||
/*
|
||||
* Check if key already pressed
|
||||
* Don't check if bootdelay < 0
|
||||
@@ -242,7 +239,6 @@ static int abortboot_normal(int bootdelay)
|
||||
abort = 1; /* don't auto boot */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
while ((bootdelay > 0) && (!abort)) {
|
||||
--bootdelay;
|
||||
|
Reference in New Issue
Block a user