MLK-14498-10 dma: imx-sdma: fix wrong chn_real_count in cyclic mode
authorAndy Duan <fugang.duan@nxp.com>
Wed, 22 Mar 2017 02:31:04 +0000 (10:31 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:40 +0000 (15:21 -0500)
The sdmac->chn_real_count is equal to sdmac->period_len in dma cyclic
mode that is not correct, correct it to real count in current BD transfer.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
drivers/dma/imx-sdma.c

index 140c234..d8c8bad 100644 (file)
@@ -774,12 +774,6 @@ static void sdma_update_channel_loop(struct sdma_channel *sdmac)
                desc->buf_ptail = desc->buf_tail;
                desc->buf_tail = (desc->buf_tail + 1) % desc->num_bd;
 
-               if (sdmac->peripheral_type == IMX_DMATYPE_UART) {
-                       /* restore mode.count after counter readed */
-                       sdmac->chn_real_count = bd->mode.count;
-                       bd->mode.count = sdmac->chn_count;
-               }
-
                if (error)
                        sdmac->status = old_status;
                /*