diff options
Diffstat (limited to 'arch/unicore32/include/mach/dma.h')
-rw-r--r-- | arch/unicore32/include/mach/dma.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/unicore32/include/mach/dma.h b/arch/unicore32/include/mach/dma.h index 3e3224a1052..d655c1b6e08 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__ */ |