mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
To: Felix Gu <ustc.gu@gmail.com>, Mark Brown <broonie@kernel.org>,
	geert <geert@linux-m68k.org>
Cc: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] spi: rzv2h-rspi: Fix SPDR read access width for 16-bit RX
Date: Wed, 10 Jun 2026 12:52:58 +0000	[thread overview]
Message-ID: <TYCPR01MB1209351E71DA2E97A07665A1FC21A2@TYCPR01MB12093.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20260610-rzv2h-rspi-v2-1-40c80b4a2c90@gmail.com>

> 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>


  parent reply	other threads:[~2026-06-10 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 12:08 Felix Gu
2026-06-10 12:36 ` Geert Uytterhoeven
2026-06-10 12:52 ` Fabrizio Castro [this message]
2026-06-10 15:39 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TYCPR01MB1209351E71DA2E97A07665A1FC21A2@TYCPR01MB12093.jpnprd01.prod.outlook.com \
    --to=fabrizio.castro.jz@renesas.com \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=ustc.gu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®