[PATCH 0/4] Rename ssi_transfer to ssi_transfer8
| Newsgroups | org.nongnu.qemu-riscv,org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
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(-) -- 2.43.0