diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-03 13:24:25 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-03 13:24:25 -0500 |
| commit | 0ded1fe5f36765b97b15a7afebb6d04ddcc4771c (patch) | |
| tree | 5bed5d3f9ac15091b101cbc8223d548490eabbcb /hw/sd/sd.c | |
| parent | 8b779b368b3b45d5ed3160173499eeafee4d567c (diff) | |
| parent | 95669e69848eda87861e1ec3016562101542f543 (diff) | |
| download | focaccia-qemu-0ded1fe5f36765b97b15a7afebb6d04ddcc4771c.tar.gz focaccia-qemu-0ded1fe5f36765b97b15a7afebb6d04ddcc4771c.zip | |
Merge remote-tracking branch 'pmaydell/arm-devs.next' into staging
# By Peter Crosthwaite (20) and others # Via Peter Maydell * pmaydell/arm-devs.next: (24 commits) i.MX: Improve EPIT timer code. exynos4210.c: register rom_mem for memory migration hw/arm/exynos4210.c: convert chipid_and_omr to an mmio region i.MX: split GPT and EPIT timer implementation sd/sd.c: Fix "inquiry" ACMD41 sd/sdhci:ADMA: fix interrupt sd/sdhci.c: Fix bdata_read DPRINT message sd/sdhci: Fix Buffer Write Ready interrupt sd/sdhci.c: Only reset data_count on new commands xilinx_spips: lqspi: Fix byte/misaligned access xilinx_spips: lqspi: Push more data to tx-fifo xilinx_spips: Multiple debug verbosity levels xilinx_spips: Debug msgs for Snoop state xilinx_spips: Fix striping behaviour xilinx_spips: Fix CTRL register RW bits xilinx_spips: lqspi: Dont touch config register xilinx_spips: Implement automatic CS xilinx_spips: Add automatic start support xilinx_spips: Trash LQ page cache on mode change xilinx_spips: Fix QSPI FIFO size ... Message-id: 1370277021-26129-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sd/sd.c')
| -rw-r--r-- | hw/sd/sd.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 2e0ef3e5aa..346d86f69c 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -43,6 +43,8 @@ do { fprintf(stderr, "SD: " fmt , ## __VA_ARGS__); } while (0) #define DPRINTF(fmt, ...) do {} while(0) #endif +#define ACMD41_ENQUIRY_MASK 0x00ffffff + typedef enum { sd_r0 = 0, /* no response */ sd_r1, /* normal response command */ @@ -1277,9 +1279,14 @@ static sd_rsp_type_t sd_app_command(SDState *sd, } switch (sd->state) { case sd_idle_state: - /* We accept any voltage. 10000 V is nothing. */ - if (req.arg) + /* We accept any voltage. 10000 V is nothing. + * + * We don't model init delay so just advance straight to ready state + * unless it's an enquiry ACMD41 (bits 23:0 == 0). + */ + if (req.arg & ACMD41_ENQUIRY_MASK) { sd->state = sd_ready_state; + } return sd_r3; |