arm: vf610: add uart0 clock/iomux definitions
[u-boot/qq2440-u-boot.git] / drivers / bootcount / bootcount_env.c
blob2d6e8db126eabec07438111c65d0d0cac5531d68
1 /*
2 * (C) Copyright 2013
3 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
6 */
8 #include <common.h>
10 void bootcount_store(ulong a)
12 int upgrade_available = getenv_ulong("upgrade_available", 10, 0);
14 if (upgrade_available) {
15 setenv_ulong("bootcount", a);
16 saveenv();
20 ulong bootcount_load(void)
22 int upgrade_available = getenv_ulong("upgrade_available", 10, 0);
23 ulong val = 0;
25 if (upgrade_available)
26 val = getenv_ulong("bootcount", 10, 0);
28 return val;