aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch
blob: c6e4331aa95569e4587556fd567321a48e525a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -167,6 +167,8 @@ static void dwc_initialize_chan_dw(struc
 	cfghi |= DWC_CFGH_DST_PER(dwc->dws.dst_id);
 	cfghi |= DWC_CFGH_SRC_PER(dwc->dws.src_id);
 
+	cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */
+
 	/* Set polarity of handshake interface */
 	cfglo |= hs_polarity ? DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL : 0;
 
@@ -1293,11 +1295,8 @@ int dw_dma_probe(struct dw_dma_chip *chi
 		else
 			list_add(&dwc->chan.device_node, &dw->dma.channels);
 
-		/* 7 is highest priority & 0 is lowest. */
-		if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
-			dwc->priority = pdata->nr_channels - i - 1;
-		else
-			dwc->priority = i;
+		/* set all channels to the same priority */
+		dwc->priority = pdata->nr_channels - 1;
 
 		dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
 		spin_lock_init(&dwc->lock);