302-dw-dma-hprot-fix-and-equal-priortiy.patch 830 B

12345678910111213141516171819202122232425
  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. + cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */
  7. +
  8. channel_writel(dwc, CFG_LO, cfglo);
  9. channel_writel(dwc, CFG_HI, cfghi);
  10. @@ -1539,11 +1541,8 @@ int dw_dma_probe(struct dw_dma_chip *chi
  11. else
  12. list_add(&dwc->chan.device_node, &dw->dma.channels);
  13. - /* 7 is highest priority & 0 is lowest. */
  14. - if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
  15. - dwc->priority = pdata->nr_channels - i - 1;
  16. - else
  17. - dwc->priority = i;
  18. + /* set all channels to the same priority */
  19. + dwc->priority = pdata->nr_channels - 1;
  20. dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
  21. spin_lock_init(&dwc->lock);