summaryrefslogtreecommitdiff
path: root/board/liebherr
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2018-05-02 16:10:55 +0200
committerTom Rini <trini@konsulko.com>2018-05-10 20:38:32 -0400
commit2dbd5cd966a485becf8ef2286c56aeb709877c8d (patch)
tree53431fa6834f070a2ebf903bc2ec07f74be63cac /board/liebherr
parenta8be2494632894669f0b78391b8c1b4a82877757 (diff)
downloadu-boot-2dbd5cd966a485becf8ef2286c56aeb709877c8d.tar.gz
u-boot-2dbd5cd966a485becf8ef2286c56aeb709877c8d.tar.bz2
u-boot-2dbd5cd966a485becf8ef2286c56aeb709877c8d.zip
bootcount: display5: spl: Extend DISPLAY5 board SPL to support bootcount checking
This patch is necessary for providing basic bootcount checking in the case of using "falcon" boot mode in that board. It forces u-boot proper boot, when we exceed the number of errors. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/liebherr')
-rw-r--r--board/liebherr/display5/spl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index 49bcafef74..6508e0ffa7 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -19,6 +19,7 @@
#include <environment.h>
#include <fsl_esdhc.h>
#include <netdev.h>
+#include <bootcount.h>
#include "common.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -213,7 +214,7 @@ void board_boot_order(u32 *spl_boot_list)
env_load();
s = env_get("BOOT_FROM");
- if (s && strcmp(s, "ACTIVE") == 0) {
+ if (s && !bootcount_error() && strcmp(s, "ACTIVE") == 0) {
spl_boot_list[0] = BOOT_DEVICE_MMC1;
spl_boot_list[1] = spl_boot_device();
}