Skip to content

hw/sd: Use sdbus_read_data/sdbus_write_data for multiple bytes access

Philippe Mathieu-Daudé qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7hw/sd: Rename read/write_data() as read/write_byte()hw/sd/core.c hw/sd/omap_mmc.c hw/sd/sd.c +2 more+33 -180 replies
2/7hw/sd: Rename sdbus_write_data() as sdbus_write_byte()hw/sd/allwinner-sdhost.c hw/sd/bcm2835_sdhost.c hw/sd/core.c +5 more+25 -180 replies
3/7hw/sd: Rename sdbus_read_data() as sdbus_read_byte()hw/sd/allwinner-sdhost.c hw/sd/bcm2835_sdhost.c hw/sd/core.c +6 more+27 -190 replies
4/7hw/sd: Add sdbus_write_data() to write multiples bytes on the data linehw/sd/core.c include/hw/sd/sd.h+24 -00 replies
5/7hw/sd: Use sdbus_write_data() instead of sdbus_write_byte when possiblehw/sd/allwinner-sdhost.c hw/sd/milkymist-memcard.c hw/sd/sdhci.c+12 -270 replies
6/7hw/sd: Add sdbus_read_data() to read multiples bytes on the data linehw/sd/core.c include/hw/sd/sd.h+24 -00 replies
7/7hw/sd: Use sdbus_read_data() instead of sdbus_read_byte() when possiblehw/sd/allwinner-sdhost.c hw/sd/milkymist-memcard.c hw/sd/sdhci.c+13 -320 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard Henderson
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] hw/sd: Use sdbus_read_data/sdbus_write_data for multiple bytes access

Introduce sdbus_read_data() and sdbus_write_data() methods to access multiple bytes on the data line of a SD bus.

I haven't named then sdbus_access_block() because I expect a block to be a power of 2, while there is no such restriction on the SD bus (think of SPI).

We can also simplify the bcm2835_sdhost and pl181 models, but it is simpler to first let them use the Fifo32 API.

Based-on: <[email protected]> "hw/sd: convert legacy SDHCI devices to the SDBus API"
https://www.mail-archive.com/[email protected]/msg720136.html

Philippe Mathieu-Daudé (7):
hw/sd: Rename read/write_data() as read/write_byte() hw/sd: Rename sdbus_write_data() as sdbus_write_byte() hw/sd: Rename sdbus_read_data() as sdbus_read_byte() hw/sd: Add sdbus_write_data() to write multiples bytes on the data
line
hw/sd: Use sdbus_write_data() instead of sdbus_write_byte when
possible
hw/sd: Add sdbus_read_data() to read multiples bytes on the data line hw/sd: Use sdbus_read_data() instead of sdbus_read_byte() when
possible

 include/hw/sd/sd.h            | 56 ++++++++++++++++++++++++++++++++---
 include/hw/sd/sdcard_legacy.h |  4 +--
 hw/sd/allwinner-sdhost.c      | 24 +++++----------
 hw/sd/bcm2835_sdhost.c        |  4 +--
 hw/sd/core.c                  | 38 +++++++++++++++++++++---
 hw/sd/milkymist-memcard.c     | 14 ++++-----
 hw/sd/omap_mmc.c              |  8 ++---
 hw/sd/pl181.c                 |  4 +--
 hw/sd/pxa2xx_mmci.c           |  4 +--
 hw/sd/sd.c                    | 16 +++++-----
 hw/sd/sdhci.c                 | 46 ++++++++--------------------
 hw/sd/ssi-sd.c                |  2 +-
 12 files changed, 132 insertions(+), 88 deletions(-)
Signature · 1 line
2.21.3