[PATCH v2] dmaengine: sirf: enable generic dt binding for dma channels

Barry Song 21cnbao at gmail.com
Mon Jan 6 05:56:17 EST 2014


2014/1/6 Lars-Peter Clausen <lars at metafoo.de>:
> On 01/06/2014 08:12 AM, Barry Song wrote:
>> From: Barry Song <Baohua.Song at csr.com>
>>
>> move to support of_dma_request_slave_channel() and dma_request_slave_channel.
>> we add a xlate() to let dma clients be able to find right dma_chan by generic
>> "dmas" properties in dts.
>>
>> Cc: Lars-Peter Clausen <lars at metafoo.de>
>> Signed-off-by: Barry Song <Baohua.Song at csr.com>
>
> Looks good to me, but ...
>
> [...]
>> @@ -81,6 +82,7 @@ struct sirfsoc_dma_regs {
>>
>>  struct sirfsoc_dma {
>>       struct dma_device               dma;
>> +     dma_cap_mask_t                  cap;
>
> ... the cap field seems to be unused, ...

>>  static int sirfsoc_dma_probe(struct platform_device *op)
>>  {
>>       struct device_node *dn = op->dev.of_node;
>> @@ -744,11 +758,21 @@ static int sirfsoc_dma_probe(struct platform_device *op)
>>       if (ret)
>>               goto free_irq;
>>
>> +     /* Device-tree DMA controller registration */
>> +     ret = of_dma_controller_register(dn, of_dma_sirfsoc_xlate, sdma);
>> +     if (ret) {
>> +             sdma->cap = dma->cap_mask;
>
> ... it is initialized here, but never used again.
>

real. thanks!

-barry



More information about the linux-arm-kernel mailing list