[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/16] sdcard: Correct CRC16 offset in sd_function_sw
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 15/16] sdcard: Correct CRC16 offset in sd_function_switch() |
Date: |
Tue, 15 May 2018 15:07:06 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Per the Physical Layer Simplified Spec. "4.3.10.4 Switch Function Status":
The block length is predefined to 512 bits
and "4.10.2 SD Status":
The SD Status contains status bits that are related to the SD Memory Card
proprietary features and may be used for future application-specific usage.
The size of the SD Status is one data block of 512 bit. The content of this
register is transmitted to the Host over the DAT bus along with a 16-bit CRC.
Thus the 16-bit CRC goes at offset 64.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
hw/sd/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 235e0518d6..7af19fa06c 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -787,7 +787,7 @@ static void sd_function_switch(SDState *sd, uint32_t arg)
sd->data[14 + (i >> 1)] = new_func << ((i * 4) & 4);
}
memset(&sd->data[17], 0, 47);
- stw_be_p(sd->data + 65, sd_crc16(sd->data, 64));
+ stw_be_p(sd->data + 64, sd_crc16(sd->data, 64));
}
static inline bool sd_wp_addr(SDState *sd, uint64_t addr)
--
2.17.0
- [Qemu-devel] [PULL 12/16] target/arm: Implement FCSEL for fp16, (continued)
- [Qemu-devel] [PULL 12/16] target/arm: Implement FCSEL for fp16, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 01/16] fpu/softfloat: int_to_float ensure r fully initialised, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 11/16] target/arm: Implement FCMP for fp16, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 10/16] target/arm: Implement FP data-processing (3 source) for fp16, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 08/16] target/arm: Introduce and use read_fp_hreg, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 09/16] target/arm: Implement FP data-processing (2 source) for fp16, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 02/16] fpu/softfloat: Don't set Invalid for float-to-int(MAXINT), Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 05/16] target/arm: Early exit after unallocated_encoding in disas_fp_int_conv, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 13/16] target/arm: Implement FMOV (immediate) for fp16, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 16/16] tcg: Optionally log FPU state in TCG -d cpu logging, Peter Maydell, 2018/05/15
- [Qemu-devel] [PULL 15/16] sdcard: Correct CRC16 offset in sd_function_switch(),
Peter Maydell <=
- [Qemu-devel] [PULL 14/16] target/arm: Fix sqrt_f16 exception raising, Peter Maydell, 2018/05/15
- Re: [Qemu-devel] [PULL 00/16] target-arm queue, Peter Maydell, 2018/05/15