[PATCH 3/7] MTD: pxa3xx-nand: add devicetree bindings
Arnd Bergmann
arnd at arndb.de
Thu Jul 26 02:30:36 EDT 2012
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.
Arnd
More information about the linux-arm-kernel
mailing list