From 3c8fa1c0b79270a02920ee80a58572722109845f Mon Sep 17 00:00:00 2001 From: Zhangfei Gao Date: Mon, 25 May 2015 10:46:54 +0800 Subject: [PATCH] mmc: dw_mmc: init desc in dw_mci_idmac_init 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 Signed-off-by: Zhangfei Gao Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson Signed-off-by: Shawn Lin --- drivers/mmc/host/rk_sdmmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index 45889f60b401..3a78760a01d8 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -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; -- 2.34.1