summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/pm.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-11-07 01:06:37 (GMT)
committerTony Lindgren <tony@atomide.com>2012-11-07 01:06:37 (GMT)
commit46bf4a562207c5ebd24e1dde5e5ee326cd3d6b91 (patch)
treed44b14736a46cd0d4270460fd6590a6d07c40730 /arch/arm/mach-omap2/pm.c
parentb197adabbd2f71c966b4bd89cca5a54a2def03e2 (diff)
parentdf7cded30ced539d3b4e6bae9f3011d98c069d41 (diff)
downloadlinux-fsl-qoriq-46bf4a562207c5ebd24e1dde5e5ee326cd3d6b91.tar.xz
Merge tag 'for_3.8-pm-voltage' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-v3.8/pm
OMAP voltage layer updates towards supporting auto-retention/auto-off
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r--arch/arm/mach-omap2/pm.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index ea61c32..109a02e 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;
*/
int (*omap_pm_suspend)(void);
+/**
+ * struct omap2_oscillator - Describe the board main oscillator latencies
+ * @startup_time: oscillator startup latency
+ * @shutdown_time: oscillator shutdown latency
+ */
+struct omap2_oscillator {
+ u32 startup_time;
+ u32 shutdown_time;
+};
+
+static struct omap2_oscillator oscillator = {
+ .startup_time = ULONG_MAX,
+ .shutdown_time = ULONG_MAX,
+};
+
+void omap_pm_setup_oscillator(u32 tstart, u32 tshut)
+{
+ oscillator.startup_time = tstart;
+ oscillator.shutdown_time = tshut;
+}
+
+void omap_pm_get_oscillator(u32 *tstart, u32 *tshut)
+{
+ if (!tstart || !tshut)
+ return;
+
+ *tstart = oscillator.startup_time;
+ *tshut = oscillator.shutdown_time;
+}
+
static int __init _init_omap_device(char *name)
{
struct omap_hwmod *oh;