Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216864
b: refs/heads/master
c: 6cdee91
h: refs/heads/master
v: v3
  • Loading branch information
Thara Gopinath authored and Kevin Hilman committed Sep 21, 2010
1 parent c752dbb commit 6585e1b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5c47d7e97c141edb620b3932e1e1cb39e70c654
refs/heads/master: 6cdee91257bee23a46dc869ca62469b67cba2c7e
21 changes: 16 additions & 5 deletions trunk/arch/arm/mach-omap2/pm-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
#include "pm.h"

int omap2_pm_debug;
u32 enable_off_mode;
u32 sleep_while_idle;
u32 wakeup_timer_seconds;
u32 wakeup_timer_milliseconds;

#define DUMP_PRM_MOD_REG(mod, reg) \
regs[reg_count].name = #mod "." #reg; \
Expand Down Expand Up @@ -494,8 +498,10 @@ int pm_dbg_regset_init(int reg_set)

static int pwrdm_suspend_get(void *data, u64 *val)
{
int ret;
ret = omap3_pm_get_suspend_state((struct powerdomain *)data);
int ret = -EINVAL;

if (cpu_is_omap34xx())
ret = omap3_pm_get_suspend_state((struct powerdomain *)data);
*val = ret;

if (ret >= 0)
Expand All @@ -505,7 +511,10 @@ static int pwrdm_suspend_get(void *data, u64 *val)

static int pwrdm_suspend_set(void *data, u64 val)
{
return omap3_pm_set_suspend_state((struct powerdomain *)data, (int)val);
if (cpu_is_omap34xx())
return omap3_pm_set_suspend_state(
(struct powerdomain *)data, (int)val);
return -EINVAL;
}

DEFINE_SIMPLE_ATTRIBUTE(pwrdm_suspend_fops, pwrdm_suspend_get,
Expand Down Expand Up @@ -553,8 +562,10 @@ static int option_set(void *data, u64 val)

*option = val;

if (option == &enable_off_mode)
omap3_pm_off_mode_enable(val);
if (option == &enable_off_mode) {
if (cpu_is_omap34xx())
omap3_pm_off_mode_enable(val);
}

return 0;
}
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/arm/mach-omap2/pm34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@
#define OMAP343X_TABLE_VALUE_OFFSET 0x30
#define OMAP343X_CONTROL_REG_VALUE_OFFSET 0x32

u32 enable_off_mode;
u32 sleep_while_idle;
u32 wakeup_timer_seconds;
u32 wakeup_timer_milliseconds;

struct power_state {
struct powerdomain *pwrdm;
u32 next_state;
Expand Down

0 comments on commit 6585e1b

Please sign in to comment.