[PATCH v3 2/3] i3c: master: cdns: Use i3c_writel_fifo() and i3c_readl_fifo()

Wolfram Sang wsa+renesas at sang-engineering.com
Wed Jun 25 00:26:16 PDT 2025


>  static void cdns_i3c_master_wr_to_tx_fifo(struct cdns_i3c_master *master,
>  					  const u8 *bytes, int nbytes)
>  {
> -	writesl(master->regs + TX_FIFO, bytes, nbytes / 4);
> -	if (nbytes & 3) {
> -		u32 tmp = 0;
> -
> -		memcpy(&tmp, bytes + (nbytes & ~3), nbytes & 3);
> -		writesl(master->regs + TX_FIFO, &tmp, 1);
> -	}
> +	i3c_writel_fifo(master->regs + TX_FIFO, bytes, nbytes);
>  }

What about getting rid of the surrounding function and use the helper
directly?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-i3c/attachments/20250625/6870acf6/attachment-0001.sig>


More information about the linux-i3c mailing list