qemu-patch-raspberry4/hw/sd
Philippe Mathieu-Daudé 9e1245795f sdcard: Update the Configuration Register (SCR) to Spec Version 1.10
The initial implementation is based on the Specs v1.10 (see a1bb27b1e9).

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, a1bb27b1e9.

The 25MB/sec High-Speed mode was already updated in d7ecb86752.

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é <f4bug@amsat.org>
Message-id: 20180607180641.874-2-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
..
bcm2835_sdhost.c hw/sd/bcm2835_sdhost: Don't raise spurious interrupts 2018-04-10 13:02:25 +01:00
core.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
Makefile.objs sdcard: Display command name when tracing CMD/ACMD 2018-03-09 17:09:44 +00:00
milkymist-memcard.c hw/sd/milkymist-memcard: Add trailing '\n' to qemu_log() call 2018-06-08 13:15:33 +01:00
omap_mmc.c hw/sd/omap_mmc: Reset SD card on controller reset 2018-01-16 13:28:13 +00:00
pl181.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
pxa2xx_mmci.c hw/sd/pxa2xx_mmci: add read/write() trace events 2018-01-11 13:25:39 +00:00
sd.c sdcard: Update the Configuration Register (SCR) to Spec Version 1.10 2018-06-08 13:15:33 +01:00
sdhci-internal.h sdhci: add Spec v4.2 register definitions 2018-02-13 16:15:09 +01:00
sdhci.c hw: Do not include "sysemu/blockdev.h" if it is not necessary 2018-06-01 14:15:10 +02:00
sdmmc-internal.c sdcard: Display command name when tracing CMD/ACMD 2018-03-09 17:09:44 +00:00
sdmmc-internal.h sdcard: Display command name when tracing CMD/ACMD 2018-03-09 17:09:44 +00:00
ssi-sd.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
trace-events hw/sd/bcm2835_sdhost: Add tracepoints 2018-04-10 13:02:25 +01:00