diff options
author | Thara Gopinath <thara@ti.com> | 2010-08-12 04:22:25 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-09-21 14:46:18 -0400 |
commit | 6cdee91257bee23a46dc869ca62469b67cba2c7e (patch) | |
tree | fa29d2d4b32e612431d71f141858f9cff8e402d1 /arch/arm/mach-omap2/pm-debug.c | |
parent | d5c47d7e97c141edb620b3932e1e1cb39e70c654 (diff) |
OMAP: PM debugfs removing OMAP3 hardcodings.
This patch removes omap3 hardcodings from pm-debug.c
so that enabling PM debugfs support does break compilation
for other OMAP's. This is a preparatory patch for supporting
OMAP4 pm entries through PM debugfs.
Signed-off-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm-debug.c')
-rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 723b44e252fd..056ff17f7c38 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -37,6 +37,10 @@ | |||
37 | #include "pm.h" | 37 | #include "pm.h" |
38 | 38 | ||
39 | int omap2_pm_debug; | 39 | int omap2_pm_debug; |
40 | u32 enable_off_mode; | ||
41 | u32 sleep_while_idle; | ||
42 | u32 wakeup_timer_seconds; | ||
43 | u32 wakeup_timer_milliseconds; | ||
40 | 44 | ||
41 | #define DUMP_PRM_MOD_REG(mod, reg) \ | 45 | #define DUMP_PRM_MOD_REG(mod, reg) \ |
42 | regs[reg_count].name = #mod "." #reg; \ | 46 | regs[reg_count].name = #mod "." #reg; \ |
@@ -494,8 +498,10 @@ int pm_dbg_regset_init(int reg_set) | |||
494 | 498 | ||
495 | static int pwrdm_suspend_get(void *data, u64 *val) | 499 | static int pwrdm_suspend_get(void *data, u64 *val) |
496 | { | 500 | { |
497 | int ret; | 501 | int ret = -EINVAL; |
498 | ret = omap3_pm_get_suspend_state((struct powerdomain *)data); | 502 | |
503 | if (cpu_is_omap34xx()) | ||
504 | ret = omap3_pm_get_suspend_state((struct powerdomain *)data); | ||
499 | *val = ret; | 505 | *val = ret; |
500 | 506 | ||
501 | if (ret >= 0) | 507 | if (ret >= 0) |
@@ -505,7 +511,10 @@ static int pwrdm_suspend_get(void *data, u64 *val) | |||
505 | 511 | ||
506 | static int pwrdm_suspend_set(void *data, u64 val) | 512 | static int pwrdm_suspend_set(void *data, u64 val) |
507 | { | 513 | { |
508 | return omap3_pm_set_suspend_state((struct powerdomain *)data, (int)val); | 514 | if (cpu_is_omap34xx()) |
515 | return omap3_pm_set_suspend_state( | ||
516 | (struct powerdomain *)data, (int)val); | ||
517 | return -EINVAL; | ||
509 | } | 518 | } |
510 | 519 | ||
511 | DEFINE_SIMPLE_ATTRIBUTE(pwrdm_suspend_fops, pwrdm_suspend_get, | 520 | DEFINE_SIMPLE_ATTRIBUTE(pwrdm_suspend_fops, pwrdm_suspend_get, |
@@ -553,8 +562,10 @@ static int option_set(void *data, u64 val) | |||
553 | 562 | ||
554 | *option = val; | 563 | *option = val; |
555 | 564 | ||
556 | if (option == &enable_off_mode) | 565 | if (option == &enable_off_mode) { |
557 | omap3_pm_off_mode_enable(val); | 566 | if (cpu_is_omap34xx()) |
567 | omap3_pm_off_mode_enable(val); | ||
568 | } | ||
558 | 569 | ||
559 | return 0; | 570 | return 0; |
560 | } | 571 | } |