summaryrefslogtreecommitdiffstats
path: root/arch/unicore32/include/mach
diff options
context:
space:
mode:
Diffstat (limited to 'arch/unicore32/include/mach')
-rw-r--r--arch/unicore32/include/mach/dma.h11
-rw-r--r--arch/unicore32/include/mach/hardware.h8
2 files changed, 10 insertions, 9 deletions
diff --git a/arch/unicore32/include/mach/dma.h b/arch/unicore32/include/mach/dma.h
index 3e3224a10525..d655c1b6e083 100644
--- a/arch/unicore32/include/mach/dma.h
+++ b/arch/unicore32/include/mach/dma.h
@@ -35,7 +35,14 @@ extern int puv3_request_dma(char *name,
extern void puv3_free_dma(int dma_ch);
-#define puv3_stop_dma(ch) (DMAC_CONFIG(ch) &= ~DMAC_CONFIG_EN)
-#define puv3_resume_dma(ch) (DMAC_CONFIG(ch) |= DMAC_CONFIG_EN)
+static inline void puv3_stop_dma(int ch)
+{
+ writel(readl(DMAC_CONFIG(ch)) & ~DMAC_CONFIG_EN, DMAC_CONFIG(ch));
+}
+
+static inline void puv3_resume_dma(int ch)
+{
+ writel(readl(DMAC_CONFIG(ch)) | DMAC_CONFIG_EN, DMAC_CONFIG(ch));
+}
#endif /* __MACH_PUV3_DMA_H__ */
diff --git a/arch/unicore32/include/mach/hardware.h b/arch/unicore32/include/mach/hardware.h
index c7d3dd6b4eff..b71405ab6de6 100644
--- a/arch/unicore32/include/mach/hardware.h
+++ b/arch/unicore32/include/mach/hardware.h
@@ -22,13 +22,7 @@
#ifndef __ASSEMBLY__
-# define __REG(x) (*((volatile unsigned long *)io_p2v(x)))
-# define __PREG(x) (io_v2p((unsigned long)&(x)))
-
-#else
-
-# define __REG(x) io_p2v(x)
-# define __PREG(x) io_v2p(x)
+# define __REG(x) (void __iomem *)io_p2v(x)
#endif