From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/4] ARM: at91/dma: remove platform data from DMA controller
Date: Wed, 12 Oct 2011 18:34:49 -0600 [thread overview]
Message-ID: <20111013003449.GF14042@ponder.secretlab.ca> (raw)
In-Reply-To: <bcf2b73ecc158bf20f94b00d3b8a6d140eff2026.1318438197.git.nicolas.ferre@atmel.com>
On Wed, Oct 12, 2011 at 06:57:13PM +0200, Nicolas Ferre wrote:
> DMA controller can deduce its configuration data from
> the platform. Remove the platform data and match device
> types with the compatible ones.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/arm/mach-at91/at91sam9g45_devices.c | 9 +--------
> arch/arm/mach-at91/at91sam9rl_devices.c | 8 +-------
> arch/arm/mach-at91/include/mach/at_hdmac.h | 10 ----------
> 3 files changed, 2 insertions(+), 25 deletions(-)
>
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index 600bffb..c9b897f 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -38,10 +38,6 @@
> #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
> static u64 hdmac_dmamask = DMA_BIT_MASK(32);
>
> -static struct at_dma_platform_data atdma_pdata = {
> - .nr_channels = 8,
> -};
> -
> static struct resource hdmac_resources[] = {
> [0] = {
> .start = AT91_BASE_SYS + AT91_DMA,
> @@ -56,12 +52,11 @@ static struct resource hdmac_resources[] = {
> };
>
> static struct platform_device at_hdmac_device = {
> - .name = "at_hdmac",
> + .name = "at91sam9g45_dma",
> .id = -1,
> .dev = {
> .dma_mask = &hdmac_dmamask,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> - .platform_data = &atdma_pdata,
> },
> .resource = hdmac_resources,
> .num_resources = ARRAY_SIZE(hdmac_resources),
> @@ -69,8 +64,6 @@ static struct platform_device at_hdmac_device = {
>
> void __init at91_add_device_hdmac(void)
> {
> - dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
> - dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask);
> platform_device_register(&at_hdmac_device);
> }
> #else
> diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
> index aacb19d..81954f7 100644
> --- a/arch/arm/mach-at91/at91sam9rl_devices.c
> +++ b/arch/arm/mach-at91/at91sam9rl_devices.c
> @@ -33,10 +33,6 @@
> #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
> static u64 hdmac_dmamask = DMA_BIT_MASK(32);
>
> -static struct at_dma_platform_data atdma_pdata = {
> - .nr_channels = 2,
> -};
> -
> static struct resource hdmac_resources[] = {
> [0] = {
> .start = AT91_BASE_SYS + AT91_DMA,
> @@ -51,12 +47,11 @@ static struct resource hdmac_resources[] = {
> };
>
> static struct platform_device at_hdmac_device = {
> - .name = "at_hdmac",
> + .name = "at91sam9rl_dma",
> .id = -1,
> .dev = {
> .dma_mask = &hdmac_dmamask,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> - .platform_data = &atdma_pdata,
> },
> .resource = hdmac_resources,
> .num_resources = ARRAY_SIZE(hdmac_resources),
> @@ -64,7 +59,6 @@ static struct platform_device at_hdmac_device = {
>
> void __init at91_add_device_hdmac(void)
> {
> - dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
> platform_device_register(&at_hdmac_device);
> }
> #else
> diff --git a/arch/arm/mach-at91/include/mach/at_hdmac.h b/arch/arm/mach-at91/include/mach/at_hdmac.h
> index 187cb58..652c1a1 100644
> --- a/arch/arm/mach-at91/include/mach/at_hdmac.h
> +++ b/arch/arm/mach-at91/include/mach/at_hdmac.h
> @@ -14,16 +14,6 @@
> #include <linux/dmaengine.h>
>
> /**
> - * struct at_dma_platform_data - Controller configuration parameters
> - * @nr_channels: Number of channels supported by hardware (max 8)
> - * @cap_mask: dma_capability flags supported by the platform
> - */
> -struct at_dma_platform_data {
> - unsigned int nr_channels;
> - dma_cap_mask_t cap_mask;
> -};
> -
> -/**
> * enum at_dma_slave_width - DMA slave register access width.
> * @AT_DMA_SLAVE_WIDTH_8BIT: Do 8-bit slave register accesses
> * @AT_DMA_SLAVE_WIDTH_16BIT: Do 16-bit slave register accesses
> --
> 1.7.5.4
>
WARNING: multiple messages have this Message-ID (diff)
From: Grant Likely <grant.likely@secretlab.ca>
To: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: vinod.koul@intel.com, linux-arm-kernel@lists.infradead.org,
robherring2@gmail.com, devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] ARM: at91/dma: remove platform data from DMA controller
Date: Wed, 12 Oct 2011 18:34:49 -0600 [thread overview]
Message-ID: <20111013003449.GF14042@ponder.secretlab.ca> (raw)
In-Reply-To: <bcf2b73ecc158bf20f94b00d3b8a6d140eff2026.1318438197.git.nicolas.ferre@atmel.com>
On Wed, Oct 12, 2011 at 06:57:13PM +0200, Nicolas Ferre wrote:
> DMA controller can deduce its configuration data from
> the platform. Remove the platform data and match device
> types with the compatible ones.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/arm/mach-at91/at91sam9g45_devices.c | 9 +--------
> arch/arm/mach-at91/at91sam9rl_devices.c | 8 +-------
> arch/arm/mach-at91/include/mach/at_hdmac.h | 10 ----------
> 3 files changed, 2 insertions(+), 25 deletions(-)
>
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index 600bffb..c9b897f 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -38,10 +38,6 @@
> #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
> static u64 hdmac_dmamask = DMA_BIT_MASK(32);
>
> -static struct at_dma_platform_data atdma_pdata = {
> - .nr_channels = 8,
> -};
> -
> static struct resource hdmac_resources[] = {
> [0] = {
> .start = AT91_BASE_SYS + AT91_DMA,
> @@ -56,12 +52,11 @@ static struct resource hdmac_resources[] = {
> };
>
> static struct platform_device at_hdmac_device = {
> - .name = "at_hdmac",
> + .name = "at91sam9g45_dma",
> .id = -1,
> .dev = {
> .dma_mask = &hdmac_dmamask,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> - .platform_data = &atdma_pdata,
> },
> .resource = hdmac_resources,
> .num_resources = ARRAY_SIZE(hdmac_resources),
> @@ -69,8 +64,6 @@ static struct platform_device at_hdmac_device = {
>
> void __init at91_add_device_hdmac(void)
> {
> - dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
> - dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask);
> platform_device_register(&at_hdmac_device);
> }
> #else
> diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
> index aacb19d..81954f7 100644
> --- a/arch/arm/mach-at91/at91sam9rl_devices.c
> +++ b/arch/arm/mach-at91/at91sam9rl_devices.c
> @@ -33,10 +33,6 @@
> #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
> static u64 hdmac_dmamask = DMA_BIT_MASK(32);
>
> -static struct at_dma_platform_data atdma_pdata = {
> - .nr_channels = 2,
> -};
> -
> static struct resource hdmac_resources[] = {
> [0] = {
> .start = AT91_BASE_SYS + AT91_DMA,
> @@ -51,12 +47,11 @@ static struct resource hdmac_resources[] = {
> };
>
> static struct platform_device at_hdmac_device = {
> - .name = "at_hdmac",
> + .name = "at91sam9rl_dma",
> .id = -1,
> .dev = {
> .dma_mask = &hdmac_dmamask,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> - .platform_data = &atdma_pdata,
> },
> .resource = hdmac_resources,
> .num_resources = ARRAY_SIZE(hdmac_resources),
> @@ -64,7 +59,6 @@ static struct platform_device at_hdmac_device = {
>
> void __init at91_add_device_hdmac(void)
> {
> - dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
> platform_device_register(&at_hdmac_device);
> }
> #else
> diff --git a/arch/arm/mach-at91/include/mach/at_hdmac.h b/arch/arm/mach-at91/include/mach/at_hdmac.h
> index 187cb58..652c1a1 100644
> --- a/arch/arm/mach-at91/include/mach/at_hdmac.h
> +++ b/arch/arm/mach-at91/include/mach/at_hdmac.h
> @@ -14,16 +14,6 @@
> #include <linux/dmaengine.h>
>
> /**
> - * struct at_dma_platform_data - Controller configuration parameters
> - * @nr_channels: Number of channels supported by hardware (max 8)
> - * @cap_mask: dma_capability flags supported by the platform
> - */
> -struct at_dma_platform_data {
> - unsigned int nr_channels;
> - dma_cap_mask_t cap_mask;
> -};
> -
> -/**
> * enum at_dma_slave_width - DMA slave register access width.
> * @AT_DMA_SLAVE_WIDTH_8BIT: Do 8-bit slave register accesses
> * @AT_DMA_SLAVE_WIDTH_16BIT: Do 16-bit slave register accesses
> --
> 1.7.5.4
>
WARNING: multiple messages have this Message-ID (diff)
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
Cc: vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v3 3/4] ARM: at91/dma: remove platform data from DMA controller
Date: Wed, 12 Oct 2011 18:34:49 -0600 [thread overview]
Message-ID: <20111013003449.GF14042@ponder.secretlab.ca> (raw)
In-Reply-To: <bcf2b73ecc158bf20f94b00d3b8a6d140eff2026.1318438197.git.nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
On Wed, Oct 12, 2011 at 06:57:13PM +0200, Nicolas Ferre wrote:
> DMA controller can deduce its configuration data from
> the platform. Remove the platform data and match device
> types with the compatible ones.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> ---
> arch/arm/mach-at91/at91sam9g45_devices.c | 9 +--------
> arch/arm/mach-at91/at91sam9rl_devices.c | 8 +-------
> arch/arm/mach-at91/include/mach/at_hdmac.h | 10 ----------
> 3 files changed, 2 insertions(+), 25 deletions(-)
>
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index 600bffb..c9b897f 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -38,10 +38,6 @@
> #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
> static u64 hdmac_dmamask = DMA_BIT_MASK(32);
>
> -static struct at_dma_platform_data atdma_pdata = {
> - .nr_channels = 8,
> -};
> -
> static struct resource hdmac_resources[] = {
> [0] = {
> .start = AT91_BASE_SYS + AT91_DMA,
> @@ -56,12 +52,11 @@ static struct resource hdmac_resources[] = {
> };
>
> static struct platform_device at_hdmac_device = {
> - .name = "at_hdmac",
> + .name = "at91sam9g45_dma",
> .id = -1,
> .dev = {
> .dma_mask = &hdmac_dmamask,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> - .platform_data = &atdma_pdata,
> },
> .resource = hdmac_resources,
> .num_resources = ARRAY_SIZE(hdmac_resources),
> @@ -69,8 +64,6 @@ static struct platform_device at_hdmac_device = {
>
> void __init at91_add_device_hdmac(void)
> {
> - dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
> - dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask);
> platform_device_register(&at_hdmac_device);
> }
> #else
> diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
> index aacb19d..81954f7 100644
> --- a/arch/arm/mach-at91/at91sam9rl_devices.c
> +++ b/arch/arm/mach-at91/at91sam9rl_devices.c
> @@ -33,10 +33,6 @@
> #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
> static u64 hdmac_dmamask = DMA_BIT_MASK(32);
>
> -static struct at_dma_platform_data atdma_pdata = {
> - .nr_channels = 2,
> -};
> -
> static struct resource hdmac_resources[] = {
> [0] = {
> .start = AT91_BASE_SYS + AT91_DMA,
> @@ -51,12 +47,11 @@ static struct resource hdmac_resources[] = {
> };
>
> static struct platform_device at_hdmac_device = {
> - .name = "at_hdmac",
> + .name = "at91sam9rl_dma",
> .id = -1,
> .dev = {
> .dma_mask = &hdmac_dmamask,
> .coherent_dma_mask = DMA_BIT_MASK(32),
> - .platform_data = &atdma_pdata,
> },
> .resource = hdmac_resources,
> .num_resources = ARRAY_SIZE(hdmac_resources),
> @@ -64,7 +59,6 @@ static struct platform_device at_hdmac_device = {
>
> void __init at91_add_device_hdmac(void)
> {
> - dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
> platform_device_register(&at_hdmac_device);
> }
> #else
> diff --git a/arch/arm/mach-at91/include/mach/at_hdmac.h b/arch/arm/mach-at91/include/mach/at_hdmac.h
> index 187cb58..652c1a1 100644
> --- a/arch/arm/mach-at91/include/mach/at_hdmac.h
> +++ b/arch/arm/mach-at91/include/mach/at_hdmac.h
> @@ -14,16 +14,6 @@
> #include <linux/dmaengine.h>
>
> /**
> - * struct at_dma_platform_data - Controller configuration parameters
> - * @nr_channels: Number of channels supported by hardware (max 8)
> - * @cap_mask: dma_capability flags supported by the platform
> - */
> -struct at_dma_platform_data {
> - unsigned int nr_channels;
> - dma_cap_mask_t cap_mask;
> -};
> -
> -/**
> * enum at_dma_slave_width - DMA slave register access width.
> * @AT_DMA_SLAVE_WIDTH_8BIT: Do 8-bit slave register accesses
> * @AT_DMA_SLAVE_WIDTH_16BIT: Do 16-bit slave register accesses
> --
> 1.7.5.4
>
next prev parent reply other threads:[~2011-10-13 0:34 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 16:57 [PATCH v3 0/4] dmaengine: Device Tree support for Atmel DMA Nicolas Ferre
2011-10-12 16:57 ` Nicolas Ferre
2011-10-12 16:57 ` Nicolas Ferre
2011-10-12 16:57 ` [PATCH v3 1/4] dmaengine: at_hdmac: platform data move to use .id_table Nicolas Ferre
2011-10-12 16:57 ` Nicolas Ferre
2011-10-12 16:57 ` Nicolas Ferre
2011-10-13 0:32 ` Grant Likely
2011-10-13 0:32 ` Grant Likely
2011-10-12 16:57 ` [PATCH v3 2/4] dmaengine: at_hdmac: add device tree support Nicolas Ferre
2011-10-12 16:57 ` Nicolas Ferre
2011-10-13 0:34 ` Grant Likely
2011-10-13 0:34 ` Grant Likely
2011-10-13 11:54 ` Nicolas Ferre
2011-10-13 11:54 ` Nicolas Ferre
2011-10-13 11:54 ` Nicolas Ferre
2011-10-12 16:57 ` [PATCH v3 3/4] ARM: at91/dma: remove platform data from DMA controller Nicolas Ferre
2011-10-12 16:57 ` Nicolas Ferre
2011-10-12 16:57 ` Nicolas Ferre
2011-10-13 0:34 ` Grant Likely [this message]
2011-10-13 0:34 ` Grant Likely
2011-10-13 0:34 ` Grant Likely
2011-10-12 16:57 ` [PATCH v3 4/4] ARM: at91/dma: DMA controller registering with DT support Nicolas Ferre
2011-10-12 16:57 ` Nicolas Ferre
2011-10-13 0:35 ` Grant Likely
2011-10-13 0:35 ` Grant Likely
2011-10-13 0:35 ` Grant Likely
2011-10-17 12:54 ` [PATCH v3 0/4] dmaengine: Device Tree support for Atmel DMA Nicolas Ferre
2011-10-17 12:54 ` Nicolas Ferre
2011-10-17 12:54 ` Nicolas Ferre
2011-10-17 12:56 ` [PATCH v4 1/2] dmaengine: at_hdmac: platform data move to use .id_table Nicolas Ferre
2011-10-17 12:56 ` Nicolas Ferre
2011-10-17 12:56 ` Nicolas Ferre
2011-10-17 12:56 ` [PATCH v4 2/2] dmaengine: at_hdmac: add device tree support Nicolas Ferre
2011-10-17 12:56 ` Nicolas Ferre
2011-10-17 12:56 ` Nicolas Ferre
2011-10-24 9:34 ` [PATCH v4 1/2] dmaengine: at_hdmac: platform data move to use .id_table Grant Likely
2011-10-24 9:34 ` Grant Likely
2011-10-24 9:34 ` Grant Likely
2011-11-22 10:55 ` Nicolas Ferre
2011-11-22 10:55 ` Nicolas Ferre
2011-11-22 10:55 ` Nicolas Ferre
2011-10-23 14:30 ` [PATCH v3 0/4] dmaengine: Device Tree support for Atmel DMA Nicolas Ferre
2011-10-23 14:30 ` Nicolas Ferre
2011-10-23 14:30 ` Nicolas Ferre
2011-10-24 3:04 ` Vinod Koul
2011-10-24 3:04 ` Vinod Koul
2011-10-24 3:28 ` Vinod Koul
2011-10-24 3:28 ` Vinod Koul
2011-10-24 9:05 ` Nicolas Ferre
2011-10-24 9:05 ` Nicolas Ferre
2011-10-24 9:05 ` Nicolas Ferre
2011-11-10 9:37 ` Vinod Koul
2011-11-10 9:37 ` Vinod Koul
2011-11-10 9:37 ` 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=20111013003449.GF14042@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.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.