crypto: atmel-sha - remove unnecessary static in atmel_sha_remove()
[linux-stable.git] / include / linux / io-64-nonatomic-lo-hi.h
blob084461a4e5abce9823518ba57221c4881d89c8ae
1 #ifndef _LINUX_IO_64_NONATOMIC_LO_HI_H_
2 #define _LINUX_IO_64_NONATOMIC_LO_HI_H_
4 #include <linux/io.h>
5 #include <asm-generic/int-ll64.h>
7 static inline __u64 lo_hi_readq(const volatile void __iomem *addr)
9 const volatile u32 __iomem *p = addr;
10 u32 low, high;
12 low = readl(p);
13 high = readl(p + 1);
15 return low + ((u64)high << 32);
18 static inline void lo_hi_writeq(__u64 val, volatile void __iomem *addr)
20 writel(val, addr);
21 writel(val >> 32, addr + 4);
24 static inline __u64 lo_hi_readq_relaxed(const volatile void __iomem *addr)
26 const volatile u32 __iomem *p = addr;
27 u32 low, high;
29 low = readl_relaxed(p);
30 high = readl_relaxed(p + 1);
32 return low + ((u64)high << 32);
35 static inline void lo_hi_writeq_relaxed(__u64 val, volatile void __iomem *addr)
37 writel_relaxed(val, addr);
38 writel_relaxed(val >> 32, addr + 4);
41 #ifndef readq
42 #define readq lo_hi_readq
43 #endif
45 #ifndef writeq
46 #define writeq lo_hi_writeq
47 #endif
49 #ifndef readq_relaxed
50 #define readq_relaxed lo_hi_readq_relaxed
51 #endif
53 #ifndef writeq_relaxed
54 #define writeq_relaxed lo_hi_writeq_relaxed
55 #endif
57 #endif /* _LINUX_IO_64_NONATOMIC_LO_HI_H_ */