mmc: dw_mmc: init desc in dw_mci_idmac_init
authorZhangfei Gao <zhangfei.gao@linaro.org>
Mon, 25 May 2015 02:46:54 +0000 (10:46 +0800)
committerShawn Lin <shawn.lin@rock-chips.com>
Mon, 25 May 2015 02:50:03 +0000 (10:50 +0800)
Set 0 to des1 in 32bit case.
Otherwise the random value of des1 will be used in
dw_mci_translate_sglist: IDMAC_SET_BUFFER1_SIZE(desc, length)

Signed-off-by: Fei Wang <w.f@huawei.com>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
drivers/mmc/host/rk_sdmmc.c

index 45889f60b401935bff9d7ebd9451f830177925b9..3a78760a01d88a04ec7502244c8acc1e59d1399b 100755 (executable)
@@ -593,9 +593,10 @@ static int dw_mci_idmac_init(struct dw_mci *host)
        host->ring_size = PAGE_SIZE / sizeof(struct idmac_desc);
 
        /* Forward link the descriptor list */
-       for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++)
+       for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++) {
                p->des3 = host->sg_dma + (sizeof(struct idmac_desc) * (i + 1));
-
+               p->des1 = 0;
+       }
        /* Set the last descriptor as the end-of-ring descriptor */
        p->des3 = host->sg_dma;
        p->des0 = IDMAC_DES0_ER;