Skip to content

Rename ssi_transfer to ssi_transfer8

[email protected] qemu-arm qemu-devel qemu-riscv 1 version Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 21 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4hw/ssi: Rename ssi_transfer to ssi_transfer8hw/arm/strongarm.c hw/ssi/allwinner-a10-spi.c hw/ssi/aspeed_smc.c +15 more+61 -611 reply
2/4hw/ssi/pl022: Fix dropped upper bytes of ssi transferhw/ssi/pl022.c+8 -41 reply
3/4hw/arm/strongarm: Fix dropped upper byte of ssi transferhw/arm/strongarm.c+5 -24 replies
4/4hw/ssi/pnv_spi: Fix dropped upper bytes of ssi transferhw/ssi/pnv_spi.c+11 -171 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchAlistair Francis
1/4R-b
2/4R-b
3/4R-b
4/4R-b

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/4] Rename ssi_transfer to ssi_transfer8

From: Portia Stephens <[email protected]>

The ssi_transfer function comments say that it takes a word varying between 8-bits and 32-bits. ssi_transfer takes a 32-bit arg to transfer but there is no means to indicate the number of bits that should actually be transferred. All child classes of SSI_PERIPHERAL class have transfer functions that, despite accepting a 32-bit tx, only transfer a single byte; m25p80_transfer8(), ssi_sd_transfer(), ssd0323_transfer().

The current implementation depends on the SSI model to know what peripheral model will be attached and what transfer size it expects which is error prone. If a SSI_PERIPHERAL model was written that accepted 32-bit transfers, it could not attach to any existing SSI models.

This change updates the the naming of ssi_transfer to ssi_transfer8, as well as changes the return value and transmit argument to be 8-bit.

Most ssi models handle this correctly already, sending a single byte at a time. There are a few models that are written to support non 8-bit transfers but there are no in-tree use cases that connect a peripheral to the SSI device. These have been updated to use 8-bit transfers.

Portia Stephens (4):
hw/ssi: Rename ssi_transfer to ssi_transfer8 hw/ssi/pl022: Fix dropped upper bytes of ssi transfer hw/arm/strongarm: Fix dropped upper byte of ssi transfer hw/ssi/pnv_spi: Fix dropped upper bytes of ssi transfer

 hw/arm/strongarm.c         |  7 +++++--
 hw/ssi/allwinner-a10-spi.c |  2 +-
 hw/ssi/aspeed_smc.c        | 14 ++++++-------
 hw/ssi/bcm2835_spi.c       |  2 +-
 hw/ssi/ibex_spi_host.c     |  5 +++--
 hw/ssi/imx_spi.c           |  2 +-
 hw/ssi/mss-spi.c           |  2 +-
 hw/ssi/npcm7xx_fiu.c       | 42 +++++++++++++++++++-------------------
 hw/ssi/npcm_pspi.c         |  4 ++--
 hw/ssi/pl022.c             | 12 +++++++----
 hw/ssi/pnv_spi.c           | 28 ++++++++++---------------
 hw/ssi/sifive_spi.c        |  2 +-
 hw/ssi/ssi.c               |  4 ++--
 hw/ssi/stm32f2xx_spi.c     |  2 +-
 hw/ssi/xilinx_spi.c        | 10 ++++-----
 hw/ssi/xilinx_spips.c      |  4 ++--
 hw/ssi/xlnx-versal-ospi.c  |  4 ++--
 include/hw/ssi/ssi.h       | 17 ++++++++-------
 18 files changed, 82 insertions(+), 81 deletions(-)
Signature · 1 line
2.43.0