mbox series

[0/7] hw/sd/sd: Introduce sd_cmd_to_receivingdata() / sd_generic_write_byte()

Message ID 20240625073441.34203-1-philmd@linaro.org
Headers show
Series hw/sd/sd: Introduce sd_cmd_to_receivingdata() / sd_generic_write_byte() | expand

Message

Philippe Mathieu-Daudé June 25, 2024, 7:34 a.m. UTC
Consolitate writing bytes on the DAT lines by introducing
a pair of helpers to reuse in all commands receiving data.

Based-on: <20240625061015.24095-1-philmd@linaro.org>

Philippe Mathieu-Daudé (7):
  hw/sd/sdcard: Introduce sd_cmd_to_receivingdata /
    sd_generic_write_byte
  hw/sd/sdcard: Duplicate WRITE_SINGLE_BLOCK / WRITE_MULTIPLE_BLOCK
    cases
  hw/sd/sdcard: Convert WRITE_SINGLE_BLOCK to generic_write_byte (CMD24)
  hw/sd/sdcard: Convert PROGRAM_CID to generic_write_byte (CMD26)
  hw/sd/sdcard: Convert PROGRAM_CSD to generic_write_byte (CMD27)
  hw/sd/sdcard: Convert LOCK_UNLOCK to generic_write_byte (CMD42)
  hw/sd/sdcard: Convert GEN_CMD to generic_write_byte (CMD56)

 hw/sd/sd.c | 108 ++++++++++++++++++++++++++++++-----------------------
 1 file changed, 61 insertions(+), 47 deletions(-)