1 // SPDX-License-Identifier: GPL-2.0+
9 void bootcount_store(ulong a)
11 int upgrade_available = env_get_ulong("upgrade_available", 10, 0);
13 if (upgrade_available) {
14 env_set_ulong("bootcount", a);
19 ulong bootcount_load(void)
21 int upgrade_available = env_get_ulong("upgrade_available", 10, 0);
24 if (upgrade_available)
25 val = env_get_ulong("bootcount", 10, 0);