Re: [PATCH v2 SPI for-next 3/3] spi: mchp-pci1xxxx: DMA Write Support for copying data from SPI Buf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 06, 2024 at 09:11:18AM +0530, Thangaraj Samynathan wrote:

>  	if (regval & SPI_INTR) {
> -		rx_buf = p->rx_buf;
> -		memcpy_fromio(rx_buf + p->bytes_recvd, p->parent->reg_base +
> -				      SPI_MST_RSP_BUF_OFFSET(p->hw_inst), p->tx_sgl_len);
> -		p->bytes_recvd += p->tx_sgl_len;

Oh, so this is actually bidirectional - please merge this into the
previous patch, as noted on the prior patch there are issues with doing
unidirectional DMA.

As a general thing since this is a driver for the SPI controller it
would be *much* easier to tie the terms "read" and "write" to the SPI
bus read and write.  It's pretty hard to follow what's going on as
things stand since it is not clear if a given bit of code is talking
about the SPI controller or the DMA controller, and if when talking
about DMA it's talking about DMA to/from the device or to/from memory.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux