* [PATCH v2] arm: omap2: timer: don't disable our timers
@ 2015-10-06 0:45 Felipe Balbi
2015-10-06 8:00 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2015-10-06 0:45 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v2] arm: omap2: timer: don't disable our timers 2015-10-06 0:45 [PATCH v2] arm: omap2: timer: don't disable our timers Felipe Balbi @ 2015-10-06 8:00 ` Tony Lindgren 2015-10-06 15:00 ` Felipe Balbi 0 siblings, 1 reply; 4+ messages in thread From: Tony Lindgren @ 2015-10-06 8:00 UTC (permalink / raw) To: linux-arm-kernel * Felipe Balbi <balbi@ti.com> [151005 17:49]: > We actually want these devices to be created because > we will be moving timers to drivers/clocksource and > this will prevent them from probing. Great. Is this safe to appy on it's own? We are not getting system timers re-inited to the default values? > 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. Yup. Regards, Tony ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] arm: omap2: timer: don't disable our timers 2015-10-06 8:00 ` Tony Lindgren @ 2015-10-06 15:00 ` Felipe Balbi 2015-10-06 16:09 ` Felipe Balbi 0 siblings, 1 reply; 4+ messages in thread From: Felipe Balbi @ 2015-10-06 15:00 UTC (permalink / raw) To: linux-arm-kernel Tony Lindgren <tony@atomide.com> writes: > * Felipe Balbi <balbi@ti.com> [151005 17:49]: >> We actually want these devices to be created because >> we will be moving timers to drivers/clocksource and >> this will prevent them from probing. > > Great. Is this safe to appy on it's own? We are not getting > system timers re-inited to the default values? not that I could notice. I booted on BBB and AM4. If you give me a few minutes I can boot again and save console logs for reference. -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151006/41c87994/attachment.sig> ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] arm: omap2: timer: don't disable our timers 2015-10-06 15:00 ` Felipe Balbi @ 2015-10-06 16:09 ` Felipe Balbi 0 siblings, 0 replies; 4+ messages in thread From: Felipe Balbi @ 2015-10-06 16:09 UTC (permalink / raw) To: linux-arm-kernel Felipe Balbi <balbi@ti.com> writes: > Tony Lindgren <tony@atomide.com> writes: > >> * Felipe Balbi <balbi@ti.com> [151005 17:49]: >>> We actually want these devices to be created because >>> we will be moving timers to drivers/clocksource and >>> this will prevent them from probing. >> >> Great. Is this safe to appy on it's own? We are not getting >> system timers re-inited to the default values? > > not that I could notice. I booted on BBB and AM4. If you give me a few > minutes I can boot again and save console logs for reference. found another dependency. This will have to be done only after my clocksource conversion is finished. Oh well -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151006/5a33c757/attachment.sig> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-06 16:09 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-06 0:45 [PATCH v2] arm: omap2: timer: don't disable our timers Felipe Balbi 2015-10-06 8:00 ` Tony Lindgren 2015-10-06 15:00 ` Felipe Balbi 2015-10-06 16:09 ` Felipe Balbi
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).