summary refs log tree commit diff
path: root/drivers/dma
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2018-01-31 13:51:16 +0530
committerVinod Koul <vinod.koul@intel.com>2018-01-31 13:51:16 +0530
commitdb90305b1ffebf57abd2c05e27c2a30a893fb397 (patch)
tree90c4e30d86f0e702120f5b703f2eb6e856df0bae /drivers/dma
parent21359a84a0e1467fcb2704ffbdb52c063e38630b (diff)
parentd087f15786021a9605b20f4c678312510be4cac1 (diff)
downloadlinux-db90305b1ffebf57abd2c05e27c2a30a893fb397.tar.gz
Merge branch 'topic/ti' into for-linus
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/ti-dma-crossbar.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
index 7df910e7c348..9272b173c746 100644
--- a/drivers/dma/ti-dma-crossbar.c
+++ b/drivers/dma/ti-dma-crossbar.c
@@ -54,7 +54,15 @@ struct ti_am335x_xbar_map {
 
 static inline void ti_am335x_xbar_write(void __iomem *iomem, int event, u8 val)
 {
-	writeb_relaxed(val, iomem + event);
+	/*
+	 * TPCC_EVT_MUX_60_63 register layout is different than the
+	 * rest, in the sense, that event 63 is mapped to lowest byte
+	 * and event 60 is mapped to highest, handle it separately.
+	 */
+	if (event >= 60 && event <= 63)
+		writeb_relaxed(val, iomem + (63 - event % 4));
+	else
+		writeb_relaxed(val, iomem + event);
 }
 
 static void ti_am335x_xbar_free(struct device *dev, void *route_data)