diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2018-02-08 13:48:10 -0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-02-13 16:15:08 +0100 |
commit | da34692234a03b6ffabd0b5b7864b423ac8eca56 (patch) | |
tree | 71fcc9cb1d2e103fcb1fa0470f64f9f8d2ea3e68 /hw/sd/sdhci.c | |
parent | 0034ebe6ee3151e5c54fd13c6f441429bd2cdadf (diff) |
sdhci: implement CMD/DAT[] fields in the Present State register
[based on a patch from Alistair Francis <alistair.francis@xilinx.com>
from qemu/xilinx tag xilinx-v2015.2]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-Id: <20180208164818.7961-23-f4bug@amsat.org>
Diffstat (limited to 'hw/sd/sdhci.c')
-rw-r--r-- | hw/sd/sdhci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 5ca82cf301..1a6771be4e 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -1003,6 +1003,10 @@ static uint64_t sdhci_read(void *opaque, hwaddr offset, unsigned size) break; case SDHC_PRNSTS: ret = s->prnsts; + ret = FIELD_DP32(ret, SDHC_PRNSTS, DAT_LVL, + sdbus_get_dat_lines(&s->sdbus)); + ret = FIELD_DP32(ret, SDHC_PRNSTS, CMD_LVL, + sdbus_get_cmd_line(&s->sdbus)); break; case SDHC_HOSTCTL: ret = s->hostctl1 | (s->pwrcon << 8) | (s->blkgap << 16) | |