Patchwork dmaengine: fsldma: Add 64-bit I/O accessors for powerpc64

mail settings
Submitter Scott Wood
Date Dec. 22, 2018, 4:34 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/689035/
State New
Headers show


Scott Wood - Dec. 22, 2018, 4:34 a.m.
Otherwise 64-bit PPC builds fail with undefined references
to these accessors.

Cc: Peng Ma <>
Cc: Wen He <>
Fixes: 68997fff94afa (" dmaengine: fsldma: Adding macro FSL_DMA_IN/OUT implement for ARM platform")
Signed-off-by: Scott Wood <>
Is there any reason why ioreadXXbe() etc can't be used on PPC as well?

 drivers/dma/fsldma.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h
index 88db939c04a1..a9b12f82b5c3 100644
--- a/drivers/dma/fsldma.h
+++ b/drivers/dma/fsldma.h
@@ -202,7 +202,12 @@  struct fsldma_chan {
 #define fsl_iowrite32(v, p)	out_le32(p, v)
 #define fsl_iowrite32be(v, p)	out_be32(p, v)
-#ifndef __powerpc64__
+#ifdef __powerpc64__
+#define fsl_ioread64(p)		in_le64(p)
+#define fsl_ioread64be(p)	in_be64(p)
+#define fsl_iowrite64(v, p)	out_le64(p, v)
+#define fsl_iowrite64be(v, p)	out_be64(p, v)
 static u64 fsl_ioread64(const u64 __iomem *addr)
 	u32 fsl_addr = lower_32_bits(addr);