From: viresh kumar <viresh.kumar@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
spear-devel <spear-devel@list.st.com>
Subject: Re: [PATCH] dw_dmac: utilize slave_id to pass request line
Date: Mon, 3 Sep 2012 16:27:35 +0530 [thread overview]
Message-ID: <CAOh2x=nrmQafH72rSE5m0ny1pU435z0Hkghpj1r=Tw3-O1-94g@mail.gmail.com> (raw)
In-Reply-To: <1346669179-21024-1-git-send-email-andriy.shevchenko@linux.intel.com>
On Mon, Sep 3, 2012 at 4:16 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> There is slave_id field in the generic slave config structure that is dedicated
> for the uniq slave number. In our case we have the request lines wired to the
> certain hardware. Therefore the number of the request line is uniq and could be
> used as slave_id. It allows us in some cases to drop out the usage of the
> custom slave config structure.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/dma/dw_dmac.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> index f0c9403..7a67673 100644
> --- a/drivers/dma/dw_dmac.c
> +++ b/drivers/dma/dw_dmac.c
> @@ -187,6 +187,11 @@ static void dwc_initialize(struct dw_dma_chan *dwc)
>
> cfghi = dws->cfg_hi;
> cfglo |= dws->cfg_lo & ~DWC_CFGL_CH_PRIOR_MASK;
> + } else {
> + if (dwc->dma_sconfig.direction == DMA_MEM_TO_DEV)
> + cfghi = DWC_CFGH_DST_PER(dwc->dma_sconfig.slave_id);
> + else if (dwc->dma_sconfig.direction == DMA_DEV_TO_MEM)
> + cfghi = DWC_CFGH_SRC_PER(dwc->dma_sconfig.slave_id);
> }
>
> channel_writel(dwc, CFG_LO, cfglo);
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
next prev parent reply other threads:[~2012-09-03 10:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 10:46 [PATCH] dw_dmac: utilize slave_id to pass request line Andy Shevchenko
2012-09-03 10:57 ` viresh kumar [this message]
2012-09-14 3:00 ` 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='CAOh2x=nrmQafH72rSE5m0ny1pU435z0Hkghpj1r=Tw3-O1-94g@mail.gmail.com' \
--to=viresh.kumar@linaro.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spear-devel@list.st.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).