* [PATCHv2] arm/tegra: clk_get should not be fatal
@ 2011-10-26 8:41 pdeschrijver
2011-10-27 16:03 ` Stephen Warren
0 siblings, 1 reply; 2+ messages in thread
From: pdeschrijver @ 2011-10-26 8:41 UTC (permalink / raw)
To: pdeschrijver
Cc: Colin Cross, Olof Johansson, Stephen Warren, Russell King,
linux-tegra, linux-arm-kernel, linux-kernel
From: Peter De Schrijver <pdeschrijver@nvidia.com>
The timer and rtc-timer clocks aren't gated by default, so there is no reason
to crash the system if the dummy enable call failed.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
---
arch/arm/mach-tegra/timer.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c
index e2272d2..2f1df47 100644
--- a/arch/arm/mach-tegra/timer.c
+++ b/arch/arm/mach-tegra/timer.c
@@ -186,16 +186,20 @@ static void __init tegra_init_timer(void)
int ret;
clk = clk_get_sys("timer", NULL);
- BUG_ON(IS_ERR(clk));
- clk_enable(clk);
+ if (IS_ERR(clk))
+ pr_warn("Unable to get timer clock\n");
+ else
+ clk_enable(clk);
/*
* rtc registers are used by read_persistent_clock, keep the rtc clock
* enabled
*/
clk = clk_get_sys("rtc-tegra", NULL);
- BUG_ON(IS_ERR(clk));
- clk_enable(clk);
+ if (IS_ERR(clk))
+ pr_warn("Unable to get rtc-tegra clock\n");
+ else
+ clk_enable(clk);
#ifdef CONFIG_HAVE_ARM_TWD
twd_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x600);
--
1.7.7.rc0.72.g4b5ea.dirty
^ permalink raw reply [flat|nested] 2+ messages in thread* RE: [PATCHv2] arm/tegra: clk_get should not be fatal
2011-10-26 8:41 [PATCHv2] arm/tegra: clk_get should not be fatal pdeschrijver
@ 2011-10-27 16:03 ` Stephen Warren
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2011-10-27 16:03 UTC (permalink / raw)
To: Peter De Schrijver, Peter De Schrijver
Cc: Colin Cross, Olof Johansson, Russell King, linux-tegra,
linux-arm-kernel, linux-kernel
pdeschrijver@nvidia.com wrote at Wednesday, October 26, 2011 2:42 AM:
> The timer and rtc-timer clocks aren't gated by default, so there is no reason
> to crash the system if the dummy enable call failed.
...
> clk = clk_get_sys("timer", NULL);
> - BUG_ON(IS_ERR(clk));
> - clk_enable(clk);
> + if (IS_ERR(clk))
> + pr_warn("Unable to get timer clock\n");
> + else
> + clk_enable(clk);
This seems reasonable to me, and is certainly required for Tegra30 support
until we get a full clock tree set up for Tegra30, which I think we'll
probably defer until the common clock infra-structure is in place.
Acked-by: Stephen Warren <swarren@nvidia.com>
--
nvpublic
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-27 16:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-26 8:41 [PATCHv2] arm/tegra: clk_get should not be fatal pdeschrijver
2011-10-27 16:03 ` Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®