mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Barry Song <21cnbao@gmail.com>
Cc: Barry Song <Barry.Song@csr.com>, Arnd Bergmann <arnd@arndb.de>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	DL-SHA-WorkGroupLinux <Workgroup.Linux@csr.com>,
	Rongjun Ying <Rongjun.Ying@csr.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] dmaengine: add CSR SiRFprimaII DMAC driver
Date: Tue, 20 Sep 2011 09:12:01 +0530	[thread overview]
Message-ID: <1316490121.31295.2.camel@vkoul-udesk3> (raw)
In-Reply-To: <CAGsJ_4y0F7JTwFwesVvbgq1Lupw+a_-EpiTwW9GtXxOauohdVQ@mail.gmail.com>

On Mon, 2011-09-19 at 19:25 +0800, Barry Song wrote:
> 2011/9/19 Vinod Koul <vinod.koul@intel.com>:
> > On Mon, 2011-09-19 at 09:56 +0000, Barry Song wrote:
> >> > > > Not sure why you support this, there seem to be no DMA_SLAVE
> >> support in
> >> > > > this version ate least
> >> > >
> >> > > Not. I support dma_slave. But I have no prep_slave_sg function
> >> since I can
> >> > use the gen xfer to replace it.
> >> > Yes thats okay...
> >> >
> >> > Then I have questions on genxfer function...
> >> > where are you copying either src or dstn_start address, you seem to
> >> > completely ignore them?
> >>
> >> Since I only support memory->device or device ->memory, and channel
> >> number is fixed to every device. Then I actually don't care device
> >> address at all. Either src or dst is fixed to the device's address.
> > peripheral address can be fixed, not the memory, where do you copy the
> > memory address?
> 
> +static int sirfsoc_dma_slave_config(struct sirfsoc_dma_chan *schan,
> +       struct dma_slave_config *config)
> +{
> +       u32 addr, direction;
> +       unsigned long flags;
> +
> +       switch (config->direction) {
> +       case DMA_FROM_DEVICE:
> +               direction = 0;
> +               addr = config->dst_addr;
> +               break;
> +
> +       case DMA_TO_DEVICE:
> +               direction = 1;
> +               addr = config->src_addr;
> +               break;
> +
> +       default:
> +               return -EINVAL;
> +       }
> +  ...
This is wrong. You are treating addresses passed in dma_slave_config as
memory address. These should be treating this as peripheral address
(destination in DMA_TO_DEVICE....) and take the memory address from your
prepare function.

-- 
~Vinod


  reply	other threads:[~2011-09-20  3:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16  9:56 Barry Song
2011-09-16 18:55 ` Jassi Brar
2011-09-17 14:57   ` Barry Song
2011-09-17 15:51     ` Jassi Brar
2011-09-17 15:02 ` Russell King - ARM Linux
2011-09-17 15:33   ` Barry Song
2011-09-19  8:59 ` Vinod Koul
2011-09-19  9:23   ` Barry Song
2011-09-19  9:41     ` Vinod Koul
2011-09-19  9:56       ` Barry Song
2011-09-19 11:14         ` Vinod Koul
2011-09-19 11:25           ` Barry Song
2011-09-20  3:42             ` Vinod Koul [this message]
2011-09-20  4:40             ` Jassi Brar
2011-09-20  5:25               ` Barry Song
2011-09-21 14:49 ` Arnd Bergmann
2011-09-23  2:01   ` Barry Song

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=1316490121.31295.2.camel@vkoul-udesk3 \
    --to=vinod.koul@intel.com \
    --cc=21cnbao@gmail.com \
    --cc=Barry.Song@csr.com \
    --cc=Rongjun.Ying@csr.com \
    --cc=Workgroup.Linux@csr.com \
    --cc=arnd@arndb.de \
    --cc=jaswinder.singh@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®