[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 26/31] sdcard: Update the Configuration Register (SCR
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 26/31] sdcard: Update the Configuration Register (SCR) to Spec Version 1.10 |
Date: |
Fri, 8 Jun 2018 13:45:12 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
The initial implementation is based on the Specs v1.10 (see a1bb27b1e98).
However the SCR is anouncing the card being v1.01.
The new chapters added in version 1.10 are:
4.3.10 Switch function command
Switch function command (CMD6) 1 is used to switch or expand
memory card functions. [...]
This is a new feature, introduced in SD physical Layer
Specification Version 1.10. Therefore, cards that are
compatible with earlier versions of the spec do not support
it. The host shall check the "SD_SPEC" field in the SCR
register to recognize what version of the spec the card
complies with before using CMD6. It is mandatory for SD
memory card of Ver1.10 to support CMD6.
4.3.11 High-Speed mode (25MB/sec interface speed)
Though the Rev 1.01 SD memory card supports up to 12.5MB/sec
interface speed, the speed of 25MB/sec is necessary to support
increasing performance needs of the host and because of memory
size which continues to grow.
To achieve 25MB/sec interface speed, clock rate is increased to
50MHz and CLK/CMD/DAT signal timing and circuit conditions are
reconsidered and changed from Physical Layer Specification
Version 1.01.
4.3.12 Command system (This chapter is newly added in version 1.10)
SD commands CMD34-37, CMD50, CMD57 are reserved for SD command
system expansion via the switch command.
[These commands] will be considered as illegal commands (as
defined in revision 1.01 of the SD physical layer specification).
The SWITCH_FUNCTION is implemented since the first commit, a1bb27b1e98.
The 25MB/sec High-Speed mode was already updated in d7ecb867529.
The current implementation does not implements CMD34-37, CMD50 and
CMD57, thus these commands already return ILLEGAL.
With this patch, the SCR register now matches the description of the header:
* SD Memory Card emulation as defined in the "SD Memory Card Physical
* layer specification, Version 1.10."
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 7af19fa06ca..e1218d1fb6b 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -310,8 +310,8 @@ static void sd_ocr_powerup(void *opaque)
static void sd_set_scr(SDState *sd)
{
- sd->scr[0] = (0 << 4) /* SCR version 1.0 */
- | 0; /* Spec Versions 1.0 and 1.01 */
+ sd->scr[0] = (0 << 4) /* SCR structure version 1.0 */
+ | 1; /* Spec Version 1.10 */
sd->scr[1] = (2 << 4) /* SDSC Card (Security Version 1.01) */
| 0b0101; /* 1-bit or 4-bit width bus modes */
sd->scr[2] = 0x00; /* Extended Security is not supported. */
--
2.17.1
- [Qemu-devel] [PULL 14/31] hw/i2c: Add trace events, (continued)
- [Qemu-devel] [PULL 14/31] hw/i2c: Add trace events, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 16/31] hw/digic: Add trailing '\n' to qemu_log() calls, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 02/31] aspeed: remove ignore_memory_transaction_failures on all boards, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 07/31] misc: add pca9552 LED blinker model, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 17/31] xilinx-dp: Add trailing '\n' to qemu_log() call, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 15/31] hw/sd/milkymist-memcard: Add trailing '\n' to qemu_log() call, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 01/31] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 20/31] hw/mips/boston: Add trailing '\n' to qemu_log() calls, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 21/31] stellaris: Add trailing '\n' to qemu_log() calls, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 24/31] RISC-V: Add trailing '\n' to qemu_log() calls, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 26/31] sdcard: Update the Configuration Register (SCR) to Spec Version 1.10,
Peter Maydell <=
- [Qemu-devel] [PULL 29/31] sdcard: Disable SEND_IF_COND (CMD8) for Spec v1, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 30/31] sdcard: Reflect when the Spec v3 is supported in the Config Register (SCR), Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 19/31] hw/core/register: Add trailing '\n' to qemu_log() call, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 27/31] sdcard: Allow commands valid in SPI mode, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 23/31] target/m68k: Add trailing '\n' to qemu_log() call, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 31/31] sdcard: Disable CMD19/CMD23 for Spec v2, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 22/31] target/arm: Add trailing '\n' to qemu_log() calls, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 25/31] target/xtensa: Add trailing '\n' to qemu_log() calls, Peter Maydell, 2018/06/08
- [Qemu-devel] [PULL 28/31] sdcard: Add a 'spec_version' property, default to Spec v2.00, Peter Maydell, 2018/06/08
- Re: [Qemu-devel] [PULL 00/31] target-arm queue, Peter Maydell, 2018/06/11