From: Robin Gong <yibin.gong@nxp.com>
To: "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"vkoul@kernel.org" <vkoul@kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"festevam@gmail.com" <festevam@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 6/7] dmaengine: fsl-edma: add i.mx7ulp edma2 version support
Date: Mon, 27 May 2019 10:04:52 +0000 [thread overview]
Message-ID: <1558980522.19282.19.camel@nxp.com> (raw)
In-Reply-To: <20190527090553.lek7tm3lyst3bhrd@pengutronix.de>
On 2019-05-27 at 11:05 +0200, Sascha Hauer wrote:
> On Mon, May 27, 2019 at 04:51:17PM +0800, yibin.gong@nxp.com wrote:
> >
> > From: Robin Gong <yibin.gong@nxp.com>
> >
> > +static const struct of_device_id fsl_edma_dt_ids[] = {
> > + { .compatible = "fsl,vf610-edma", .data = (void *)v1 },
> > + { .compatible = "fsl,imx7ulp-edma", .data = (void *)v3 },
> > + { /* sentinel */ }
> Please put a struct type behind the .data pointer so that you can
> configure...
But current only version needed, so I give up struct define....
>
> >
> > +};
> > +MODULE_DEVICE_TABLE(of, fsl_edma_dt_ids);
> > +
> > @@ -218,6 +272,22 @@ static int fsl_edma_probe(struct
> > platform_device *pdev)
> > fsl_edma_setup_regs(fsl_edma);
> > regs = &fsl_edma->regs;
> >
> > + if (fsl_edma->version == v3) {
> > + fsl_edma->dmamux_nr = 1;
> ...things like this...
Yes, dmamux_nr could be moved to struct at least.
>
> >
> > @@ -264,7 +334,11 @@ static int fsl_edma_probe(struct
> > platform_device *pdev)
> > }
> >
> > edma_writel(fsl_edma, ~0, regs->intl);
> > - ret = fsl_edma_irq_init(pdev, fsl_edma);
> > +
> > + if (fsl_edma->version == v3)
> > + ret = fsl_edma2_irq_init(pdev, fsl_edma);
> > + else
> > + ret = fsl_edma_irq_init(pdev, fsl_edma);
> ...and this one in that struct rather than littering the code more
> and
> more with such version tests.
Yes, such irq setup function could be moved to struct, thus, no version
test in this file. Will refine it in v3.
>
> Sascha
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-05-27 10:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-27 8:51 [PATCH v2 0/7] add edma2 for i.mx7ulp yibin.gong
2019-05-27 8:51 ` [PATCH v2 1/7] dmaengine: fsl-edma: add dmamux_nr for next version yibin.gong
2019-05-27 8:51 ` [PATCH v2 2/7] dmaengine: mcf-edma: update to 'dmamux_nr' yibin.gong
2019-05-27 8:51 ` [PATCH v2 3/7] dmaengine: fsl-edma-common: move dmamux register to another single function yibin.gong
2019-05-27 8:51 ` [PATCH v2 4/7] dmaengine: fsl-edma-common: version check for v2 instead yibin.gong
2019-05-27 9:08 ` Sascha Hauer
2019-05-27 9:52 ` Robin Gong
2019-05-27 8:51 ` [PATCH v2 5/7] dt-bindings: dma: fsl-edma: add new i.mx7ulp-edma yibin.gong
2019-05-27 8:51 ` [PATCH v2 6/7] dmaengine: fsl-edma: add i.mx7ulp edma2 version support yibin.gong
2019-05-27 9:05 ` Sascha Hauer
2019-05-27 10:04 ` Robin Gong [this message]
2019-05-27 10:10 ` Vinod Koul
2019-05-27 8:51 ` [PATCH v2 7/7] ARM: dts: imx7ulp: add edma device node yibin.gong
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=1558980522.19282.19.camel@nxp.com \
--to=yibin.gong@nxp.com \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=vkoul@kernel.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).