All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Rename ssi_transfer to ssi_transfer8
@ 2026-08-25  4:04 stephensportia
  2026-08-25  4:04 ` [PATCH 1/4] hw/ssi: " stephensportia
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: stephensportia @ 2026-08-25  4:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Palmer Dabbelt, Peter Maydell, Jamin Lin, qemu-ppc,
	Cédric Le Goater, Steven Lee, Andrew Jeffery,
	Harsh Prateek Bora, Subbaraya Sundeep, Troy Lee,
	Edgar E. Iglesias, Philippe Mathieu-Daudé, Alistair Francis,
	Strahinja Jankovic, qemu-arm, Tyrone Ting, Nicholas Piggin,
	Aditya Gupta, Kane Chen, Francisco Iglesias, Joel Stanley, Hao Wu,
	Glenn Miles, qemu-riscv, Jean-Christophe Dubois, Portia Stephens

From: Portia Stephens <portias@oss.tenstorrent.com>

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



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2026-09-01  8:57 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25  4:04 [PATCH 0/4] Rename ssi_transfer to ssi_transfer8 stephensportia
2026-08-25  4:04 ` [PATCH 1/4] hw/ssi: " stephensportia
2026-08-27  5:25   ` Alistair
2026-08-25  4:04 ` [PATCH 2/4] hw/ssi/pl022: Fix dropped upper bytes of ssi transfer stephensportia
2026-08-27  5:27   ` Alistair
2026-08-25  4:04 ` [PATCH 3/4] hw/arm/strongarm: Fix dropped upper byte " stephensportia
2026-08-27  5:29   ` Alistair
2026-08-27  9:09   ` Peter Maydell
2026-08-27 10:53     ` Portia Stephens
2026-08-27 11:04       ` Peter Maydell
2026-08-25  4:04 ` [PATCH 4/4] hw/ssi/pnv_spi: Fix dropped upper bytes " stephensportia
2026-08-27  5:31   ` Alistair
2026-08-27  5:37 ` [PATCH 0/4] Rename ssi_transfer to ssi_transfer8 Alistair
2026-08-27  9:20   ` Peter Maydell
2026-08-27 11:06     ` Alistair
2026-08-27 10:31   ` Philippe Mathieu-Daudé
2026-08-27  9:19 ` Peter Maydell
2026-08-27 10:35   ` Philippe Mathieu-Daudé
2026-08-27 10:37   ` Portia Stephens
2026-08-27 10:53     ` Peter Maydell
2026-08-27 11:03       ` Alistair
2026-08-27 11:17         ` Peter Maydell
2026-08-28  0:07           ` Alistair
2026-08-31 13:00             ` Cédric Le Goater
2026-09-01  8:56               ` Bin Meng
2026-08-27 12:52       ` Portia Stephens

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.