From 30ee17b3bc453cfc8bebd704e40b6a24c83da854 Mon Sep 17 00:00:00 2001 From: SrikanthT Date: Sun, 9 Sep 2012 22:54:11 +0530 Subject: [PATCH] Xilinx: ARM: DMA: Support for External Frame Sync feature. There is a new feature in VDMA IP v5.02a, which needs support from the driver. This patch has been created to configure this external frame sync feature. Signed-off-by: SrikanthT --- drivers/dma/xilinx_dma.c | 4 ++++ include/linux/amba/xilinx_dma.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/dma/xilinx_dma.c b/drivers/dma/xilinx_dma.c index a6a073de7fb..55651e4919c 100644 --- a/drivers/dma/xilinx_dma.c +++ b/drivers/dma/xilinx_dma.c @@ -90,6 +90,7 @@ #define XILINX_VDMA_FRMCNT_EN 0x00000010 /* Frm Cnt enable mode */ #define XILINX_VDMA_MSTR_MASK 0x00000F00 /* Master in control */ +#define XILINX_VDMA_EXTFSYNC_SHIFT 6 #define XILINX_VDMA_MSTR_SHIFT 8 #define XILINX_VDMA_WR_REF_SHIFT 8 @@ -1537,6 +1538,9 @@ static int xilinx_vdma_device_control(struct dma_chan *dchan, chan->config.disable_intr = cfg->disable_intr; + if (cfg->ext_fsync) + reg |= cfg->ext_fsync << XILINX_VDMA_EXTFSYNC_SHIFT; + DMA_OUT(&chan->regs->cr, reg); return 0; } else diff --git a/include/linux/amba/xilinx_dma.h b/include/linux/amba/xilinx_dma.h index 6985a08c458..d54be52ec71 100644 --- a/include/linux/amba/xilinx_dma.h +++ b/include/linux/amba/xilinx_dma.h @@ -67,6 +67,7 @@ struct xilinx_dma_config { int delay; /* Delay counter */ int disable_intr; /* Whether use interrupts */ int reset; /* Reset Channel */ + int ext_fsync; /* External Frame Sync */ }; /* Platform data definition until ARM supports device tree */ -- 2.11.4.GIT