Thread (13 messages) 13 messages, 5 authors, 2022-01-27

Re: [PATCH v6 1/2] spi: Add spi driver for Sunplus SP7021

From: Andy Shevchenko <hidden>
Date: 2022-01-20 09:52:11
Also in: linux-spi, lkml

On Thu, Jan 20, 2022 at 11:22 AM Lh Kuo 郭力豪 [off-list ref] wrote:

...
quoted
quoted
+       if (xfer->tx_buf)
+               dma_unmap_single(dev, xfer->tx_dma, xfer->len, DMA_TO_DEVICE);
+       if (xfer->rx_buf)
+               dma_unmap_single(dev, xfer->rx_dma, xfer->len,
+ DMA_FROM_DEVICE);
Why can't you use SPI core DMA mapping code?
I didn't find the SPI core DMA mapping code for single maping.
The method currently used is the general DMA single-map code usage method.
Why do you need single page mapping?
What's wrong with SG mapping that SPI core provides?

...
quoted
quoted
+       device_set_node(&ctlr->dev, pdev->dev.fwnode);
Use dev_fwnode() in the second argument.
You mean as below ?

device_set_node(&ctlr->dev, dev_fwnode(dev));
Yes.

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help