summaryrefslogtreecommitdiff
path: root/include/asm-generic/io-64-nonatomic-hi-lo.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-02-28 16:42:14 +0400
committerArnd Bergmann <arnd@arndb.de>2012-02-28 16:42:21 +0400
commitfb0b82b32ce17564bc64cede50bf4a3204eecc60 (patch)
tree00b5e466074c6fb373d64c493b3341186024acc7 /include/asm-generic/io-64-nonatomic-hi-lo.h
parenta173fc693b25216c5c834978f4fafd731fd4ff94 (diff)
parent43de6a7dda6e9a7345e218e688f2092f991126f0 (diff)
downloadlinux-fb0b82b32ce17564bc64cede50bf4a3204eecc60.tar.xz
Merge branch 'board-specific' of git://github.com/hzhuang1/linux into next/boards
* 'board-specific' of git://github.com/hzhuang1/linux: (5 commits) ARM: pxa: add dummy clock for pxa25x and pxa27x ARM: mmp: append irq name of gpio device pxa/hx4700: Fix PXA_GPIO_IRQ_BASE/IRQ_NUM values pxa/hx4700: Add ASIC3 LED support pxa/hx4700: Correct StrataFlash block size discovery (update to v3.3-rc5)
Diffstat (limited to 'include/asm-generic/io-64-nonatomic-hi-lo.h')
-rw-r--r--include/asm-generic/io-64-nonatomic-hi-lo.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/asm-generic/io-64-nonatomic-hi-lo.h b/include/asm-generic/io-64-nonatomic-hi-lo.h
new file mode 100644
index 000000000000..a6806a94250d
--- /dev/null
+++ b/include/asm-generic/io-64-nonatomic-hi-lo.h
@@ -0,0 +1,28 @@
+#ifndef _ASM_IO_64_NONATOMIC_HI_LO_H_
+#define _ASM_IO_64_NONATOMIC_HI_LO_H_
+
+#include <linux/io.h>
+#include <asm-generic/int-ll64.h>
+
+#ifndef readq
+static inline __u64 readq(const volatile void __iomem *addr)
+{
+ const volatile u32 __iomem *p = addr;
+ u32 low, high;
+
+ high = readl(p + 1);
+ low = readl(p);
+
+ return low + ((u64)high << 32);
+}
+#endif
+
+#ifndef writeq
+static inline void writeq(__u64 val, volatile void __iomem *addr)
+{
+ writel(val >> 32, addr + 4);
+ writel(val, addr);
+}
+#endif
+
+#endif /* _ASM_IO_64_NONATOMIC_HI_LO_H_ */