summary refs log tree commit diff stats
path: root/hw/sd/sd.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-02-22 15:12:53 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-22 15:12:53 +0000
commitd7ecb8675298fefdaea35f6d7a558e91ec0b4138 (patch)
tree19088bda5789f461aabea722198f93fef8180fee /hw/sd/sd.c
parente8feec808e96163dd82754521383a203b8fe7bce (diff)
downloadfocaccia-qemu-d7ecb8675298fefdaea35f6d7a558e91ec0b4138.tar.gz
focaccia-qemu-d7ecb8675298fefdaea35f6d7a558e91ec0b4138.zip
sdcard: fix the 'maximum data transfer rate' to 25MHz
To comply with Spec v1.10 (and 2.00, 3.01):

. TRAN_SPEED

for current SD Memory Cards that field must be always 0_0110_010b (032h) which is
equal to 25MHz - the mandatory maximum operating frequency of SD Memory Card.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-4-f4bug@amsat.org
[PMM: fixed comment indent]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/sd/sd.c')
-rw-r--r--hw/sd/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 110f2f1d0a..3526269dbe 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -357,7 +357,7 @@ static void sd_set_csd(SDState *sd, uint64_t size)
         sd->csd[0] = 0x00;	/* CSD structure */
         sd->csd[1] = 0x26;	/* Data read access-time-1 */
         sd->csd[2] = 0x00;	/* Data read access-time-2 */
-        sd->csd[3] = 0x5a;	/* Max. data transfer rate */
+        sd->csd[3] = 0x32;      /* Max. data transfer rate: 25 MHz */
         sd->csd[4] = 0x5f;	/* Card Command Classes */
         sd->csd[5] = 0x50 |	/* Max. read data block length */
             HWBLOCK_SHIFT;