[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v5 29/31] sdhci: add a check_capab_sdma() qtest
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-arm] [PATCH v5 29/31] sdhci: add a check_capab_sdma() qtest |
Date: |
Mon, 8 Jan 2018 12:43:01 -0300 |
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
tests/sdhci-test.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/sdhci-test.c b/tests/sdhci-test.c
index 2aa3fa0d3b..91b1b29d75 100644
--- a/tests/sdhci-test.c
+++ b/tests/sdhci-test.c
@@ -12,6 +12,7 @@
#define SDHC_CAPAB 0x40
FIELD(SDHC_CAPAB, BASECLKFREQ, 8, 8); /* since v2 */
+FIELD(SDHC_CAPAB, SDMA, 22, 1);
#define SDHC_HCVER 0xFE
static const struct sdhci_t {
@@ -113,6 +114,15 @@ static void check_capab_baseclock(uintptr_t addr, uint8_t
expected_freq)
g_assert_cmpuint(capab_freq, ==, expected_freq);
}
+static void check_capab_sdma(uintptr_t addr, bool supported)
+{
+ uint64_t capab, capab_sdma;
+
+ capab = sdhci_readq(addr, SDHC_CAPAB);
+ capab_sdma = FIELD_EX64(capab, SDHC_CAPAB, SDMA);
+ g_assert_cmpuint(capab_sdma, ==, supported);
+}
+
static void test_machine(const void *data)
{
const struct sdhci_t *test = data;
@@ -122,6 +132,7 @@ static void test_machine(const void *data)
check_capab_capareg(test->sdhci.addr, test->sdhci.capab.reg);
check_specs_version(test->sdhci.addr, test->sdhci.version);
check_capab_readonly(test->sdhci.addr);
+ check_capab_sdma(test->sdhci.addr, test->sdhci.capab.sdma);
check_capab_baseclock(test->sdhci.addr, test->sdhci.baseclock);
qtest_quit(global_qtest);
--
2.15.1
- [Qemu-arm] [PATCH v5 20/31] sdhci: add the Freescale controller for i.MX, (continued)
- [Qemu-arm] [PATCH v5 20/31] sdhci: add the Freescale controller for i.MX, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 21/31] hw/arm/fsl-imx6: use the "fsl, imx6q-usdhc" controller, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 22/31] sdhci: add the generic Arasan SDHCI 8.9a PHY, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 23/31] hw/arm/xilinx_zynqmp: use the "arasan, sdhci-8.9a" device, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 24/31] sdhci: let the SYSBUS_SDHCI type be abstract, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 25/31] sdhci: check Spec v3 capabilities qtest, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 26/31] sdhci: remove the deprecated 'capareg' property, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 27/31] sdhci: add check_capab_readonly() qtest, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 28/31] sdhci: add a check_capab_baseclock() qtest, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 29/31] sdhci: add a check_capab_sdma() qtest,
Philippe Mathieu-Daudé <=
- [Qemu-arm] [PATCH v5 30/31] sdhci: add a check_capab_v3() qtest, Philippe Mathieu-Daudé, 2018/01/08
- [Qemu-arm] [PATCH v5 31/31] sdhci: add Spec v4.2 register definitions, Philippe Mathieu-Daudé, 2018/01/08