[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v6 07/21] sdhci: Fix 64-bit ADMA2
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-arm] [PATCH v6 07/21] sdhci: Fix 64-bit ADMA2 |
Date: |
Thu, 11 Jan 2018 17:56:12 -0300 |
From: Sai Pavan Boddu <address@hidden>
The 64-bit ADMA address is not converted to the cpu endianes correctly.
This patch fixes the issue and uses a valid mask for the attribute data.
Signed-off-by: Sai Pavan Boddu <address@hidden>
[AF: Re-write commit message]
Reviewed-by: Alistair Francis <address@hidden>
---
hw/sd/sdhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index f0a29711f7..ab4ffeca1d 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -617,8 +617,8 @@ static void get_adma_description(SDHCIState *s, ADMADescr
*dscr)
dscr->length = le16_to_cpu(dscr->length);
dma_memory_read(&s->dma_as, entry_addr + 4,
(uint8_t *)(&dscr->addr), 8);
- dscr->attr = le64_to_cpu(dscr->attr);
- dscr->attr &= 0xfffffff8;
+ dscr->addr = le64_to_cpu(dscr->addr);
+ dscr->attr &= (uint8_t) ~0xC0;
dscr->incr = 12;
break;
}
--
2.15.1
- [Qemu-arm] [PATCH v6 01/21] sdhci: add a 'spec_version property' (default to v2), (continued)
- [Qemu-arm] [PATCH v6 03/21] sdhci: add max-block-length capability (Spec v1), Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 04/21] sdhci: add clock capabilities (Spec v1), Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 05/21] sdhci: add DMA and 64-bit capabilities (Spec v2), Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 07/21] sdhci: Fix 64-bit ADMA2,
Philippe Mathieu-Daudé <=
- [Qemu-arm] [PATCH v6 08/21] sdhci: add v3 capabilities, Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 09/21] sdhci: rename the hostctl1 register, Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 10/21] hw/arm/exynos4210: implement SDHCI Spec v2, Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 11/21] hw/arm/xilinx_zynq: implement SDHCI Spec v2, Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 12/21] hw/arm/bcm2835_peripherals: implement SDHCI Spec v3, Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 13/21] hw/arm/bcm2835_peripherals: change maximum block size to 1kB, Philippe Mathieu-Daudé, 2018/01/11
- [Qemu-arm] [PATCH v6 14/21] hw/arm/fsl-imx6: implement SDHCI Spec v3, Philippe Mathieu-Daudé, 2018/01/11