apm821xx: fix sata access freezes
[openwrt/openwrt.git] / target / linux / apm821xx / patches-4.4 / 302-dw-dma-hprot-fix-and-equal-priortiy.patch
1 --- a/drivers/dma/dw/core.c
2 +++ b/drivers/dma/dw/core.c
3 @@ -150,6 +150,8 @@ static void dwc_initialize(struct dw_dma
4 cfghi |= DWC_CFGH_DST_PER(dwc->dst_id);
5 cfghi |= DWC_CFGH_SRC_PER(dwc->src_id);
6
7 + cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */
8 +
9 channel_writel(dwc, CFG_LO, cfglo);
10 channel_writel(dwc, CFG_HI, cfghi);
11
12 @@ -1539,11 +1541,8 @@ int dw_dma_probe(struct dw_dma_chip *chi
13 else
14 list_add(&dwc->chan.device_node, &dw->dma.channels);
15
16 - /* 7 is highest priority & 0 is lowest. */
17 - if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
18 - dwc->priority = pdata->nr_channels - i - 1;
19 - else
20 - dwc->priority = i;
21 + /* set all channels to the same priority */
22 + dwc->priority = pdata->nr_channels - 1;
23
24 dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
25 spin_lock_init(&dwc->lock);