[PATCH 3/7] MTD: pxa3xx-nand: add devicetree bindings

Daniel Mack zonque at gmail.com
Thu Jul 26 02:53:49 EDT 2012


On 26.07.2012 08:30, Arnd Bergmann wrote:
> On Thursday 26 July 2012, Marek Vasut wrote:
>>> -     r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
>>> -     if (r == NULL) {
>>> -             dev_err(&pdev->dev, "no resource defined for data DMA\n");
>>> -             ret = -ENXIO;
>>> -             goto fail_put_clk;
>>> -     }
>>> -     info->drcmr_dat = r->start;
>>> +     /*
>>> +      * This is a dirty hack to make this driver work from devicetree
>>> +      * bindings. It can be removed once we have a prober DMA controller
>>> +      * framework for DT.
>>> +      */
>>> +     if (pdev->dev.of_node && cpu_is_pxa3xx()) {
>>> +             info->drcmr_dat = 97;
>>> +             info->drcmr_cmd = 99;
>>
>> cpu_is_() stuff should begone ... besides, what are these numbers here?
> 
> They are the numbers from the DMA resource. It's ugly but I think reasonable
> to do this here. We will clean it up soon, once the bindings are in place.
> 
> I did notice though the the two "info->drcmr_dat = r->start" assignments in
> the non-DT case are removed here. I think that's a bug.

Eh, right you are. Fixed.




More information about the linux-arm-kernel mailing list