* [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX
@ 2026-06-10 12:08 Felix Gu
2026-06-10 12:36 ` Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Felix Gu @ 2026-06-10 12:08 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Geert Uytterhoeven
Cc: linux-spi, linux-renesas-soc, linux-kernel, Felix Gu
The RZ/V2H hardware manual (section 7.5.2.2.1) specifies that read access
size for the SPI Data Register (SPDR) are fixed at 32 bits. The
RZV2H_RSPI_RX macro for the 16-bit data path used readw(), violating
this requirement.
Switch to readl() for the 16-bit RX path to conform to the hardware
specification.
Fixes: 8b61c8919dff ("spi: Add driver for the RZ/V2H(P) RSPI IP")
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Changes in v2:
- Fix comments from Geert.
- Link to v1: https://patch.msgid.link/20260605-rzv2h-rspi-v1-1-c1d5ed562249@gmail.com
To: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/spi/spi-rzv2h-rspi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index 1655efda7d20..6ed3fad873b8 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -135,8 +135,9 @@ static inline void rzv2h_rspi_rx_##type(struct rzv2h_rspi_priv *rspi, \
RZV2H_RSPI_TX(writel, u32)
RZV2H_RSPI_TX(writew, u16)
RZV2H_RSPI_TX(writeb, u8)
+/* The read access size for RSPI_SPDR is fixed at 32 bits */
RZV2H_RSPI_RX(readl, u32)
-RZV2H_RSPI_RX(readw, u16)
+RZV2H_RSPI_RX(readl, u16)
RZV2H_RSPI_RX(readl, u8)
static void rzv2h_rspi_reg_rmw(const struct rzv2h_rspi_priv *rspi,
---
base-commit: a225caacc36546a09586e3ece36c0313146e7da9
change-id: 20260605-rzv2h-rspi-3c8dd168fb72
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX
2026-06-10 12:08 [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX Felix Gu
@ 2026-06-10 12:36 ` Geert Uytterhoeven
2026-06-10 12:52 ` Fabrizio Castro
2026-06-10 15:39 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-06-10 12:36 UTC (permalink / raw)
To: Felix Gu
Cc: Fabrizio Castro, Mark Brown, linux-spi, linux-renesas-soc, linux-kernel
On Wed, 10 Jun 2026 at 14:08, Felix Gu <ustc.gu@gmail.com> wrote:
> The RZ/V2H hardware manual (section 7.5.2.2.1) specifies that read access
> size for the SPI Data Register (SPDR) are fixed at 32 bits. The
is fixed
> RZV2H_RSPI_RX macro for the 16-bit data path used readw(), violating
> this requirement.
>
> Switch to readl() for the 16-bit RX path to conform to the hardware
> specification.
>
> Fixes: 8b61c8919dff ("spi: Add driver for the RZ/V2H(P) RSPI IP")
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
> Changes in v2:
> - Fix comments from Geert.
> - Link to v1: https://patch.msgid.link/20260605-rzv2h-rspi-v1-1-c1d5ed562249@gmail.com
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX
2026-06-10 12:08 [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX Felix Gu
2026-06-10 12:36 ` Geert Uytterhoeven
@ 2026-06-10 12:52 ` Fabrizio Castro
2026-06-10 15:39 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Fabrizio Castro @ 2026-06-10 12:52 UTC (permalink / raw)
To: Felix Gu, Mark Brown, geert; +Cc: linux-spi, linux-renesas-soc, linux-kernel
> From: Felix Gu <ustc.gu@gmail.com>
> Sent: 10 June 2026 13:08
> To: Fabrizio Castro <fabrizio.castro.jz@renesas.com>; Mark Brown <broonie@kernel.org>; geert
> <geert@linux-m68k.org>
> Cc: linux-spi@vger.kernel.org; linux-renesas-soc@vger.kernel.org; linux-kernel@vger.kernel.org; Felix
> Gu <ustc.gu@gmail.com>
> Subject: [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX
>
> The RZ/V2H hardware manual (section 7.5.2.2.1) specifies that read access
> size for the SPI Data Register (SPDR) are fixed at 32 bits. The
> RZV2H_RSPI_RX macro for the 16-bit data path used readw(), violating
> this requirement.
>
> Switch to readl() for the 16-bit RX path to conform to the hardware
> specification.
>
> Fixes: 8b61c8919dff ("spi: Add driver for the RZ/V2H(P) RSPI IP")
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> ---
> Changes in v2:
> - Fix comments from Geert.
> - Link to v1: https://patch.msgid.link/20260605-rzv2h-rspi-v1-1-c1d5ed562249@gmail.com
>
> To: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> To: Mark Brown <broonie@kernel.org>
> Cc: linux-spi@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/spi/spi-rzv2h-rspi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
> index 1655efda7d20..6ed3fad873b8 100644
> --- a/drivers/spi/spi-rzv2h-rspi.c
> +++ b/drivers/spi/spi-rzv2h-rspi.c
> @@ -135,8 +135,9 @@ static inline void rzv2h_rspi_rx_##type(struct rzv2h_rspi_priv *rspi, \
> RZV2H_RSPI_TX(writel, u32)
> RZV2H_RSPI_TX(writew, u16)
> RZV2H_RSPI_TX(writeb, u8)
> +/* The read access size for RSPI_SPDR is fixed at 32 bits */
> RZV2H_RSPI_RX(readl, u32)
> -RZV2H_RSPI_RX(readw, u16)
> +RZV2H_RSPI_RX(readl, u16)
> RZV2H_RSPI_RX(readl, u8)
>
> static void rzv2h_rspi_reg_rmw(const struct rzv2h_rspi_priv *rspi,
>
> ---
> base-commit: a225caacc36546a09586e3ece36c0313146e7da9
> change-id: 20260605-rzv2h-rspi-3c8dd168fb72
>
> Best regards,
> --
> Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX
2026-06-10 12:08 [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX Felix Gu
2026-06-10 12:36 ` Geert Uytterhoeven
2026-06-10 12:52 ` Fabrizio Castro
@ 2026-06-10 15:39 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2026-06-10 15:39 UTC (permalink / raw)
To: Fabrizio Castro, Geert Uytterhoeven, Felix Gu
Cc: linux-spi, linux-renesas-soc, linux-kernel
On Wed, 10 Jun 2026 20:08:17 +0800, Felix Gu wrote:
> spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.1
Thanks!
[1/1] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX
https://git.kernel.org/broonie/sound/c/310628484ef0
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-11 9:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 12:08 [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX Felix Gu
2026-06-10 12:36 ` Geert Uytterhoeven
2026-06-10 12:52 ` Fabrizio Castro
2026-06-10 15:39 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®