public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Lee Jones <lee.jones@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linus WALLEIJ <linus.walleij@stericsson.com>,
	Herbert Xu <herbert@gondor.hengli.com.au>,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Westin <andreas.westin@stericsson.com>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	magnus.p.persson@stericsson.com
Subject: Re: [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config()
Date: Thu, 25 Apr 2013 16:11:39 +0200	[thread overview]
Message-ID: <201304251611.39667.arnd@arndb.de> (raw)
In-Reply-To: <20130425134402.GN4623@gmail.com>

On Thursday 25 April 2013, Lee Jones wrote:

> > > @@ -232,6 +236,7 @@ struct cryp_dma {
> > >   */
> > >  struct cryp_device_data {
> > >         struct cryp_register __iomem *base;
> > > +       phys_addr_t phybase;
> > 
> > Use dma_addr_t. Maybe "phybase" is misleading,
> > "dmabase" is probably better. (Also applies to the
> > cryp patch).
> 
> Accept it's not the dmabase.
> 
> It's the phybase (U8500_CRYP1_BASE) i.e. the physical base address of
> the device's regs.

Right, this recently came up in a different context and I agree:

The dma engine driver must know the address in its dma space, while the
slave driver has it available in physical space. These two are often the
same, but there is no generic way to convert between the two, especially
if the dma engine resides behind an IOMMU.

The best assumption we can make is that the dma engine driver knows
how to convert between the two. Interestingly the documentation for
dma_slave_config talks about "physical address", while the structure
itself uses a dma_addr_t. Linus Walleij introduced the structure in
c156d0a5b0 "DMAENGINE: generic slave channel control v3", so I assume
he can shed some light on what he was thinking. I assume the documentation
is right but the structure is not and should be converted to use
phys_add_t or resource_size_t.

	Arnd

  parent reply	other threads:[~2013-04-25 14:11 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 10:26 [PATCH 0/9] Fix ux500 crypto drivers and init DMA in the correct way Lee Jones
2013-04-18 10:26 ` [PATCH 1/9] crypto: ux500/hash - Prepare clock before enabling it Lee Jones
2013-04-19 12:24   ` [PATCH 1/9 v2] " Lee Jones
2013-04-19 12:26     ` Arnd Bergmann
2013-04-25 11:49     ` Linus Walleij
2013-04-25 13:46       ` Lee Jones
2013-04-18 10:26 ` [PATCH 2/9] crypto: ux500/hash - Set DMA configuration though dma_slave_config() Lee Jones
2013-04-25 11:55   ` Linus Walleij
2013-04-18 10:26 ` [PATCH 3/9] ARM: ux500: Stop passing Hash DMA channel config information though pdata Lee Jones
2013-04-25 11:56   ` Linus Walleij
2013-04-18 10:27 ` [PATCH 4/9] crypto: ux500/cryp - Prepare clock before enabling it Lee Jones
2013-04-19 12:22   ` [PATCH 4/9 v2] " Lee Jones
2013-04-19 12:23     ` Arnd Bergmann
2013-04-25 11:57     ` Linus Walleij
2013-04-18 10:27 ` [PATCH 5/9] crypto: ux500/cryp - Fix compile error Lee Jones
2013-04-25 12:00   ` Linus Walleij
2013-04-25 13:44     ` Lee Jones
2013-04-18 10:27 ` [PATCH 6/9] crypto: ux500/cryp - Set DMA configuration though dma_slave_config() Lee Jones
2013-04-25 12:02   ` Linus Walleij
2013-04-25 13:44     ` Lee Jones
2013-04-25 14:05       ` Linus Walleij
2013-04-25 14:11       ` Arnd Bergmann [this message]
2013-04-26  8:28         ` Linus Walleij
2013-04-26  8:16           ` Vinod Koul
2013-04-26  9:07             ` Linus Walleij
2013-04-26  9:39             ` Arnd Bergmann
2013-04-26  9:44               ` Russell King - ARM Linux
2013-04-26  9:41             ` Russell King - ARM Linux
2013-04-30 10:08               ` Vinod Koul
2013-04-26  9:34           ` Arnd Bergmann
2013-04-18 10:27 ` [PATCH 7/9] ARM: ux500: Stop passing Cryp DMA channel config information though pdata Lee Jones
2013-04-25 12:02   ` Linus Walleij
2013-04-18 10:27 ` [PATCH 8/9] crypto: ux500/[cryp|hash] - Show successful start-up in the bootlog Lee Jones
2013-04-25 12:03   ` Linus Walleij
2013-04-18 10:27 ` [PATCH 9/9] ARM: ux500: Register Cyrp and Hash platform drivers on Snowball Lee Jones
2013-04-25 12:04   ` Linus Walleij
2013-04-18 10:44 ` [PATCH 0/9] Fix ux500 crypto drivers and init DMA in the correct way Arnd Bergmann

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=201304251611.39667.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=andreas.westin@stericsson.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.hengli.com.au \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.p.persson@stericsson.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