From: Tony Lindgren <tony@atomide.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: vinod.koul@intel.com, dan.j.williams@intel.com,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@arm.linux.org.uk, linux-omap@vger.kernel.org
Subject: Re: [PATCH] dma: omap-dma: Implement device_slave_caps callback
Date: Wed, 12 Mar 2014 10:37:00 -0700 [thread overview]
Message-ID: <20140312173700.GA1996@atomide.com> (raw)
In-Reply-To: <1394199404-7870-1-git-send-email-peter.ujfalusi@ti.com>
* Peter Ujfalusi <peter.ujfalusi@ti.com> [140307 05:39]:
> With the callback implemented omap-dma can provide information to client
> drivers regarding to supported address widths, directions, residue
> granularity, etc.
This may need some testing against linux next with Russell's
omap-dma.c clean-up series merged there. Peter, care to check
if this patch is still valid against linux next?
Regards,
Tony
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> drivers/dma/omap-dma.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
> index 64ceca2920b8..b19f04f4390b 100644
> --- a/drivers/dma/omap-dma.c
> +++ b/drivers/dma/omap-dma.c
> @@ -1088,6 +1088,23 @@ static void omap_dma_free(struct omap_dmadev *od)
> }
> }
>
> +#define OMAP_DMA_BUSWIDTHS (BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
> + BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
> + BIT(DMA_SLAVE_BUSWIDTH_4_BYTES))
> +
> +static int omap_dma_device_slave_caps(struct dma_chan *dchan,
> + struct dma_slave_caps *caps)
> +{
> + caps->src_addr_widths = OMAP_DMA_BUSWIDTHS;
> + caps->dstn_addr_widths = OMAP_DMA_BUSWIDTHS;
> + caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
> + caps->cmd_pause = true;
> + caps->cmd_terminate = true;
> + caps->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
> +
> + return 0;
> +}
> +
> static int omap_dma_probe(struct platform_device *pdev)
> {
> struct omap_dmadev *od;
> @@ -1118,6 +1135,7 @@ static int omap_dma_probe(struct platform_device *pdev)
> od->ddev.device_prep_slave_sg = omap_dma_prep_slave_sg;
> od->ddev.device_prep_dma_cyclic = omap_dma_prep_dma_cyclic;
> od->ddev.device_control = omap_dma_control;
> + od->ddev.device_slave_caps = omap_dma_device_slave_caps;
> od->ddev.dev = &pdev->dev;
> INIT_LIST_HEAD(&od->ddev.channels);
> INIT_LIST_HEAD(&od->pending);
> --
> 1.9.0
>
next prev parent reply other threads:[~2014-03-12 17:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 13:36 [PATCH] dma: omap-dma: Implement device_slave_caps callback Peter Ujfalusi
2014-03-12 17:37 ` Tony Lindgren [this message]
2014-03-13 7:48 ` Peter Ujfalusi
2014-03-13 16:25 ` Tony Lindgren
2014-03-29 13:36 ` Vinod Koul
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=20140312173700.GA1996@atomide.com \
--to=tony@atomide.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=peter.ujfalusi@ti.com \
--cc=vinod.koul@intel.com \
/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).