[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/13] hw/sd/sdhci: Set SDHC_NIS_DMA bit when appropriate
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 01/13] hw/sd/sdhci: Set SDHC_NIS_DMA bit when appropriate |
Date: |
Sat, 11 Jan 2025 19:36:59 +0100 |
In U-Boot, the fsl_esdhc[_imx] driver waits for both "transmit completed" and
"DMA" bits in esdhc_send_cmd_common() by means of DATA_COMPLETE constant. QEMU
currently misses to set the DMA bit which causes the driver to loop forever. Fix
that by setting the DMA bit if enabled when doing DMA block transfers.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/sd/sdhci.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 299cd4bc1b..a958c11497 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -665,12 +665,13 @@ static void sdhci_sdma_transfer_multi_blocks(SDHCIState
*s)
}
}
+ if (s->norintstsen & SDHC_NISEN_DMA) {
+ s->norintsts |= SDHC_NIS_DMA;
+ }
+
if (s->blkcnt == 0) {
sdhci_end_transfer(s);
} else {
- if (s->norintstsen & SDHC_NISEN_DMA) {
- s->norintsts |= SDHC_NIS_DMA;
- }
sdhci_update_irq(s);
}
}
@@ -691,6 +692,10 @@ static void sdhci_sdma_transfer_single_block(SDHCIState *s)
}
s->blkcnt--;
+ if (s->norintstsen & SDHC_NISEN_DMA) {
+ s->norintsts |= SDHC_NIS_DMA;
+ }
+
sdhci_end_transfer(s);
}
--
2.48.0
- [PATCH v2 00/13] i.MX and SDHCI improvements, Bernhard Beschow, 2025/01/11
- [PATCH v2 02/13] hw/char/imx_serial: Fix reset value of UFCR register, Bernhard Beschow, 2025/01/11
- [PATCH v2 01/13] hw/sd/sdhci: Set SDHC_NIS_DMA bit when appropriate,
Bernhard Beschow <=
- [PATCH v2 03/13] hw/char/imx_serial: Update all state before restarting ageing timer, Bernhard Beschow, 2025/01/11
- [PATCH v2 04/13] hw/pci-host/designware: Expose MSI IRQ, Bernhard Beschow, 2025/01/11
- [PATCH v2 06/13] hw/sd/sd: Remove legacy sd_set_cb() in favor of GPIOs, Bernhard Beschow, 2025/01/11
- [PATCH v2 05/13] hw/gpio/imx_gpio: Don't clear input GPIO values upon reset, Bernhard Beschow, 2025/01/11
- [PATCH v2 07/13] hw/sd/sd: Allow for inverting polarities of presence and write-protect GPIOs, Bernhard Beschow, 2025/01/11
- [PATCH v2 08/13] hw/char/imx_serial: Turn some DPRINTF() statements into trace events, Bernhard Beschow, 2025/01/11
- [PATCH v2 09/13] hw/timer/imx_gpt: Remove unused define, Bernhard Beschow, 2025/01/11
- [PATCH v2 10/13] tests/qtest/libqos: Reuse TYPE_IMX_I2C define, Bernhard Beschow, 2025/01/11
- [PATCH v2 11/13] hw/i2c/imx_i2c: Convert DPRINTF() to trace events, Bernhard Beschow, 2025/01/11
- [PATCH v2 12/13] hw/misc/imx6_src: Convert DPRINTF() to trace events, Bernhard Beschow, 2025/01/11