From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v4 4/4] dt: add amba device creation to platform bus scan
Date: Fri, 10 Jun 2011 16:39:02 -0600 [thread overview]
Message-ID: <20110610223902.GF28994@ponder.secretlab.ca> (raw)
In-Reply-To: <1307738923-7564-5-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Fri, Jun 10, 2011 at 03:48:43PM -0500, Rob Herring wrote:
> From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
>
> Add support to the platform bus scanning to call custom device creation
> function for amba devices.
>
> Cc: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> Cc: arnd-r2nGTMty4D4@public.gmane.org
> Signed-off-by: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> ---
> drivers/of/platform.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 8d0f477..1712f22 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -21,6 +21,7 @@
> #include <linux/of_irq.h>
> #include <linux/of_platform.h>
> #include <linux/platform_device.h>
> +#include <linux/amba/bus.h>
>
> static int of_dev_node_match(struct device *dev, void *data)
> {
> @@ -234,6 +235,11 @@ static int of_platform_bus_create(struct device_node *bus,
> return 0;
> }
>
> + if (of_device_is_compatible(bus, "arm,amba-device")) {
> + of_amba_device_create(bus, parent);
> + return 0;
> + }
> +
Yeah, this is the right thing to do. I'll pick it up.
> dev = of_platform_device_create(bus, NULL, parent);
> if (!dev || !of_match_node(matches, bus))
> return 0;
> --
> 1.7.4.1
>
prev parent reply other threads:[~2011-06-10 22:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 20:48 [PATCH v4 0/4] amba bus devicetree probing Rob Herring
[not found] ` <1307738923-7564-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-06-10 20:48 ` [PATCH v4 1/4] dt: check root nodes for match on of_platform_populate Rob Herring
[not found] ` <1307738923-7564-2-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-06-10 21:06 ` Arnd Bergmann
[not found] ` <201106102306.48426.arnd-r2nGTMty4D4@public.gmane.org>
2011-06-10 21:11 ` Grant Likely
[not found] ` <20110610211119.GA28994-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-06-10 21:17 ` Arnd Bergmann
2011-06-10 21:13 ` Grant Likely
2011-06-10 20:48 ` [PATCH v4 2/4] dt: add EXPORT_SYMBOL to of_platform_populate Rob Herring
[not found] ` <1307738923-7564-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-06-10 21:37 ` Grant Likely
[not found] ` <20110610213756.GC28994-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-06-10 22:44 ` Rob Herring
[not found] ` <4DF29E5F.8030307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-06-10 23:12 ` Grant Likely
2011-06-10 20:48 ` [PATCH v4 3/4] drivers/amba: create devices from device tree Rob Herring
[not found] ` <1307738923-7564-4-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-06-10 21:04 ` Arnd Bergmann
[not found] ` <201106102304.06279.arnd-r2nGTMty4D4@public.gmane.org>
2011-06-10 22:30 ` Grant Likely
2011-06-10 22:22 ` Grant Likely
[not found] ` <20110610222236.GD28994-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-06-10 22:37 ` Rob Herring
[not found] ` <4DF29CB1.9070701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-06-10 23:11 ` Grant Likely
2011-06-10 20:48 ` [PATCH v4 4/4] dt: add amba device creation to platform bus scan Rob Herring
[not found] ` <1307738923-7564-5-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-06-10 21:02 ` Arnd Bergmann
2011-06-10 22:39 ` Grant Likely [this message]
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=20110610223902.GF28994@ponder.secretlab.ca \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).