mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: Zhangfei Gao <[email protected]> Signed-off-by: Jaehoon Chung <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
This commit is contained in:
parent
4e93b9a6ab
commit
4b24472483
1 changed files with 3 additions and 1 deletions
|
|
@ -589,9 +589,11 @@ 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 = cpu_to_le32(host->sg_dma +
|
||||
(sizeof(struct idmac_desc) * (i + 1)));
|
||||
p->des1 = 0;
|
||||
}
|
||||
|
||||
/* Set the last descriptor as the end-of-ring descriptor */
|
||||
p->des3 = cpu_to_le32(host->sg_dma);
|
||||
|
|
|
|||
Loading…
Reference in a new issue