Some refactors, few bugfixes, better SD/SPI support.
With this series apply, machines can use cards in UHS-I mode.
(mostly imported from Alistair Francis work)
MMC mode split out for another series.
Since v2:
- split again in 2... other part is cleanup/tracing
Since v1:
- rewrote mostly all patches to keep it simpler.
$ git backport-diff
001/18:[0003] [FC] 'sdcard: Don't always set the high capacity bit'
002/18:[down] 'sdcard: update the CSD CRC register regardless the CSD structure version'
003/18:[down] 'sdcard: fix the 'maximum data transfer rate' to 25MHz'
004/18:[down] 'sdcard: clean the SCR register and add few comments'
005/18:[down] 'sdcard: remove commands from unsupported old MMC specification'
006/18:[down] 'sdcard: simplify using the ldst API'
007/18:[down] 'sdcard: use the correct masked OCR in the R3 reply'
008/18:[down] 'sdcard: use the registerfields API for the CARD_STATUS register masks'
009/18:[down] 'sdcard: handles more commands in SPI mode'
010/18:[down] 'sdcard: handle CMD54 (SDIO)'
011/18:[down] 'sdcard: check the card is in correct state for APP CMD (CMD55)'
012/18:[down] 'sdcard: warn if host uses an incorrect address for APP CMD (CMD55)'
013/18:[down] 'sdcard: simplify SEND_IF_COND (CMD8)'
014/18:[down] 'sdcard: simplify SD_SEND_OP_COND (ACMD41)'
015/18:[down] 'sdcard: add SD SEND_TUNING_BLOCK (CMD19)'
016/18:[down] 'sdcard: add a 'uhs' property, update the OCR register ACCEPT_SWITCH_1V8 bit'
017/18:[down] 'sdcard: implement the UHS-I SWITCH_FUNCTION entries (Spec v3)'
018/18:[0006] [FC] 'sdcard: add an enum for the SD PHY Spec version'
Based-on: 20180123032135.28863-13-f4bug@amsat.org
Philippe Mathieu-Daudé (18):
sdcard: Don't always set the high capacity bit
sdcard: update the CSD CRC register regardless the CSD structure version
sdcard: fix the 'maximum data transfer rate' to 25MHz
sdcard: clean the SCR register and add few comments
sdcard: remove commands from unsupported old MMC specification
sdcard: simplify using the ldst API
sdcard: use the correct masked OCR in the R3 reply
sdcard: use the registerfields API for the CARD_STATUS register masks
sdcard: handles more commands in SPI mode
sdcard: handle CMD54 (SDIO)
sdcard: check the card is in correct state for APP CMD (CMD55)
sdcard: warn if host uses an incorrect address for APP CMD (CMD55)
sdcard: simplify SEND_IF_COND (CMD8)
sdcard: simplify SD_SEND_OP_COND (ACMD41)
sdcard: add SD SEND_TUNING_BLOCK (CMD19)
sdcard: add a 'uhs' property, update the OCR register ACCEPT_SWITCH_1V8 bit
sdcard: implement the UHS-I SWITCH_FUNCTION entries (Spec v3)
sdcard: add an enum for the SD PHY Spec version
hw/sd/sd.c | 501 +++++++++++++++++++++++++++++++++++++----------------
hw/sd/trace-events | 1 +
2 files changed, 354 insertions(+), 148 deletions(-)
--
2.15.1