summaryrefslogtreecommitdiffstats
path: root/hw/sd/sdhci.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2018-02-08 17:48:18 +0100
committerPaolo Bonzini2018-02-13 16:15:09 +0100
commit1e23b63f022ae79d7a5c535fe549127ad52d5ba6 (patch)
tree16716c50209daf6f80e78d0e8f1290b864ccccd3 /hw/sd/sdhci.c
parentsdhci: add a check_capab_v3() qtest (diff)
downloadqemu-1e23b63f022ae79d7a5c535fe549127ad52d5ba6.tar.gz
qemu-1e23b63f022ae79d7a5c535fe549127ad52d5ba6.tar.xz
qemu-1e23b63f022ae79d7a5c535fe549127ad52d5ba6.zip
sdhci: add Spec v4.2 register definitions
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180208164818.7961-31-f4bug@amsat.org>
Diffstat (limited to 'hw/sd/sdhci.c')
-rw-r--r--hw/sd/sdhci.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 1a6771be4e..97b4a473c8 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -91,6 +91,20 @@ static void sdhci_check_capareg(SDHCIState *s, Error **errp)
bool y;
switch (s->sd_spec_version) {
+ case 4:
+ val = FIELD_EX64(s->capareg, SDHC_CAPAB, BUS64BIT_V4);
+ trace_sdhci_capareg("64-bit system bus (v4)", val);
+ msk = FIELD_DP64(msk, SDHC_CAPAB, BUS64BIT_V4, 0);
+
+ val = FIELD_EX64(s->capareg, SDHC_CAPAB, UHS_II);
+ trace_sdhci_capareg("UHS-II", val);
+ msk = FIELD_DP64(msk, SDHC_CAPAB, UHS_II, 0);
+
+ val = FIELD_EX64(s->capareg, SDHC_CAPAB, ADMA3);
+ trace_sdhci_capareg("ADMA3", val);
+ msk = FIELD_DP64(msk, SDHC_CAPAB, ADMA3, 0);
+
+ /* fallthrough */
case 3:
val = FIELD_EX64(s->capareg, SDHC_CAPAB, ASYNC_INT);
trace_sdhci_capareg("async interrupt", val);
@@ -145,7 +159,7 @@ static void sdhci_check_capareg(SDHCIState *s, Error **errp)
msk = FIELD_DP64(msk, SDHC_CAPAB, ADMA1, 0);
val = FIELD_EX64(s->capareg, SDHC_CAPAB, BUS64BIT);
- trace_sdhci_capareg("64-bit system bus", val);
+ trace_sdhci_capareg("64-bit system bus (v3)", val);
msk = FIELD_DP64(msk, SDHC_CAPAB, BUS64BIT, 0);
/* fallthrough */