diff options
author | Tony Lindgren <tony@atomide.com> | 2011-03-29 18:54:49 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-06-20 04:25:39 -0400 |
commit | 98e182a26bbbf5575457622337684ef61493e864 (patch) | |
tree | 85e56b2df1092c1854b00497b75ab79867ea2829 /arch/arm/mach-omap2 | |
parent | aa56188998942dfd1d6d85484c87f79268508bba (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')
-rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/timer-gp.c | 8 |
4 files changed, 1 insertions, 45 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 @@ | |||
41 | int omap2_pm_debug; | 40 | int omap2_pm_debug; |
42 | u32 enable_off_mode; | 41 | u32 enable_off_mode; |
43 | u32 sleep_while_idle; | 42 | u32 sleep_while_idle; |
44 | u32 wakeup_timer_seconds; | ||
45 | u32 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 | ||
165 | void 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; |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 45bcfce77352..c3a367e3d010 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -60,19 +60,13 @@ inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params) | |||
60 | extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); | 60 | extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); |
61 | extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); | 61 | extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); |
62 | 62 | ||
63 | extern u32 wakeup_timer_seconds; | ||
64 | extern u32 wakeup_timer_milliseconds; | ||
65 | extern struct omap_dm_timer *gptimer_wakeup; | ||
66 | |||
67 | #ifdef CONFIG_PM_DEBUG | 63 | #ifdef CONFIG_PM_DEBUG |
68 | extern void omap2_pm_dump(int mode, int resume, unsigned int us); | 64 | extern void omap2_pm_dump(int mode, int resume, unsigned int us); |
69 | extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds); | ||
70 | extern int omap2_pm_debug; | 65 | extern int omap2_pm_debug; |
71 | extern u32 enable_off_mode; | 66 | extern u32 enable_off_mode; |
72 | extern u32 sleep_while_idle; | 67 | extern u32 sleep_while_idle; |
73 | #else | 68 | #else |
74 | #define omap2_pm_dump(mode, resume, us) do {} while (0); | 69 | #define omap2_pm_dump(mode, resume, us) do {} while (0); |
75 | #define omap2_pm_wakeup_on_timer(seconds, milliseconds) do {} while (0); | ||
76 | #define omap2_pm_debug 0 | 70 | #define omap2_pm_debug 0 |
77 | #define enable_off_mode 0 | 71 | #define enable_off_mode 0 |
78 | #define sleep_while_idle 0 | 72 | #define sleep_while_idle 0 |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index c155c9d1c82c..4cb636af7045 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -534,10 +534,6 @@ static int omap3_pm_suspend(void) | |||
534 | struct power_state *pwrst; | 534 | struct power_state *pwrst; |
535 | int state, ret = 0; | 535 | int state, ret = 0; |
536 | 536 | ||
537 | if (wakeup_timer_seconds || wakeup_timer_milliseconds) | ||
538 | omap2_pm_wakeup_on_timer(wakeup_timer_seconds, | ||
539 | wakeup_timer_milliseconds); | ||
540 | |||
541 | /* Read current next_pwrsts */ | 537 | /* Read current next_pwrsts */ |
542 | list_for_each_entry(pwrst, &pwrst_list, node) | 538 | list_for_each_entry(pwrst, &pwrst_list, node) |
543 | pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); | 539 | pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 62c0d5cb25f7..578e9df4fdea 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -72,11 +72,9 @@ | |||
72 | /* Clockevent code */ | 72 | /* Clockevent code */ |
73 | 73 | ||
74 | static struct omap_dm_timer clkev; | 74 | static struct omap_dm_timer clkev; |
75 | static struct omap_dm_timer *gptimer; | ||
76 | static struct clock_event_device clockevent_gpt; | 75 | static struct clock_event_device clockevent_gpt; |
77 | static u8 __initdata gptimer_id = 1; | 76 | static u8 __initdata gptimer_id = 1; |
78 | static u8 __initdata inited; | 77 | static u8 __initdata inited; |
79 | struct omap_dm_timer *gptimer_wakeup; | ||
80 | 78 | ||
81 | static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) | 79 | static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) |
82 | { | 80 | { |
@@ -218,10 +216,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
218 | 216 | ||
219 | timer->reserved = 1; | 217 | timer->reserved = 1; |
220 | 218 | ||
221 | gptimer = omap_dm_timer_request_specific(gptimer_id); | ||
222 | BUG_ON(gptimer == NULL); | ||
223 | gptimer_wakeup = gptimer; | ||
224 | |||
225 | return res; | 219 | return res; |
226 | } | 220 | } |
227 | 221 | ||
@@ -235,7 +229,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id, | |||
235 | res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source); | 229 | res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source); |
236 | BUG_ON(res); | 230 | BUG_ON(res); |
237 | 231 | ||
238 | omap2_gp_timer_irq.dev_id = (void *)gptimer; | 232 | omap2_gp_timer_irq.dev_id = (void *)&clkev; |
239 | setup_irq(clkev.irq, &omap2_gp_timer_irq); | 233 | setup_irq(clkev.irq, &omap2_gp_timer_irq); |
240 | 234 | ||
241 | __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW); | 235 | __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW); |