summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/iomap.c
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2016-05-19 18:11:10 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-05-31 16:41:52 +0800
commitd54fc90cc9723d73eef25d09efcef412a6c89d60 (patch)
tree21d20f4d3014fc5151d8883e18999e437d99f333 /arch/powerpc/kernel/iomap.c
parent2a41bfbc0393e6f2db419b80a7000708d90c2eeb (diff)
downloadlinux-next-d54fc90cc9723d73eef25d09efcef412a6c89d60.tar.gz
powerpc: add io{read,write}64 accessors
This will allow device drivers to consistently use io{read,write}XX also for 64-bit accesses. Acked-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/powerpc/kernel/iomap.c')
-rw-r--r--arch/powerpc/kernel/iomap.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index 12e48d56f771..3963f0b68d52 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -38,6 +38,18 @@ EXPORT_SYMBOL(ioread16);
EXPORT_SYMBOL(ioread16be);
EXPORT_SYMBOL(ioread32);
EXPORT_SYMBOL(ioread32be);
+#ifdef __powerpc64__
+u64 ioread64(void __iomem *addr)
+{
+ return readq(addr);
+}
+u64 ioread64be(void __iomem *addr)
+{
+ return readq_be(addr);
+}
+EXPORT_SYMBOL(ioread64);
+EXPORT_SYMBOL(ioread64be);
+#endif /* __powerpc64__ */
void iowrite8(u8 val, void __iomem *addr)
{
@@ -64,6 +76,18 @@ EXPORT_SYMBOL(iowrite16);
EXPORT_SYMBOL(iowrite16be);
EXPORT_SYMBOL(iowrite32);
EXPORT_SYMBOL(iowrite32be);
+#ifdef __powerpc64__
+void iowrite64(u64 val, void __iomem *addr)
+{
+ writeq(val, addr);
+}
+void iowrite64be(u64 val, void __iomem *addr)
+{
+ writeq_be(val, addr);
+}
+EXPORT_SYMBOL(iowrite64);
+EXPORT_SYMBOL(iowrite64be);
+#endif /* __powerpc64__ */
/*
* These are the "repeat read/write" functions. Note the