Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243269

Re: [PATCH v5 06/10] dmaengine: add API for getting dma controller's quirk

From Shawn Lin <shawn.lin@rock-chips.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 06/10] dmaengine: add API for getting dma controller's quirk
Date 2015-10-09 13:30 +0200
Message-ID <qhE26-Fi-25@gated-at.bofh.it> (permalink)
References <q8pbY-5O1-7@gated-at.bofh.it> <q8plE-5Zj-13@gated-at.bofh.it> <qgg1P-30J-13@gated-at.bofh.it> <qgwJl-21W-39@gated-at.bofh.it> <qgY2S-7BV-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2015/10/7 22:32, Vinod Koul wrote:
> On Tue, Oct 06, 2015 at 05:21:13PM +0800, Shawn Lin wrote:
>
>>>> +	int (*device_get_quirks)(struct dma_chan *chan);
>>>
>>> And why do we want to expose this to users? THis doesnt seem right!
>>>
>>
>> Basically I agree not to expose dma's quirk to slave controllers...But, the
>> fact I mentioned on cover letter explain the reasons why I have to let slave
>> controllers know that they are working with a broken dma. It's a dilemma
>> that if we don't want that to be exposed(let slave controllers' driver get
>> the info via a API), we have to add broken quirk for all of them ,here and
>> there, which seems to be a disaster:(
>>
>> I would appreciate it if you could give me some suggestions at your earliest
>> convenience. :)
>>
>>> A quirk may exists but should be handled inside the controller driver and do
>>> appropriate action. You don't tell users or expect them to handle these
>>>
> I laready gave one re-read the above lines.
>
> Anyway I went ahead and read the usage. You are setting the slave parameters
> for this. I can see two ways:
> 1. Have the quirk to driver and based on quirk reset the slave settings when
> they are set by client.
> 2. Put this in DT and set the dma properties based on these quirks and let
> driver and cleint be agnostic to it

+Mark Brown

Thanks for these.

The first one is hard for dma to distinguish "broken 
slave"(I2S/SPI/UART..) from the unbroken ones(block devices like 
mmc/SFC...). If all clients are broken for that, it's easy to reset the 
slave parameters in dma driver. Unfortunately, not always, at least for 
rockchips' Socs.

And before V4, I did pass quirks to clents from DT, but Mark thought we 
should avoid to get it from dt. Anyway, now I think about it again,

(1) dma drivers doesn't know the users who should use limited burst and 
who won't. That make it's impossible for dma drivers to handle it alone 
or expose new API of burst capabilities to clients.
(2) It's inappropriate to expose quirks to clients.

so the only way I can see is to make some tricks from DT.
I would prefer to add "burst limit" property for the broken slaves 
instead of quirks for them which I did before V4.

Something like:

&spi{
max-burst-len=<1>;
}

How about?
:)

>


-- 
Best Regards
Shawn Lin

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 06/10] dmaengine: add API for getting dma controller's  quirk Shawn Lin <shawn.lin@rock-chips.com> - 2015-10-06 11:30 +0200
  Re: [PATCH v5 06/10] dmaengine: add API for getting dma controller's  quirk Vinod Koul <vinod.koul@intel.com> - 2015-10-07 16:40 +0200
    Re: [PATCH v5 06/10] dmaengine: add API for getting dma controller's  quirk Shawn Lin <shawn.lin@rock-chips.com> - 2015-10-09 13:30 +0200
  Re: [alsa-devel] [PATCH v5 06/10] dmaengine: add API for getting  dma controller's quirk Lars-Peter Clausen <lars@metafoo.de> - 2015-10-08 10:40 +0200
    Re: [alsa-devel] [PATCH v5 06/10] dmaengine: add API for getting  dma controller's quirk Lars-Peter Clausen <lars@metafoo.de> - 2015-10-09 13:40 +0200
    Re: [alsa-devel] [PATCH v5 06/10] dmaengine: add API for getting dma  controller's quirk Shawn Lin <shawn.lin@rock-chips.com> - 2015-10-09 13:40 +0200
    Re: [alsa-devel] [PATCH v5 06/10] dmaengine: add API for getting dma  controller's quirk Vinod Koul <vinod.koul@intel.com> - 2015-10-14 13:00 +0200
      Re: [alsa-devel] [PATCH v5 06/10] dmaengine: add API for getting dma  controller's quirk Shawn Lin <shawn.lin@rock-chips.com> - 2015-10-14 16:40 +0200

csiph-web