From: Vinod Koul <vinod.koul@intel.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/2 v2] dmaengine: rcar-audmapp: independent from SH_DMAE_BASE v2
Date: Wed, 10 Dec 2014 05:58:23 +0000 [thread overview]
Message-ID: <20141210055838.GF16827@intel.com> (raw)
In-Reply-To: <87vblknmw3.wl%kuninori.morimoto.gx@renesas.com>
On Wed, Dec 10, 2014 at 04:34:21AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> +static struct dma_async_tx_descriptor *
> +audmapp_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
> + size_t buf_len, size_t period_len,
> + enum dma_transfer_direction dir, unsigned long flags)
> +{
> + struct audmapp_chan *achan = chan_to_achan(chan);
> +
> + return &achan->async_tx;
> +}
I had commented last time as well. This doesnt look right. You are ignoring
all input parameters, so how does it work at all?
> +
> +static void audmapp_slave_config(struct audmapp_chan *achan,
> + struct dma_slave_config *cfg)
> +{
> + achan->src = cfg->src_addr;
> + achan->dst = cfg->dst_addr;
> +}
> +
> +static int audmapp_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
> + unsigned long arg)
> +{
> + struct audmapp_chan *achan = chan_to_achan(chan);
> +
> + switch (cmd) {
> + case DMA_TERMINATE_ALL:
> + audmapp_halt(achan);
> + break;
> + case DMA_SLAVE_CONFIG:
> + audmapp_slave_config(achan, (struct dma_slave_config *)arg);
> + break;
This needs to be updated to new APIs i have merged at
topic/slave_caps_device_control_fix
> + default:
> + return -ENXIO;
> + }
> +
> + return 0;
> +}
> +
> +static enum dma_status audmapp_tx_status(struct dma_chan *chan,
> + dma_cookie_t cookie,
> + struct dma_tx_state *txstate)
> +{
> + return dma_cookie_status(chan, cookie, txstate);
> +}
> +
> +static void audmapp_issue_pending(struct dma_chan *chan)
> +{
> + struct audmapp_chan *achan = chan_to_achan(chan);
> + struct audmapp_priv *priv = achan_to_priv(achan);
> + struct device *dev = priv_to_dev(priv);
> + u32 chcr = achan->chcr | PDMACHCR_DE;
> +
> + dev_dbg(dev, "src/dst/chcr = %pad/%pad/%08x\n",
> + &achan->src, &achan->dst, chcr);
> +
> + audmapp_write(achan, achan->src, PDMASAR);
> + audmapp_write(achan, achan->dst, PDMADAR);
> + audmapp_write(achan, chcr, PDMACHCR);
no locking?
I don't see any interrupt code, does that get done by some other lib code?
something seems missing here
--
~Vinod
next prev parent reply other threads:[~2014-12-10 5:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 4:34 [PATCH 2/2 v2] dmaengine: rcar-audmapp: independent from SH_DMAE_BASE v2 Kuninori Morimoto
2014-12-10 5:58 ` Vinod Koul [this message]
2014-12-10 7:05 ` Kuninori Morimoto
2014-12-11 5:17 ` Vinod Koul
2014-12-11 5:31 ` Kuninori Morimoto
2014-12-15 10:31 ` Kuninori Morimoto
2014-12-15 14:54 ` Vinod Koul
2014-12-16 0:08 ` Kuninori Morimoto
2014-12-16 6:58 ` Vinod Koul
2014-12-16 9:03 ` Kuninori Morimoto
2014-12-16 9:11 ` Kuninori Morimoto
2014-12-16 16:45 ` Vinod Koul
2014-12-16 16:51 ` Vinod Koul
2014-12-16 19:41 ` Laurent Pinchart
2014-12-17 0:27 ` Kuninori Morimoto
2014-12-18 20:49 ` Laurent Pinchart
2014-12-19 0:27 ` Kuninori Morimoto
2014-12-22 15:26 ` Vinod Koul
2014-12-24 1:39 ` Kuninori Morimoto
2014-12-24 5:35 ` 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=20141210055838.GF16827@intel.com \
--to=vinod.koul@intel.com \
--cc=linux-sh@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.