diff options
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r-- | drivers/dma/dw_dmac.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 9794f00810f6..467599a4b9b6 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -191,6 +191,19 @@ static void dwc_initialize(struct dw_dma_chan *dwc) | |||
191 | 191 | ||
192 | /*----------------------------------------------------------------------*/ | 192 | /*----------------------------------------------------------------------*/ |
193 | 193 | ||
194 | static void dwc_dump_chan_regs(struct dw_dma_chan *dwc) | ||
195 | { | ||
196 | dev_err(chan2dev(&dwc->chan), | ||
197 | " SAR: 0x%x DAR: 0x%x LLP: 0x%x CTL: 0x%x:%08x\n", | ||
198 | channel_readl(dwc, SAR), | ||
199 | channel_readl(dwc, DAR), | ||
200 | channel_readl(dwc, LLP), | ||
201 | channel_readl(dwc, CTL_HI), | ||
202 | channel_readl(dwc, CTL_LO)); | ||
203 | } | ||
204 | |||
205 | /*----------------------------------------------------------------------*/ | ||
206 | |||
194 | /* Called with dwc->lock held and bh disabled */ | 207 | /* Called with dwc->lock held and bh disabled */ |
195 | static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first) | 208 | static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first) |
196 | { | 209 | { |
@@ -200,13 +213,7 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first) | |||
200 | if (dma_readl(dw, CH_EN) & dwc->mask) { | 213 | if (dma_readl(dw, CH_EN) & dwc->mask) { |
201 | dev_err(chan2dev(&dwc->chan), | 214 | dev_err(chan2dev(&dwc->chan), |
202 | "BUG: Attempted to start non-idle channel\n"); | 215 | "BUG: Attempted to start non-idle channel\n"); |
203 | dev_err(chan2dev(&dwc->chan), | 216 | dwc_dump_chan_regs(dwc); |
204 | " SAR: 0x%x DAR: 0x%x LLP: 0x%x CTL: 0x%x:%08x\n", | ||
205 | channel_readl(dwc, SAR), | ||
206 | channel_readl(dwc, DAR), | ||
207 | channel_readl(dwc, LLP), | ||
208 | channel_readl(dwc, CTL_HI), | ||
209 | channel_readl(dwc, CTL_LO)); | ||
210 | 217 | ||
211 | /* The tasklet will hopefully advance the queue... */ | 218 | /* The tasklet will hopefully advance the queue... */ |
212 | return; | 219 | return; |
@@ -490,13 +497,7 @@ static void dwc_handle_cyclic(struct dw_dma *dw, struct dw_dma_chan *dwc, | |||
490 | 497 | ||
491 | spin_lock_irqsave(&dwc->lock, flags); | 498 | spin_lock_irqsave(&dwc->lock, flags); |
492 | 499 | ||
493 | dev_err(chan2dev(&dwc->chan), | 500 | dwc_dump_chan_regs(dwc); |
494 | " SAR: 0x%x DAR: 0x%x LLP: 0x%x CTL: 0x%x:%08x\n", | ||
495 | channel_readl(dwc, SAR), | ||
496 | channel_readl(dwc, DAR), | ||
497 | channel_readl(dwc, LLP), | ||
498 | channel_readl(dwc, CTL_HI), | ||
499 | channel_readl(dwc, CTL_LO)); | ||
500 | 501 | ||
501 | channel_clear_bit(dw, CH_EN, dwc->mask); | 502 | channel_clear_bit(dw, CH_EN, dwc->mask); |
502 | while (dma_readl(dw, CH_EN) & dwc->mask) | 503 | while (dma_readl(dw, CH_EN) & dwc->mask) |
@@ -1131,13 +1132,7 @@ int dw_dma_cyclic_start(struct dma_chan *chan) | |||
1131 | if (dma_readl(dw, CH_EN) & dwc->mask) { | 1132 | if (dma_readl(dw, CH_EN) & dwc->mask) { |
1132 | dev_err(chan2dev(&dwc->chan), | 1133 | dev_err(chan2dev(&dwc->chan), |
1133 | "BUG: Attempted to start non-idle channel\n"); | 1134 | "BUG: Attempted to start non-idle channel\n"); |
1134 | dev_err(chan2dev(&dwc->chan), | 1135 | dwc_dump_chan_regs(dwc); |
1135 | " SAR: 0x%x DAR: 0x%x LLP: 0x%x CTL: 0x%x:%08x\n", | ||
1136 | channel_readl(dwc, SAR), | ||
1137 | channel_readl(dwc, DAR), | ||
1138 | channel_readl(dwc, LLP), | ||
1139 | channel_readl(dwc, CTL_HI), | ||
1140 | channel_readl(dwc, CTL_LO)); | ||
1141 | spin_unlock_irqrestore(&dwc->lock, flags); | 1136 | spin_unlock_irqrestore(&dwc->lock, flags); |
1142 | return -EBUSY; | 1137 | return -EBUSY; |
1143 | } | 1138 | } |