Re: [PATCH v42 29/98] hw/sd/sdcard: Introduce sd_cmd_to_receivingdata / sd_generic_write_byte

2024-06-28 Thread Cédric Le Goater
On 6/28/24 9:01 AM, Philippe Mathieu-Daudé wrote: All commands switching from TRANSFER state to (receiving)DATA do the same: receive stream of data from the DAT lines. Instead of duplicating the same code many times, introduce 2 helpers: - sd_cmd_to_receivingdata() on the I/O line setup the data

[PATCH v42 29/98] hw/sd/sdcard: Introduce sd_cmd_to_receivingdata / sd_generic_write_byte

2024-06-28 Thread Philippe Mathieu-Daudé
All commands switching from TRANSFER state to (receiving)DATA do the same: receive stream of data from the DAT lines. Instead of duplicating the same code many times, introduce 2 helpers: - sd_cmd_to_receivingdata() on the I/O line setup the data to be received on the data[] buffer, - sd_generic_