aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm-debug.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2011-03-29 18:54:49 -0400
committerTony Lindgren <tony@atomide.com>2011-06-20 04:25:39 -0400
commit98e182a26bbbf5575457622337684ef61493e864 (patch)
tree85e56b2df1092c1854b00497b75ab79867ea2829 /arch/arm/mach-omap2/pm-debug.c
parentaa56188998942dfd1d6d85484c87f79268508bba (diff)
omap2+: Remove gptimer_wakeup for now
This removes the support for setting the wake-up timer for debugging. Later on we can reserve gptimer1 for PM code only and have similar functionality. Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm-debug.c')
-rw-r--r--arch/arm/mach-omap2/pm-debug.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index a5a83b358ddd..c56d1d47fec4 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -31,7 +31,6 @@
31#include <plat/board.h> 31#include <plat/board.h>
32#include "powerdomain.h" 32#include "powerdomain.h"
33#include "clockdomain.h" 33#include "clockdomain.h"
34#include <plat/dmtimer.h>
35#include <plat/omap-pm.h> 34#include <plat/omap-pm.h>
36 35
37#include "cm2xxx_3xxx.h" 36#include "cm2xxx_3xxx.h"
@@ -41,8 +40,6 @@
41int omap2_pm_debug; 40int omap2_pm_debug;
42u32 enable_off_mode; 41u32 enable_off_mode;
43u32 sleep_while_idle; 42u32 sleep_while_idle;
44u32 wakeup_timer_seconds;
45u32 wakeup_timer_milliseconds;
46 43
47#define DUMP_PRM_MOD_REG(mod, reg) \ 44#define DUMP_PRM_MOD_REG(mod, reg) \
48 regs[reg_count].name = #mod "." #reg; \ 45 regs[reg_count].name = #mod "." #reg; \
@@ -162,23 +159,6 @@ void omap2_pm_dump(int mode, int resume, unsigned int us)
162 printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val); 159 printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val);
163} 160}
164 161
165void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds)
166{
167 u32 tick_rate, cycles;
168
169 if (!seconds && !milliseconds)
170 return;
171
172 tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer_wakeup));
173 cycles = tick_rate * seconds + tick_rate * milliseconds / 1000;
174 omap_dm_timer_stop(gptimer_wakeup);
175 omap_dm_timer_set_load_start(gptimer_wakeup, 0, 0xffffffff - cycles);
176
177 pr_info("PM: Resume timer in %u.%03u secs"
178 " (%d ticks at %d ticks/sec.)\n",
179 seconds, milliseconds, cycles, tick_rate);
180}
181
182#ifdef CONFIG_DEBUG_FS 162#ifdef CONFIG_DEBUG_FS
183#include <linux/debugfs.h> 163#include <linux/debugfs.h>
184#include <linux/seq_file.h> 164#include <linux/seq_file.h>
@@ -576,9 +556,6 @@ static int option_set(void *data, u64 val)
576{ 556{
577 u32 *option = data; 557 u32 *option = data;
578 558
579 if (option == &wakeup_timer_milliseconds && val >= 1000)
580 return -EINVAL;
581
582 *option = val; 559 *option = val;
583 560
584 if (option == &enable_off_mode) { 561 if (option == &enable_off_mode) {
@@ -641,11 +618,6 @@ static int __init pm_dbg_init(void)
641 &enable_off_mode, &pm_dbg_option_fops); 618 &enable_off_mode, &pm_dbg_option_fops);
642 (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d, 619 (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d,
643 &sleep_while_idle, &pm_dbg_option_fops); 620 &sleep_while_idle, &pm_dbg_option_fops);
644 (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d,
645 &wakeup_timer_seconds, &pm_dbg_option_fops);
646 (void) debugfs_create_file("wakeup_timer_milliseconds",
647 S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds,
648 &pm_dbg_option_fops);
649 pm_dbg_init_done = 1; 621 pm_dbg_init_done = 1;
650 622
651 return 0; 623 return 0;