diff options
author | Vaibhav Hiremath <hvaibhav@ti.com> | 2012-05-09 13:07:05 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-05-09 13:07:05 -0400 |
commit | 187999119d93f584209400b052cf092141a33650 (patch) | |
tree | 8c1c90df099ef080a5913ca62b45bf65d97dc0c9 /arch/arm/mach-omap1/common.h | |
parent | bfd17879866b36e95c58721da070d9f2ac7f8901 (diff) |
ARM: OMAP1: Add checks for possible error condition in timer_init
On OMAP1, omap_32k_timer_init() function always returns "true",
irrespective of whether error occurred while initializing 32k sync
counter as a kernel clocksource or not and execution will never
fallback to mpu_timer clocksource init code.
This patch adds check for return value from function
omap_init_clocksource_32k(), and fallback to omap_mpu_timer_init()
in case of failure/error from omap_init_clocksource_32k().
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/common.h')
-rw-r--r-- | arch/arm/mach-omap1/common.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index af658ad338ec..1f7a4feca358 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h | |||
@@ -57,7 +57,14 @@ void omap1_init_irq(void); | |||
57 | void omap1_restart(char, const char *); | 57 | void omap1_restart(char, const char *); |
58 | 58 | ||
59 | extern struct sys_timer omap1_timer; | 59 | extern struct sys_timer omap1_timer; |
60 | extern bool omap_32k_timer_init(void); | 60 | #ifdef CONFIG_OMAP_32K_TIMER |
61 | extern int omap_32k_timer_init(void); | ||
62 | #else | ||
63 | static inline int __init omap_32k_timer_init(void) | ||
64 | { | ||
65 | return -ENODEV; | ||
66 | } | ||
67 | #endif | ||
61 | extern void __init omap_init_consistent_dma_size(void); | 68 | extern void __init omap_init_consistent_dma_size(void); |
62 | 69 | ||
63 | #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ | 70 | #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ |