]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
vdmatest: xilinx: Zero out the configuration fields before configuring VDMA
authorSrikanth Thokala <srikanth.thokala@xilinx.com>
Wed, 27 Nov 2013 14:26:23 +0000 (19:56 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 29 Nov 2013 09:21:17 +0000 (10:21 +0100)
The existing VDMA test client is failing to work with latest VDMA driver,
as some of the configuration fields of configuration structure are non-zero
and hence VDMA engine is not configured properly.  So this patch fixes
the issue.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/dma/xilinx/vdmatest.c

index d5be0da86cdaf69c0d9c852aee82a8d8ef1a72b5..9376ab3b65c4c5c564435f87c62244bb6cf52ac1 100644 (file)
@@ -292,19 +292,16 @@ static int vdmatest_slave_func(void *data)
                        sg_dma_len(&rx_sg[i]) = len;
                }
 
+               /* Zero out configuration */
+               memset(&config, 0, sizeof(struct xilinx_vdma_config));
+
                /* Set up hardware configuration information */
                config.vsize = vsize;
                config.hsize = hsize;
                config.stride = hsize;
                config.frm_cnt_en = 1;
                config.coalesc = frm_cnt * 10;
-               config.delay = 0;
-               /* The following is do-not-care, need to set to 0 */
-               config.frm_dly = 0;
                config.park = 1;
-               config.gen_lock = 0;
-               config.master = 0;
-               config.park_frm = 0;
                tx_dev->device_control(tx_chan, DMA_SLAVE_CONFIG,
                                        (unsigned long)&config);