[PATCH 3/5] dma: mxs-dma: add device tree probe support

Shawn Guo shawn.guo at linaro.org
Mon Apr 23 01:04:00 EDT 2012


On Mon, Apr 23, 2012 at 12:01:29PM +0800, Dong Aisheng wrote:
> > > +#ifdef CONFIG_OF
> > > +static const struct of_device_id mxs_dma_dt_ids[] = {
> > > +	{ .compatible = "fsl,imx23-dma-apbh", .data = &mxs_dma_idt[0], },
> > > +	{ .compatible = "fsl,imx23-dma-apbx", .data = &mxs_dma_idt[1], },
> > > +	{ .compatible = "fsl,imx28-dma-apbh", .data = &mxs_dma_idt[2], },
> > > +	{ .compatible = "fsl,imx28-dma-apbx", .data = &mxs_dma_idt[3], },
> > > +	{ /* sentinel */ }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, mxs_dma_dt_ids);
> > > +#endif
> > > +
> > As out goal is to convert mxs over to DT, you can remove the #ifdef
> > here ...
> > 
> But the non-dt is still exist, right?
> So i think we can keep it now unless we totally removed the non-dt code.
> 
The non-dt still exist during the transition.  But even without the
#ifdef, the driver works for non-dt.  It just saves a few bytes for
non-dt only build.  We will soon enable DT build for mxs permanently.
What's the point to have it at all?

-- 
Regards,
Shawn



More information about the linux-arm-kernel mailing list