diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2011-03-04 04:28:32 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-03-06 14:42:28 -0500 |
commit | 29782da5f0206335e2325508ba4fee0d624ddab6 (patch) | |
tree | e9398004d1647b7082b86dcc392999de69e8e16b /drivers | |
parent | 1c5b0538c719f52cface39f699fb5d39a50149d6 (diff) |
dmaengine/dw_dmac fix: use readl & writel instead of __raw_readl & __raw_writel
On ARMv7 cores, device memory mapped as Normal Non-cacheable, may not guarantee
ordered access causing failures in device drivers that do not use the mandatory
memory barriers. readl & writel versions contain necessary memory barriers for
this.
commit 79f64dbf68c8a9779a7e9a25e0a9f0217a25b57a: "ARM: 6273/1: Add barriers to
the I/O accessors if ARM_DMA_MEM_BUFFERABLE" can be referred for more
information on this.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/dw_dmac_regs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h index 9a32964bf795..720f821527f8 100644 --- a/drivers/dma/dw_dmac_regs.h +++ b/drivers/dma/dw_dmac_regs.h | |||
@@ -159,9 +159,9 @@ __dwc_regs(struct dw_dma_chan *dwc) | |||
159 | } | 159 | } |
160 | 160 | ||
161 | #define channel_readl(dwc, name) \ | 161 | #define channel_readl(dwc, name) \ |
162 | __raw_readl(&(__dwc_regs(dwc)->name)) | 162 | readl(&(__dwc_regs(dwc)->name)) |
163 | #define channel_writel(dwc, name, val) \ | 163 | #define channel_writel(dwc, name, val) \ |
164 | __raw_writel((val), &(__dwc_regs(dwc)->name)) | 164 | writel((val), &(__dwc_regs(dwc)->name)) |
165 | 165 | ||
166 | static inline struct dw_dma_chan *to_dw_dma_chan(struct dma_chan *chan) | 166 | static inline struct dw_dma_chan *to_dw_dma_chan(struct dma_chan *chan) |
167 | { | 167 | { |
@@ -185,9 +185,9 @@ static inline struct dw_dma_regs __iomem *__dw_regs(struct dw_dma *dw) | |||
185 | } | 185 | } |
186 | 186 | ||
187 | #define dma_readl(dw, name) \ | 187 | #define dma_readl(dw, name) \ |
188 | __raw_readl(&(__dw_regs(dw)->name)) | 188 | readl(&(__dw_regs(dw)->name)) |
189 | #define dma_writel(dw, name, val) \ | 189 | #define dma_writel(dw, name, val) \ |
190 | __raw_writel((val), &(__dw_regs(dw)->name)) | 190 | writel((val), &(__dw_regs(dw)->name)) |
191 | 191 | ||
192 | #define channel_set_bit(dw, reg, mask) \ | 192 | #define channel_set_bit(dw, reg, mask) \ |
193 | dma_writel(dw, reg, ((mask) << 8) | (mask)) | 193 | dma_writel(dw, reg, ((mask) << 8) | (mask)) |