Signed-off-by: Krzysztof Hałasa <khc@xxxxxxxxx> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 3f0f5a2..8480acf 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -35,8 +35,8 @@ #endif #define readb __raw_readb -#define readw(addr) __le16_to_cpu(__raw_readw(addr)) -#define readl(addr) __le32_to_cpu(__raw_readl(addr)) +#define readw(addr) __cpu_to_le16(__raw_readw(addr)) +#define readl(addr) __cpu_to_le32(__raw_readl(addr)) #ifndef __raw_writeb #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v)) @@ -59,7 +59,7 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) { return *(const volatile u64 __force *) addr; } -#define readq(addr) __le64_to_cpu(__raw_readq(addr)) +#define readq(addr) __cpu_to_le64(__raw_readq(addr)) static inline void __raw_writeq(u64 b, volatile void __iomem *addr) { _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox