Patch "dmaengine: dw: properly read DWC_PARAMS register" has been added to the 3.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
dmaengine: dw: properly read DWC_PARAMS register
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dmaengine-dw-properly-read-dwc_params-register.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
6bea0f6d1c47b07be88dfd93f013ae05fcb3d8bfMon Sep 17 00:00:00 2001
From: Andy Shevchenko <[email protected]>
Date: Mon, 28 Sep 2015 18:57:03 +0300
Subject: dmaengine: dw: properly read DWC_PARAMS register
From: Andy Shevchenko <[email protected]>
commit 6bea0f6d1c47b07be88dfd93f013ae05fcb3d8bf upstream.
In case we have less than maximum allowed channels (8) and autoconfiguration is enabled the DWC_PARAMS read is wrong because it uses different arithmetic to what is needed for channel priority setup.
Re-do the caclulations properly. This now works on AVR32 board well.
--- drivers/dma/dw/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/dw/core.c +2 -2
@@ -1561,7 +1561,6 @@ int dw_dma_probe(struct dw_dma_chip *chiINIT_LIST_HEAD (&dw->dma.channels);for (i =0 ; i < nr_channels; i++) {struct dw_dma_chan *dwc = &dw->chan[i]; -int r = nr_channels - i -1 ; dwc->chan.device = &dw->dma;dma_cookie_init (&dwc->chan);
@@ -1573,7 +1572,7 @@ int dw_dma_probe(struct dw_dma_chip *chi/* 7 is highest priority & 0 is lowest. */ if (pdata->chan_priority ==CHAN_PRIORITY_ASCENDING ) - dwc->priority = r; + dwc->priority = nr_channels - i -1 ;else dwc->priority = i;
@@ -1593,6 +1592,7 @@ int dw_dma_probe(struct dw_dma_chip *chi/* Hardware configuration */ if (autocfg) {unsigned int dwc_params; +unsigned int r =DW_DMA_MAX_NR_CHANNELS - i -1 ;void __iomem *addr = chip->regs + r *sizeof (u32); dwc_params =dma_read_byaddr (addr,DWC_PARAMS );
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/dmaengine-dw-properly-read-dwc_params-register.patch