From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
To: Grant Likely <grant.likely@linaro.org>,
Rob Herring <robherring2@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Vivek Goyal <vgoyal@redhat.com>,
Jakub Sitnicki <jsitnicki@gmail.com>,
Mike Travis <travis@sgi.com>,
Jiang Liu <jiang.liu@linux.intel.com>,
Thierry Reding <treding@nvidia.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org, Tejun Heo <tj@kernel.org>,
Cliff Wickman <cpw@sgi.com>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Subject: [PATCH 2/2] of/platform: Mark all device tree resources as SHARED
Date: Fri, 5 Jun 2015 12:51:18 +0200 [thread overview]
Message-ID: <1433501478-15164-2-git-send-email-ricardo.ribalda@gmail.com> (raw)
In-Reply-To: <1433501478-15164-1-git-send-email-ricardo.ribalda@gmail.com>
Some device tree platform do not define their resources properly. i.e.
overlapping or repeated resources.
This patch mark all device tree resources as shareable.
In the future this should only be set for the platforms that have
problems.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
drivers/of/platform.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ddf8e42c9367..89cb502f8812 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -136,6 +136,8 @@ struct platform_device *of_device_alloc(struct device_node *np,
if (of_irq_to_resource_table(np, res, num_irq) != num_irq)
pr_debug("not all legacy IRQ resources mapped for %s\n",
np->name);
+ for (i = 0; i < num_reg + num_irq; i++, res++)
+ dev->resource[i].flags |= IORESOURCE_SHARED;
}
dev->dev.of_node = of_node_get(np);
--
2.1.4
next prev parent reply other threads:[~2015-06-05 10:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 10:51 [PATCH 1/2] kernel/resource: Add new flag IORESOURCE_SHARED Ricardo Ribalda Delgado
2015-06-05 10:51 ` Ricardo Ribalda Delgado [this message]
[not found] ` <1433501478-15164-2-git-send-email-ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-05 16:45 ` [PATCH 2/2] of/platform: Mark all device tree resources as SHARED Rob Herring
[not found] ` <CAL_JsqLOqpP4E5mG5t5RvaTs96jLC=umY2cUQEhyZiWJNOt1nQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-05 16:51 ` Ricardo Ribalda Delgado
[not found] ` <CAPybu_0s=9yTFH5jngh6=Zuz0iia0F1RU6AsLi-vcWNrF3-qYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-07 14:01 ` Grant Likely
[not found] ` <1433501478-15164-1-git-send-email-ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-08 18:23 ` [PATCH 1/2] kernel/resource: Add new flag IORESOURCE_SHARED Grant Likely
[not found] ` <20150608182310.1F13FC406AA-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2015-06-08 20:02 ` Ricardo Ribalda Delgado
[not found] ` <CAPybu_2-EZoMEkWR9BoRfzGBevxCp-sd+CiVK2DhRjLoy5Pfyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-09 11:13 ` Grant Likely
2015-06-09 12:30 ` Ricardo Ribalda Delgado
[not found] ` <20150609111320.F299FC40580-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2015-06-09 12:33 ` Ricardo Ribalda Delgado
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=1433501478-15164-2-git-send-email-ricardo.ribalda@gmail.com \
--to=ricardo.ribalda@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=cpw@sgi.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jiang.liu@linux.intel.com \
--cc=jsitnicki@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=robherring2@gmail.com \
--cc=tj@kernel.org \
--cc=travis@sgi.com \
--cc=treding@nvidia.com \
--cc=vgoyal@redhat.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 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).