From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: omap2: timer: don't disable our timers
Date: Mon, 5 Oct 2015 19:45:32 -0500 [thread overview]
Message-ID: <1444092332-9011-1-git-send-email-balbi@ti.com> (raw)
We actually want these devices to be created because
we will be moving timers to drivers/clocksource and
this will prevent them from probing.
The only situation where we want secure timers to be
actually disabled is when we *know* we're running on
non-GP (read: HS or EMU) chips, because the secure
timer will NOT be available for the public world.
This patch is just moving the call to of_add_property
to its rightful place.
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
Okay, seems like this is a saner approach.
changes since v1:
- don't completely remove the status disabled trick, just limit it to
non-GP chips
arch/arm/mach-omap2/timer.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 0ff676273b4b..0bd3ee4552de 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -161,9 +161,7 @@ static const struct of_device_id omap_timer_match[] __initconst = {
*
* Helper function to get a timer during early boot using device-tree for use
* as kernel system timer. Optionally, the property argument can be used to
- * select a timer with a specific property. Once a timer is found then mark
- * the timer node in device-tree as disabled, to prevent the kernel from
- * registering this timer as a platform device and so no one else can use it.
+ * select a timer with a specific property.
*/
static struct device_node * __init omap_get_timer_dt(const struct of_device_id *match,
const char *property)
@@ -182,8 +180,6 @@ static struct device_node * __init omap_get_timer_dt(const struct of_device_id *
of_get_property(np, "ti,timer-pwm", NULL) ||
of_get_property(np, "ti,timer-secure", NULL)))
continue;
-
- of_add_property(np, &device_disabled);
return np;
}
@@ -208,7 +204,10 @@ static void __init omap_dmtimer_init(void)
/* If we are a secure device, remove any secure timer nodes */
if ((omap_type() != OMAP2_DEVICE_TYPE_GP)) {
np = omap_get_timer_dt(omap_timer_match, "ti,timer-secure");
- of_node_put(np);
+ if (np) {
+ of_add_property(np, &device_disabled);
+ of_node_put(np);
+ }
}
}
--
2.5.3
next reply other threads:[~2015-10-06 0:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 0:45 Felipe Balbi [this message]
2015-10-06 8:00 ` [PATCH v2] arm: omap2: timer: don't disable our timers Tony Lindgren
2015-10-06 15:00 ` Felipe Balbi
2015-10-06 16:09 ` Felipe Balbi
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=1444092332-9011-1-git-send-email-balbi@ti.com \
--to=balbi@ti.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 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).