aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2012-02-01 05:42:25 -0500
committerVinod Koul <vinod.koul@linux.intel.com>2012-02-22 07:45:38 -0500
commit6bc711f6bd9dd393e1f9bbae354906affcd02aa5 (patch)
treee639502051771cf75899b42ce411581b1e1c0a33 /drivers/dma/dw_dmac.c
parentff7b05f29fd4db810021d905e2dad95ab4fe2984 (diff)
dmaengine/dw_dmac: Add 64 bit access width support for slave xfers on mem side
64 bit transfers are possible on both sides in slave transfers (memory as well as peripherals). This patch adds support for it memory side 64 bit transfers. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r--drivers/dma/dw_dmac.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 5d7b199208d9..9f4310f013f5 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -749,8 +749,14 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
749 749
750 mem = sg_phys(sg); 750 mem = sg_phys(sg);
751 len = sg_dma_len(sg); 751 len = sg_dma_len(sg);
752 mem_width = 2; 752
753 if (unlikely(mem & 3 || len & 3)) 753 if (!((mem | len) & 7))
754 mem_width = 3;
755 else if (!((mem | len) & 3))
756 mem_width = 2;
757 else if (!((mem | len) & 1))
758 mem_width = 1;
759 else
754 mem_width = 0; 760 mem_width = 0;
755 761
756slave_sg_todev_fill_desc: 762slave_sg_todev_fill_desc:
@@ -807,8 +813,14 @@ slave_sg_todev_fill_desc:
807 813
808 mem = sg_phys(sg); 814 mem = sg_phys(sg);
809 len = sg_dma_len(sg); 815 len = sg_dma_len(sg);
810 mem_width = 2; 816
811 if (unlikely(mem & 3 || len & 3)) 817 if (!((mem | len) & 7))
818 mem_width = 3;
819 else if (!((mem | len) & 3))
820 mem_width = 2;
821 else if (!((mem | len) & 1))
822 mem_width = 1;
823 else
812 mem_width = 0; 824 mem_width = 0;
813 825
814slave_sg_fromdev_fill_desc: 826slave_sg_fromdev_fill_desc: