From: Felipe Balbi <balbi@ti.com>
To: Jon Hunter <jon-hunter@ti.com>
Cc: Rob Herring <rob.herring@calxeda.com>,
Grant Likely <grant.likely@secretlab.ca>,
Tony Lindgren <tony@atomide.com>,
Benoit Cousson <b-cousson@ti.com>,
Vinod Koul <vinod.koul@intel.com>,
Russell King <linux@arm.linux.org.uk>,
device-tree <devicetree-discuss@lists.ozlabs.org>,
linux-omap <linux-omap@vger.kernel.org>,
linux-arm <linux-arm-kernel@lists.infradead.org>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Matt Porter <mporter@ti.com>, Felipe Balbi <balbi@ti.com>,
Sourav Poddar <sourav.poddar@ti.com>,
Balaji T K <balajitk@ti.com>
Subject: Re: [PATCH V2 2/2] dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
Date: Fri, 8 Feb 2013 09:55:52 +0200 [thread overview]
Message-ID: <20130208075552.GD21879@arwen.pp.htv.fi> (raw)
In-Reply-To: <1360285506-22354-3-git-send-email-jon-hunter@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]
Hi,
On Thu, Feb 07, 2013 at 07:05:06PM -0600, Jon Hunter wrote:
> If the device-tree blob is present during boot, then register the SDMA
> controller with the device-tree DMA driver so that we can use device-tree
> to look-up DMA client information.
>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
single comment below, other than that:
Reviewed-by: Felipe Balbi <balbi@ti.com>
> ---
> arch/arm/mach-omap2/dma.c | 4 ++++
> drivers/dma/omap-dma.c | 37 +++++++++++++++++++++++++++++++++++--
> 2 files changed, 39 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
> index 5cd8d76..71dadff 100644
> --- a/arch/arm/mach-omap2/dma.c
> +++ b/arch/arm/mach-omap2/dma.c
> @@ -28,6 +28,7 @@
> #include <linux/init.h>
> #include <linux/device.h>
> #include <linux/dma-mapping.h>
> +#include <linux/of.h>
> #include <linux/omap-dma.h>
>
> #include "soc.h"
> @@ -304,6 +305,9 @@ static int __init omap2_system_dma_init(void)
> if (res)
> return res;
>
> + if (of_have_populated_dt())
> + return res;
> +
> pdev = platform_device_register_full(&omap_dma_dev_info);
> if (IS_ERR(pdev))
> return PTR_ERR(pdev);
> diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
> index c4b4fd2..0067bd0 100644
> --- a/drivers/dma/omap-dma.c
> +++ b/drivers/dma/omap-dma.c
> @@ -16,6 +16,8 @@
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/spinlock.h>
> +#include <linux/of_dma.h>
> +#include <linux/of_device.h>
>
> #include "virt-dma.h"
>
> @@ -67,6 +69,8 @@ static const unsigned es_bytes[] = {
> [OMAP_DMA_DATA_TYPE_S32] = 4,
> };
>
> +static struct of_dma_filter_info info;
Arnd also mentioned that since all fields belonging to this are
constant, you could statically initialize them here. He also mentioned
you should call this by a more descriptive name:
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 2/2] dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver
Date: Fri, 8 Feb 2013 09:55:52 +0200 [thread overview]
Message-ID: <20130208075552.GD21879@arwen.pp.htv.fi> (raw)
In-Reply-To: <1360285506-22354-3-git-send-email-jon-hunter@ti.com>
Hi,
On Thu, Feb 07, 2013 at 07:05:06PM -0600, Jon Hunter wrote:
> If the device-tree blob is present during boot, then register the SDMA
> controller with the device-tree DMA driver so that we can use device-tree
> to look-up DMA client information.
>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
single comment below, other than that:
Reviewed-by: Felipe Balbi <balbi@ti.com>
> ---
> arch/arm/mach-omap2/dma.c | 4 ++++
> drivers/dma/omap-dma.c | 37 +++++++++++++++++++++++++++++++++++--
> 2 files changed, 39 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
> index 5cd8d76..71dadff 100644
> --- a/arch/arm/mach-omap2/dma.c
> +++ b/arch/arm/mach-omap2/dma.c
> @@ -28,6 +28,7 @@
> #include <linux/init.h>
> #include <linux/device.h>
> #include <linux/dma-mapping.h>
> +#include <linux/of.h>
> #include <linux/omap-dma.h>
>
> #include "soc.h"
> @@ -304,6 +305,9 @@ static int __init omap2_system_dma_init(void)
> if (res)
> return res;
>
> + if (of_have_populated_dt())
> + return res;
> +
> pdev = platform_device_register_full(&omap_dma_dev_info);
> if (IS_ERR(pdev))
> return PTR_ERR(pdev);
> diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
> index c4b4fd2..0067bd0 100644
> --- a/drivers/dma/omap-dma.c
> +++ b/drivers/dma/omap-dma.c
> @@ -16,6 +16,8 @@
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/spinlock.h>
> +#include <linux/of_dma.h>
> +#include <linux/of_device.h>
>
> #include "virt-dma.h"
>
> @@ -67,6 +69,8 @@ static const unsigned es_bytes[] = {
> [OMAP_DMA_DATA_TYPE_S32] = 4,
> };
>
> +static struct of_dma_filter_info info;
Arnd also mentioned that since all fields belonging to this are
constant, you could statically initialize them here. He also mentioned
you should call this by a more descriptive name:
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130208/40ae99ac/attachment.sig>
next prev parent reply other threads:[~2013-02-08 7:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 1:05 [PATCH V2 0/2] ARM: dts: Add DT bindings for OMAP SDMA Jon Hunter
2013-02-08 1:05 ` Jon Hunter
2013-02-08 1:05 ` [PATCH V2 1/2] ARM: dts: OMAP2+: Add SDMA controller bindings and nodes Jon Hunter
2013-02-08 1:05 ` Jon Hunter
2013-02-08 7:53 ` Felipe Balbi
2013-02-08 7:53 ` Felipe Balbi
[not found] ` <1360285506-22354-1-git-send-email-jon-hunter-l0cyMroinI0@public.gmane.org>
2013-02-08 1:05 ` [PATCH V2 2/2] dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver Jon Hunter
2013-02-08 1:05 ` Jon Hunter
2013-02-08 7:55 ` Felipe Balbi [this message]
2013-02-08 7:55 ` Felipe Balbi
[not found] ` <20130208075552.GD21879-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-02-08 15:05 ` Jon Hunter
2013-02-08 15:05 ` Jon Hunter
2013-02-08 9:28 ` [PATCH V2 0/2] ARM: dts: Add DT bindings for OMAP SDMA Santosh Shilimkar
2013-02-08 9:28 ` Santosh Shilimkar
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=20130208075552.GD21879@arwen.pp.htv.fi \
--to=balbi@ti.com \
--cc=b-cousson@ti.com \
--cc=balajitk@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=jon-hunter@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mporter@ti.com \
--cc=rob.herring@calxeda.com \
--cc=santosh.shilimkar@ti.com \
--cc=sourav.poddar@ti.com \
--cc=tony@atomide.com \
--cc=vinod.koul@intel.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.