linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: aisheng.dong@freescale.com (Dong Aisheng)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] dma: mxs-dma: add device tree probe support
Date: Mon, 23 Apr 2012 12:01:29 +0800	[thread overview]
Message-ID: <20120423040129.GC24843@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <20120423031518.GJ26306@S2101-09.ap.freescale.net>

On Mon, Apr 23, 2012 at 11:15:20AM +0800, Shawn Guo wrote:
> On Wed, Apr 18, 2012 at 08:46:35PM +0800, Dong Aisheng wrote:
> > From: Dong Aisheng <dong.aisheng@linaro.org>
> > 
> > Cc: Grant Likely <grant.likely@secretlab.ca>
> > Cc: Rob Herring <rob.herring@calxeda.com>
> > Cc: Rob Landley <rob@landley.net>
> > Cc: Vinod Koul <vinod.koul@intel.com>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Cc: Shawn Guo <shawn.guo@linaro.org>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Marek Vasut <marek.vasut@gmail.com>
> > Cc: Huang Shijie <b32955@freescale.com>
> > Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
> > ---
> >  .../devicetree/bindings/dma/fsl-mxs-dma.txt        |   19 +++++++++++++
> >  drivers/dma/mxs-dma.c                              |   29 +++++++++++++++++---
> >  2 files changed, 44 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
> > new file mode 100644
> > index 0000000..ded0398
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
> > @@ -0,0 +1,19 @@
> > +* Freescale MXS DMA
> > +
> > +Required properties:
> > +- compatible : Should be "fsl,<chip>-dma-apbh" or "fsl,<chip>-dma-apbx"
> > +- reg : Should contain registers location and length
> > +
> > +Supported chips:
> > +imx23, imx28.
> > +
> > +Examples:
> > +dma-apbh at 80004000 {
> > +	compatible = "fsl,imx28-dma-apbh";
> > +	reg = <0x80004000 2000>;
> > +};
> > +
> > +dma-apbx at 80024000 {
> > +	compatible = "fsl,imx28-dma-apbx";
> > +	reg = <0x80024000 2000>;
> > +};
> > diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
> > index 51a29f9..74c3275 100644
> > --- a/drivers/dma/mxs-dma.c
> > +++ b/drivers/dma/mxs-dma.c
> > @@ -22,8 +22,11 @@
> >  #include <linux/platform_device.h>
> >  #include <linux/dmaengine.h>
> >  #include <linux/delay.h>
> > +#include <linux/module.h>
> >  #include <linux/fsl/mxs-dma.h>
> >  #include <linux/stmp_device.h>
> > +#include <linux/of.h>
> > +#include <linux/of_device.h>
> >  
> >  #include <asm/irq.h>
> >  
> > @@ -178,6 +181,17 @@ static struct platform_device_id mxs_dma_idt[] = {
> >  	}
> >  };
> >  
> > +#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.

Regards
Dong Aisheng

  reply	other threads:[~2012-04-23  4:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18 12:46 [PATCH 0/5] dma: mxs-dma: make driver mach-independent and add dt support Dong Aisheng
2012-04-18 12:46 ` [PATCH 1/5] dma: mxs-dma: use global stmp_device functionality Dong Aisheng
2012-04-18 18:00   ` Marek Vasut
2012-04-18 12:46 ` [PATCH 2/5] dma: mxs-dma: make platform_device_id more generic Dong Aisheng
2012-04-18 18:01   ` Marek Vasut
2012-04-23  3:01   ` Shawn Guo
2012-04-23  3:58     ` Dong Aisheng
2012-04-23  4:58       ` Shawn Guo
2012-04-18 12:46 ` [PATCH 3/5] dma: mxs-dma: add device tree probe support Dong Aisheng
2012-04-18 18:02   ` Marek Vasut
2012-04-23  3:15   ` Shawn Guo
2012-04-23  4:01     ` Dong Aisheng [this message]
2012-04-23  5:04       ` Shawn Guo
2012-04-23  8:02         ` Dong Aisheng
2012-04-18 12:46 ` [PATCH 4/5] ARM: mxs: do not add dma device by default Dong Aisheng
2012-04-18 18:03   ` Marek Vasut
2012-04-20 15:11     ` [PATCH v2 " Dong Aisheng
2012-04-23  1:59   ` [PATCH " Shawn Guo
2012-04-23  3:26     ` Dong Aisheng
2012-04-18 12:46 ` [PATCH 5/5] ARM: mx28evk: add mxs-dma dt support Dong Aisheng
2012-04-18 18:03   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120423040129.GC24843@shlinux2.ap.freescale.net \
    --to=aisheng.dong@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).