3 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
9 #include <environment.h>
11 void bootcount_store(ulong a)
13 int upgrade_available = env_get_ulong("upgrade_available", 10, 0);
15 if (upgrade_available) {
16 env_set_ulong("bootcount", a);
21 ulong bootcount_load(void)
23 int upgrade_available = env_get_ulong("upgrade_available", 10, 0);
26 if (upgrade_available)
27 val = env_get_ulong("bootcount", 10, 0);