Merge remote-tracking branches 'asoc/topic/wm8962', 'asoc/topic/wm8974' and 'asoc...
[deliverable/linux.git] / include / linux / io-64-nonatomic-hi-lo.h
1 #ifndef _LINUX_IO_64_NONATOMIC_HI_LO_H_
2 #define _LINUX_IO_64_NONATOMIC_HI_LO_H_
3
4 #include <linux/io.h>
5 #include <asm-generic/int-ll64.h>
6
7 static inline __u64 hi_lo_readq(const volatile void __iomem *addr)
8 {
9 const volatile u32 __iomem *p = addr;
10 u32 low, high;
11
12 high = readl(p + 1);
13 low = readl(p);
14
15 return low + ((u64)high << 32);
16 }
17
18 static inline void hi_lo_writeq(__u64 val, volatile void __iomem *addr)
19 {
20 writel(val >> 32, addr + 4);
21 writel(val, addr);
22 }
23
24 #ifndef readq
25 #define readq hi_lo_readq
26 #endif
27
28 #ifndef writeq
29 #define writeq hi_lo_writeq
30 #endif
31
32 #endif /* _LINUX_IO_64_NONATOMIC_HI_LO_H_ */
This page took 0.032927 seconds and 6 git commands to generate.