3 * Stefan Roese, DENX Software Engineering, sr@denx.de.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
21 #include <asm/byteorder.h>
23 #if !defined(CONFIG_SYS_BOOTCOUNT_LE) && !defined(CONFIG_SYS_BOOTCOUNT_BE)
24 # if __BYTE_ORDER == __LITTLE_ENDIAN
25 # define CONFIG_SYS_BOOTCOUNT_LE
27 # define CONFIG_SYS_BOOTCOUNT_BE
31 #ifdef CONFIG_SYS_BOOTCOUNT_LE
32 static inline void raw_bootcount_store(volatile u32 *addr, u32 data)
37 static inline u32 raw_bootcount_load(volatile u32 *addr)
42 static inline void raw_bootcount_store(volatile u32 *addr, u32 data)
47 static inline u32 raw_bootcount_load(volatile u32 *addr)