aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r--arch/arm/mach-omap2/pm.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 331478f9b864..f4b3143a8b1d 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -40,6 +40,38 @@ static struct omap_device_pm_latency *pm_lats;
40 */ 40 */
41int (*omap_pm_suspend)(void); 41int (*omap_pm_suspend)(void);
42 42
43#ifdef CONFIG_PM
44/**
45 * struct omap2_oscillator - Describe the board main oscillator latencies
46 * @startup_time: oscillator startup latency
47 * @shutdown_time: oscillator shutdown latency
48 */
49struct omap2_oscillator {
50 u32 startup_time;
51 u32 shutdown_time;
52};
53
54static struct omap2_oscillator oscillator = {
55 .startup_time = ULONG_MAX,
56 .shutdown_time = ULONG_MAX,
57};
58
59void omap_pm_setup_oscillator(u32 tstart, u32 tshut)
60{
61 oscillator.startup_time = tstart;
62 oscillator.shutdown_time = tshut;
63}
64
65void omap_pm_get_oscillator(u32 *tstart, u32 *tshut)
66{
67 if (!tstart || !tshut)
68 return;
69
70 *tstart = oscillator.startup_time;
71 *tshut = oscillator.shutdown_time;
72}
73#endif
74
43static int __init _init_omap_device(char *name) 75static int __init _init_omap_device(char *name)
44{ 76{
45 struct omap_hwmod *oh; 77 struct omap_hwmod *oh;