Re: [PATCH 1/3] spi: s3c64xx: support spi polling mode using devicetree

From: Jaewon Kim
Date: Tue Apr 04 2023 - 08:25:46 EST


Hello Mark,


On 23. 4. 4. 20:41, Mark Brown wrote:
> On Tue, Apr 04, 2023 at 08:17:13PM +0900, Jaewon Kim wrote:
>> On 23. 4. 4. 19:54, Mark Brown wrote:
>>> On Tue, Apr 04, 2023 at 03:00:09PM +0900, Jaewon Kim wrote:
>>>> This patch adds new 'samsung,spi-polling' property to support polling mode.
>>>> In some environments, polling mode is required even if DMA is supported.
>>>> Changed it to support not only with quick but also optinally with
>>>> devicetree.
>>> Why would this be required if we can use DMA? If this is a performance
>>> optimisation for small messages the driver should just work out when to
>>> choose PIO over DMA like other drivers do. It is hard to see this as a
>>> hardware property which should be configured via DT.
>> We are providing a VM environment in which several Guest OSs are running.
>> If Host OS has DMA, GuestOS should use SPI as polling mode.
> This sounds like some sort of virtualised environment with passthrough?
> If that's the case then the host OS will be in control of the device
> tree provided to the guest so it simply shouldn't be describing the DMA
> configuration if it doesn't want the guest to use DMA for some reason.
> There's no value in describing the DMA the guest shouldn't use then
> providing an additional property telling the guest not to pay attention
> to the DMA when we could simply not do the first step.


Is it correct in your opinion to change to polling mode if there is no
DMA describing in DeviceTree?

Currently, if there is no DMA, the probe failed in s3c64xx driver.
So I added the "samsung,spi-polling" property not to check DMA.

If your opinion is to switch to Polling mode if there is no DMA, I will
fix it in the next version.


Thanks

Jaewon Kim