aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/pm.c30
-rw-r--r--arch/arm/mach-omap2/pm.h8
2 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index ea61c32957bd..109a02e02d72 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -39,6 +39,36 @@ static struct omap_device_pm_latency *pm_lats;
39 */ 39 */
40int (*omap_pm_suspend)(void); 40int (*omap_pm_suspend)(void);
41 41
42/**
43 * struct omap2_oscillator - Describe the board main oscillator latencies
44 * @startup_time: oscillator startup latency
45 * @shutdown_time: oscillator shutdown latency
46 */
47struct omap2_oscillator {
48 u32 startup_time;
49 u32 shutdown_time;
50};
51
52static struct omap2_oscillator oscillator = {
53 .startup_time = ULONG_MAX,
54 .shutdown_time = ULONG_MAX,
55};
56
57void omap_pm_setup_oscillator(u32 tstart, u32 tshut)
58{
59 oscillator.startup_time = tstart;
60 oscillator.shutdown_time = tshut;
61}
62
63void omap_pm_get_oscillator(u32 *tstart, u32 *tshut)
64{
65 if (!tstart || !tshut)
66 return;
67
68 *tstart = oscillator.startup_time;
69 *tshut = oscillator.shutdown_time;
70}
71
42static int __init _init_omap_device(char *name) 72static int __init _init_omap_device(char *name)
43{ 73{
44 struct omap_hwmod *oh; 74 struct omap_hwmod *oh;
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 67d66131cfa7..429028852103 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -129,4 +129,12 @@ static inline int omap4_twl_init(void)
129} 129}
130#endif 130#endif
131 131
132#ifdef CONFIG_PM
133extern void omap_pm_setup_oscillator(u32 tstart, u32 tshut);
134extern void omap_pm_get_oscillator(u32 *tstart, u32 *tshut);
135#else
136static inline void omap_pm_setup_oscillator(u32 tstart, u32 tshut) { }
137static inline void omap_pm_get_oscillator(u32 *tstart, u32 *tshut) { }
138#endif
139
132#endif 140#endif