From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Nicolas Royer <nicolas@eukrea.com>
Cc: herbert@gondor.apana.org.au, nicolas.ferre@atmel.com,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
eric@eukrea.com, davem@davemloft.net,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/5 v2] ARM: AT91SAM9G45: same platform data structure for all crypto peripherals
Date: Wed, 7 Nov 2012 17:45:23 +0100 [thread overview]
Message-ID: <20121107164523.GG4576@game.jcrosoft.org> (raw)
In-Reply-To: <1352305675-21961-1-git-send-email-nicolas@eukrea.com>
On 17:27 Wed 07 Nov , Nicolas Royer wrote:
> Only AES use DMA in AT91SAM9G45 (TDES and SHA use PDC).
>
> However latest Atmel TDES and SHA IP releases use DMA instead of PDC.
> --> Atmel TDES and SHA drivers need DMA platform data for those IP releases.
>
> Goal of this patch is to use the same platform data structure for all Atmel
> crypto peripherals. This structure contains information about DMA interface.
>
> Signed-off-by: Nicolas Royer <nicolas@eukrea.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Acked-by: Eric Bénard <eric@eukrea.com>
> Tested-by: Eric Bénard <eric@eukrea.com>
> ---
> v2 : check kzalloc return value.
>
> arch/arm/mach-at91/at91sam9g45_devices.c | 10 ++++++----
> include/linux/platform_data/atmel-aes.h | 22 ----------------------
> include/linux/platform_data/crypto-atmel.h | 22 ++++++++++++++++++++++
> 3 files changed, 28 insertions(+), 26 deletions(-)
> delete mode 100644 include/linux/platform_data/atmel-aes.h
> create mode 100644 include/linux/platform_data/crypto-atmel.h
>
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index fcd233c..c1631d1 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -18,7 +18,7 @@
> #include <linux/platform_device.h>
> #include <linux/i2c-gpio.h>
> #include <linux/atmel-mci.h>
> -#include <linux/platform_data/atmel-aes.h>
> +#include <linux/platform_data/crypto-atmel.h>
>
> #include <linux/platform_data/at91_adc.h>
>
> @@ -1900,7 +1900,7 @@ static void __init at91_add_device_tdes(void) {}
> * -------------------------------------------------------------------- */
>
> #if defined(CONFIG_CRYPTO_DEV_ATMEL_AES) || defined(CONFIG_CRYPTO_DEV_ATMEL_AES_MODULE)
> -static struct aes_platform_data aes_data;
> +static struct crypto_platform_data aes_data;
> static u64 aes_dmamask = DMA_BIT_MASK(32);
>
> static struct resource aes_resources[] = {
> @@ -1931,9 +1931,11 @@ static struct platform_device at91sam9g45_aes_device = {
> static void __init at91_add_device_aes(void)
> {
> struct at_dma_slave *atslave;
> - struct aes_dma_data *alt_atslave;
> + struct crypto_dma_data *alt_atslave;
>
> - alt_atslave = kzalloc(sizeof(struct aes_dma_data), GFP_KERNEL);
> + alt_atslave = kzalloc(sizeof(struct crypto_dma_data), GFP_KERNEL);
I still not understand why we need to allocate it
just declare it as static
Best Regards,
J.
WARNING: multiple messages have this Message-ID (diff)
From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5 v2] ARM: AT91SAM9G45: same platform data structure for all crypto peripherals
Date: Wed, 7 Nov 2012 17:45:23 +0100 [thread overview]
Message-ID: <20121107164523.GG4576@game.jcrosoft.org> (raw)
In-Reply-To: <1352305675-21961-1-git-send-email-nicolas@eukrea.com>
On 17:27 Wed 07 Nov , Nicolas Royer wrote:
> Only AES use DMA in AT91SAM9G45 (TDES and SHA use PDC).
>
> However latest Atmel TDES and SHA IP releases use DMA instead of PDC.
> --> Atmel TDES and SHA drivers need DMA platform data for those IP releases.
>
> Goal of this patch is to use the same platform data structure for all Atmel
> crypto peripherals. This structure contains information about DMA interface.
>
> Signed-off-by: Nicolas Royer <nicolas@eukrea.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Acked-by: Eric B?nard <eric@eukrea.com>
> Tested-by: Eric B?nard <eric@eukrea.com>
> ---
> v2 : check kzalloc return value.
>
> arch/arm/mach-at91/at91sam9g45_devices.c | 10 ++++++----
> include/linux/platform_data/atmel-aes.h | 22 ----------------------
> include/linux/platform_data/crypto-atmel.h | 22 ++++++++++++++++++++++
> 3 files changed, 28 insertions(+), 26 deletions(-)
> delete mode 100644 include/linux/platform_data/atmel-aes.h
> create mode 100644 include/linux/platform_data/crypto-atmel.h
>
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index fcd233c..c1631d1 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -18,7 +18,7 @@
> #include <linux/platform_device.h>
> #include <linux/i2c-gpio.h>
> #include <linux/atmel-mci.h>
> -#include <linux/platform_data/atmel-aes.h>
> +#include <linux/platform_data/crypto-atmel.h>
>
> #include <linux/platform_data/at91_adc.h>
>
> @@ -1900,7 +1900,7 @@ static void __init at91_add_device_tdes(void) {}
> * -------------------------------------------------------------------- */
>
> #if defined(CONFIG_CRYPTO_DEV_ATMEL_AES) || defined(CONFIG_CRYPTO_DEV_ATMEL_AES_MODULE)
> -static struct aes_platform_data aes_data;
> +static struct crypto_platform_data aes_data;
> static u64 aes_dmamask = DMA_BIT_MASK(32);
>
> static struct resource aes_resources[] = {
> @@ -1931,9 +1931,11 @@ static struct platform_device at91sam9g45_aes_device = {
> static void __init at91_add_device_aes(void)
> {
> struct at_dma_slave *atslave;
> - struct aes_dma_data *alt_atslave;
> + struct crypto_dma_data *alt_atslave;
>
> - alt_atslave = kzalloc(sizeof(struct aes_dma_data), GFP_KERNEL);
> + alt_atslave = kzalloc(sizeof(struct crypto_dma_data), GFP_KERNEL);
I still not understand why we need to allocate it
just declare it as static
Best Regards,
J.
WARNING: multiple messages have this Message-ID (diff)
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Nicolas Royer <nicolas@eukrea.com>
Cc: linux-kernel@vger.kernel.org, nicolas.ferre@atmel.com,
linux-arm-kernel@lists.infradead.org,
linux-crypto@vger.kernel.org, herbert@gondor.hengli.com.au,
davem@davemloft.net, eric@eukrea.com
Subject: Re: [PATCH 2/5 v2] ARM: AT91SAM9G45: same platform data structure for all crypto peripherals
Date: Wed, 7 Nov 2012 17:45:23 +0100 [thread overview]
Message-ID: <20121107164523.GG4576@game.jcrosoft.org> (raw)
In-Reply-To: <1352305675-21961-1-git-send-email-nicolas@eukrea.com>
On 17:27 Wed 07 Nov , Nicolas Royer wrote:
> Only AES use DMA in AT91SAM9G45 (TDES and SHA use PDC).
>
> However latest Atmel TDES and SHA IP releases use DMA instead of PDC.
> --> Atmel TDES and SHA drivers need DMA platform data for those IP releases.
>
> Goal of this patch is to use the same platform data structure for all Atmel
> crypto peripherals. This structure contains information about DMA interface.
>
> Signed-off-by: Nicolas Royer <nicolas@eukrea.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Acked-by: Eric Bénard <eric@eukrea.com>
> Tested-by: Eric Bénard <eric@eukrea.com>
> ---
> v2 : check kzalloc return value.
>
> arch/arm/mach-at91/at91sam9g45_devices.c | 10 ++++++----
> include/linux/platform_data/atmel-aes.h | 22 ----------------------
> include/linux/platform_data/crypto-atmel.h | 22 ++++++++++++++++++++++
> 3 files changed, 28 insertions(+), 26 deletions(-)
> delete mode 100644 include/linux/platform_data/atmel-aes.h
> create mode 100644 include/linux/platform_data/crypto-atmel.h
>
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index fcd233c..c1631d1 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -18,7 +18,7 @@
> #include <linux/platform_device.h>
> #include <linux/i2c-gpio.h>
> #include <linux/atmel-mci.h>
> -#include <linux/platform_data/atmel-aes.h>
> +#include <linux/platform_data/crypto-atmel.h>
>
> #include <linux/platform_data/at91_adc.h>
>
> @@ -1900,7 +1900,7 @@ static void __init at91_add_device_tdes(void) {}
> * -------------------------------------------------------------------- */
>
> #if defined(CONFIG_CRYPTO_DEV_ATMEL_AES) || defined(CONFIG_CRYPTO_DEV_ATMEL_AES_MODULE)
> -static struct aes_platform_data aes_data;
> +static struct crypto_platform_data aes_data;
> static u64 aes_dmamask = DMA_BIT_MASK(32);
>
> static struct resource aes_resources[] = {
> @@ -1931,9 +1931,11 @@ static struct platform_device at91sam9g45_aes_device = {
> static void __init at91_add_device_aes(void)
> {
> struct at_dma_slave *atslave;
> - struct aes_dma_data *alt_atslave;
> + struct crypto_dma_data *alt_atslave;
>
> - alt_atslave = kzalloc(sizeof(struct aes_dma_data), GFP_KERNEL);
> + alt_atslave = kzalloc(sizeof(struct crypto_dma_data), GFP_KERNEL);
I still not understand why we need to allocate it
just declare it as static
Best Regards,
J.
next prev parent reply other threads:[~2012-11-07 16:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-06 16:32 [PATCH 2/5] ARM: AT91SAM9G45: same platform data structure for all crypto peripherals Nicolas Royer
2012-11-06 16:32 ` Nicolas Royer
2012-11-06 16:32 ` Nicolas Royer
2012-11-07 15:26 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-07 15:26 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-07 15:26 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-07 15:50 ` Eric Bénard
2012-11-07 15:50 ` Eric Bénard
2012-11-07 15:50 ` Eric Bénard
2012-11-07 16:27 ` [PATCH 2/5 v2] " Nicolas Royer
2012-11-07 16:27 ` Nicolas Royer
2012-11-07 16:27 ` Nicolas Royer
2012-11-07 16:45 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-11-07 16:45 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-07 16:45 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-07 16:59 ` Eric Bénard
2012-11-07 16:59 ` Eric Bénard
2012-11-07 16:59 ` Eric Bénard
2012-11-07 17:12 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-07 17:12 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-07 17:12 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-07 17:34 ` [PATCH 2/5 v3] " Nicolas Royer
2012-11-07 17:34 ` Nicolas Royer
2012-11-07 17:34 ` Nicolas Royer
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=20121107164523.GG4576@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=davem@davemloft.net \
--cc=eric@eukrea.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=nicolas@eukrea.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 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.