Commit 98e182a2 authored by Tony Lindgren's avatar Tony Lindgren

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: default avatarTony Lindgren <tony@atomide.com>
Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
parent aa561889
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <plat/board.h> #include <plat/board.h>
#include "powerdomain.h" #include "powerdomain.h"
#include "clockdomain.h" #include "clockdomain.h"
#include <plat/dmtimer.h>
#include <plat/omap-pm.h> #include <plat/omap-pm.h>
#include "cm2xxx_3xxx.h" #include "cm2xxx_3xxx.h"
...@@ -41,8 +40,6 @@ ...@@ -41,8 +40,6 @@
int omap2_pm_debug; int omap2_pm_debug;
u32 enable_off_mode; u32 enable_off_mode;
u32 sleep_while_idle; u32 sleep_while_idle;
u32 wakeup_timer_seconds;
u32 wakeup_timer_milliseconds;
#define DUMP_PRM_MOD_REG(mod, reg) \ #define DUMP_PRM_MOD_REG(mod, reg) \
regs[reg_count].name = #mod "." #reg; \ regs[reg_count].name = #mod "." #reg; \
...@@ -162,23 +159,6 @@ void omap2_pm_dump(int mode, int resume, unsigned int us) ...@@ -162,23 +159,6 @@ void omap2_pm_dump(int mode, int resume, unsigned int us)
printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val); printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val);
} }
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);
}
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
...@@ -576,9 +556,6 @@ static int option_set(void *data, u64 val) ...@@ -576,9 +556,6 @@ static int option_set(void *data, u64 val)
{ {
u32 *option = data; u32 *option = data;
if (option == &wakeup_timer_milliseconds && val >= 1000)
return -EINVAL;
*option = val; *option = val;
if (option == &enable_off_mode) { if (option == &enable_off_mode) {
...@@ -641,11 +618,6 @@ static int __init pm_dbg_init(void) ...@@ -641,11 +618,6 @@ static int __init pm_dbg_init(void)
&enable_off_mode, &pm_dbg_option_fops); &enable_off_mode, &pm_dbg_option_fops);
(void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d, (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d,
&sleep_while_idle, &pm_dbg_option_fops); &sleep_while_idle, &pm_dbg_option_fops);
(void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d,
&wakeup_timer_seconds, &pm_dbg_option_fops);
(void) debugfs_create_file("wakeup_timer_milliseconds",
S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds,
&pm_dbg_option_fops);
pm_dbg_init_done = 1; pm_dbg_init_done = 1;
return 0; return 0;
......
...@@ -60,19 +60,13 @@ inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params) ...@@ -60,19 +60,13 @@ inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params)
extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
extern u32 wakeup_timer_seconds;
extern u32 wakeup_timer_milliseconds;
extern struct omap_dm_timer *gptimer_wakeup;
#ifdef CONFIG_PM_DEBUG #ifdef CONFIG_PM_DEBUG
extern void omap2_pm_dump(int mode, int resume, unsigned int us); extern void omap2_pm_dump(int mode, int resume, unsigned int us);
extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds);
extern int omap2_pm_debug; extern int omap2_pm_debug;
extern u32 enable_off_mode; extern u32 enable_off_mode;
extern u32 sleep_while_idle; extern u32 sleep_while_idle;
#else #else
#define omap2_pm_dump(mode, resume, us) do {} while (0); #define omap2_pm_dump(mode, resume, us) do {} while (0);
#define omap2_pm_wakeup_on_timer(seconds, milliseconds) do {} while (0);
#define omap2_pm_debug 0 #define omap2_pm_debug 0
#define enable_off_mode 0 #define enable_off_mode 0
#define sleep_while_idle 0 #define sleep_while_idle 0
......
...@@ -534,10 +534,6 @@ static int omap3_pm_suspend(void) ...@@ -534,10 +534,6 @@ static int omap3_pm_suspend(void)
struct power_state *pwrst; struct power_state *pwrst;
int state, ret = 0; int state, ret = 0;
if (wakeup_timer_seconds || wakeup_timer_milliseconds)
omap2_pm_wakeup_on_timer(wakeup_timer_seconds,
wakeup_timer_milliseconds);
/* Read current next_pwrsts */ /* Read current next_pwrsts */
list_for_each_entry(pwrst, &pwrst_list, node) list_for_each_entry(pwrst, &pwrst_list, node)
pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm);
......
...@@ -72,11 +72,9 @@ ...@@ -72,11 +72,9 @@
/* Clockevent code */ /* Clockevent code */
static struct omap_dm_timer clkev; static struct omap_dm_timer clkev;
static struct omap_dm_timer *gptimer;
static struct clock_event_device clockevent_gpt; static struct clock_event_device clockevent_gpt;
static u8 __initdata gptimer_id = 1; static u8 __initdata gptimer_id = 1;
static u8 __initdata inited; static u8 __initdata inited;
struct omap_dm_timer *gptimer_wakeup;
static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
{ {
...@@ -218,10 +216,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, ...@@ -218,10 +216,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
timer->reserved = 1; timer->reserved = 1;
gptimer = omap_dm_timer_request_specific(gptimer_id);
BUG_ON(gptimer == NULL);
gptimer_wakeup = gptimer;
return res; return res;
} }
...@@ -235,7 +229,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id, ...@@ -235,7 +229,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source); res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
BUG_ON(res); BUG_ON(res);
omap2_gp_timer_irq.dev_id = (void *)gptimer; omap2_gp_timer_irq.dev_id = (void *)&clkev;
setup_irq(clkev.irq, &omap2_gp_timer_irq); setup_irq(clkev.irq, &omap2_gp_timer_irq);
__omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW); __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
*/ */
#define OMAP_TIMER_IP_VERSION_1 0x1 #define OMAP_TIMER_IP_VERSION_1 0x1
struct omap_dm_timer; struct omap_dm_timer;
extern struct omap_dm_timer *gptimer_wakeup;
struct clk; struct clk;
int omap_dm_timer_init(void); int omap_dm_timer_init(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment