From: sshtylyov@ru.mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 4/4] ARM: at91/dma: DMA controller registering with DT support
Date: Tue, 11 Oct 2011 15:16:17 +0400 [thread overview]
Message-ID: <4E942581.2050903@ru.mvista.com> (raw)
In-Reply-To: <1318265021-4562-1-git-send-email-nicolas.ferre@atmel.com>
Hello.
On 10-10-2011 20:43, Nicolas Ferre wrote:
> Device tree support on at91sam9g45 family SoC. Only call
> platform_device_register() if no compatible dma-controller
> node is found in device tree.
> Signed-off-by: Nicolas Ferre<nicolas.ferre@atmel.com>
> ---
> V2: use compatible string to match device.
[...]
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index 9390ae6..2120055 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -64,7 +64,13 @@ static struct platform_device at_hdmac_device = {
>
> void __init at91_add_device_hdmac(void)
> {
> - platform_device_register(&at_hdmac_device);
> + struct device_node *np = of_find_node_by_name(NULL, "dma-controller");
> +
> + if (np&& of_device_is_compatible(np, "atmel,at91sam9g45-dma")) {
> + of_node_put(np);
> + } else {
> + platform_device_register(&at_hdmac_device);
> + }
{} not needed here, and checkpatch.pl should have protested.
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
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,
grant.likely@secretlab.ca, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 4/4] ARM: at91/dma: DMA controller registering with DT support
Date: Tue, 11 Oct 2011 15:16:17 +0400 [thread overview]
Message-ID: <4E942581.2050903@ru.mvista.com> (raw)
In-Reply-To: <1318265021-4562-1-git-send-email-nicolas.ferre@atmel.com>
Hello.
On 10-10-2011 20:43, Nicolas Ferre wrote:
> Device tree support on at91sam9g45 family SoC. Only call
> platform_device_register() if no compatible dma-controller
> node is found in device tree.
> Signed-off-by: Nicolas Ferre<nicolas.ferre@atmel.com>
> ---
> V2: use compatible string to match device.
[...]
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index 9390ae6..2120055 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -64,7 +64,13 @@ static struct platform_device at_hdmac_device = {
>
> void __init at91_add_device_hdmac(void)
> {
> - platform_device_register(&at_hdmac_device);
> + struct device_node *np = of_find_node_by_name(NULL, "dma-controller");
> +
> + if (np&& of_device_is_compatible(np, "atmel,at91sam9g45-dma")) {
> + of_node_put(np);
> + } else {
> + platform_device_register(&at_hdmac_device);
> + }
{} not needed here, and checkpatch.pl should have protested.
WBR, Sergei
next prev parent reply other threads:[~2011-10-11 11:16 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-05 12:58 [PATCH] dmaengine: at_hdmac: add device tree probe Nicolas Ferre
2011-08-05 12:58 ` Nicolas Ferre
2011-08-05 12:58 ` Nicolas Ferre
2011-08-07 4:09 ` Grant Likely
2011-08-07 4:09 ` Grant Likely
2011-08-07 4:09 ` Grant Likely
2011-08-16 16:33 ` Nicolas Ferre
2011-08-16 16:33 ` Nicolas Ferre
2011-08-16 16:33 ` Nicolas Ferre
2011-08-23 4:55 ` Koul, Vinod
2011-08-23 4:55 ` Koul, Vinod
2011-08-23 4:55 ` Koul, Vinod
2011-10-10 16:37 ` [PATCH 1/4] dmaengine: at_hdmac: platform data move to use .id_table Nicolas Ferre
2011-10-10 16:37 ` Nicolas Ferre
2011-10-10 16:37 ` Nicolas Ferre
2011-10-10 16:37 ` [PATCH 2/4] dmaengine: at_hdmac: add device tree support Nicolas Ferre
2011-10-10 16:37 ` Nicolas Ferre
2011-10-10 16:37 ` [PATCH 3/4] ARM: at91/dma: remove platform data from DMA controller Nicolas Ferre
2011-10-10 16:37 ` Nicolas Ferre
2011-10-10 16:37 ` Nicolas Ferre
2011-10-11 14:25 ` Vinod Koul
2011-10-11 14:25 ` Vinod Koul
2011-10-11 14:25 ` Vinod Koul
2011-10-10 16:37 ` [PATCH 4/4] ARM: at91/dma: DMA controller registering with DT support Nicolas Ferre
2011-10-10 16:37 ` Nicolas Ferre
2011-10-10 16:37 ` Nicolas Ferre
2011-10-10 16:43 ` [PATCH V2 " Nicolas Ferre
2011-10-10 16:43 ` Nicolas Ferre
2011-10-10 16:43 ` Nicolas Ferre
2011-10-11 11:16 ` Sergei Shtylyov [this message]
2011-10-11 11:16 ` Sergei Shtylyov
2011-10-11 14:16 ` [PATCH 1/4] dmaengine: at_hdmac: platform data move to use .id_table Vinod Koul
2011-10-11 14:16 ` Vinod Koul
2011-10-12 16:34 ` Nicolas Ferre
2011-10-12 16:34 ` Nicolas Ferre
2011-10-12 16:34 ` Nicolas Ferre
2011-10-12 16:52 ` Nicolas Ferre
2011-10-12 16:52 ` Nicolas Ferre
2011-10-12 16:52 ` Nicolas Ferre
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=4E942581.2050903@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--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.