1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Stefan Roese, DENX Software Engineering, sr@denx.de.
11 #include <asm/byteorder.h>
13 #if !defined(CONFIG_SYS_BOOTCOUNT_LE) && !defined(CONFIG_SYS_BOOTCOUNT_BE)
14 # if __BYTE_ORDER == __LITTLE_ENDIAN
15 # define CONFIG_SYS_BOOTCOUNT_LE
17 # define CONFIG_SYS_BOOTCOUNT_BE
21 #ifdef CONFIG_SYS_BOOTCOUNT_LE
22 static inline void raw_bootcount_store(volatile u32 *addr, u32 data)
27 static inline u32 raw_bootcount_load(volatile u32 *addr)
32 static inline void raw_bootcount_store(volatile u32 *addr, u32 data)
37 static inline u32 raw_bootcount_load(volatile u32 *addr)
42 #endif /* _BOOTCOUNT_H__ */