|
@@ -31,6 +31,7 @@
|
|
#include <plat/board.h>
|
|
#include <plat/board.h>
|
|
#include <plat/powerdomain.h>
|
|
#include <plat/powerdomain.h>
|
|
#include <plat/clockdomain.h>
|
|
#include <plat/clockdomain.h>
|
|
|
|
+#include <plat/dmtimer.h>
|
|
|
|
|
|
#include "prm.h"
|
|
#include "prm.h"
|
|
#include "cm.h"
|
|
#include "cm.h"
|
|
@@ -353,6 +354,23 @@ void pm_dbg_update_time(struct powerdomain *pwrdm, int prev)
|
|
pwrdm->timer = t;
|
|
pwrdm->timer = t;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds)
|
|
|
|
+{
|
|
|
|
+ u32 tick_rate, cycles;
|
|
|
|
+
|
|
|
|
+ if (!seconds && !milliseconds)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer_wakeup));
|
|
|
|
+ cycles = tick_rate * seconds + tick_rate * milliseconds / 1000;
|
|
|
|
+ omap_dm_timer_stop(gptimer_wakeup);
|
|
|
|
+ omap_dm_timer_set_load_start(gptimer_wakeup, 0, 0xffffffff - cycles);
|
|
|
|
+
|
|
|
|
+ pr_info("PM: Resume timer in %u.%03u secs"
|
|
|
|
+ " (%d ticks at %d ticks/sec.)\n",
|
|
|
|
+ seconds, milliseconds, cycles, tick_rate);
|
|
|
|
+}
|
|
|
|
+
|
|
static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user)
|
|
static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user)
|
|
{
|
|
{
|
|
struct seq_file *s = (struct seq_file *)user;
|
|
struct seq_file *s = (struct seq_file *)user;
|