diff options
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r-- | drivers/dma/dw_dmac.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index f413e123405a..318a342fc7ec 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -901,8 +901,11 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan) | |||
901 | BUG_ON(!dws->dma_dev || dws->dma_dev != dw->dma.dev); | 901 | BUG_ON(!dws->dma_dev || dws->dma_dev != dw->dma.dev); |
902 | 902 | ||
903 | cfghi = dws->cfg_hi; | 903 | cfghi = dws->cfg_hi; |
904 | cfglo = dws->cfg_lo; | 904 | cfglo = dws->cfg_lo & ~DWC_CFGL_CH_PRIOR_MASK; |
905 | } | 905 | } |
906 | |||
907 | cfglo |= DWC_CFGL_CH_PRIOR(dwc->priority); | ||
908 | |||
906 | channel_writel(dwc, CFG_LO, cfglo); | 909 | channel_writel(dwc, CFG_LO, cfglo); |
907 | channel_writel(dwc, CFG_HI, cfghi); | 910 | channel_writel(dwc, CFG_HI, cfghi); |
908 | 911 | ||
@@ -1325,6 +1328,12 @@ static int __init dw_probe(struct platform_device *pdev) | |||
1325 | else | 1328 | else |
1326 | list_add(&dwc->chan.device_node, &dw->dma.channels); | 1329 | list_add(&dwc->chan.device_node, &dw->dma.channels); |
1327 | 1330 | ||
1331 | /* 7 is highest priority & 0 is lowest. */ | ||
1332 | if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING) | ||
1333 | dwc->priority = 7 - i; | ||
1334 | else | ||
1335 | dwc->priority = i; | ||
1336 | |||
1328 | dwc->ch_regs = &__dw_regs(dw)->CHAN[i]; | 1337 | dwc->ch_regs = &__dw_regs(dw)->CHAN[i]; |
1329 | spin_lock_init(&dwc->lock); | 1338 | spin_lock_init(&dwc->lock); |
1330 | dwc->mask = 1 << i; | 1339 | dwc->mask = 1 << i; |