Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226646
b: refs/heads/master
c: 7f59567
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Hilman authored and Paul Walmsley committed Dec 22, 2010
1 parent b7eeff2 commit c7b6c1f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a01aa211da8530dc6a3ff3a725f2edd3464c46f
refs/heads/master: 7f595674e08b8b4d3faf64a19bccc95445d7ed35
29 changes: 29 additions & 0 deletions trunk/arch/arm/mach-omap2/powerdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,3 +909,32 @@ int pwrdm_post_transition(void)
pwrdm_for_each(_pwrdm_post_transition_cb, NULL);
return 0;
}

/**
* pwrdm_get_context_loss_count - get powerdomain's context loss count
* @pwrdm: struct powerdomain * to wait for
*
* Context loss count is the sum of powerdomain off-mode counter, the
* logic off counter and the per-bank memory off counter. Returns 0
* (and WARNs) upon error, otherwise, returns the context loss count.
*/
u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm)
{
int i, count;

if (!pwrdm) {
WARN(1, "powerdomain: %s: pwrdm is null\n", __func__);
return 0;
}

count = pwrdm->state_counter[PWRDM_POWER_OFF];
count += pwrdm->ret_logic_off_counter;

for (i = 0; i < pwrdm->banks; i++)
count += pwrdm->ret_mem_off_counter[i];

pr_debug("powerdomain: %s: context loss count = %u\n",
pwrdm->name, count);

return count;
}
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/powerdomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ int pwrdm_clkdm_state_switch(struct clockdomain *clkdm);
int pwrdm_pre_transition(void);
int pwrdm_post_transition(void);
int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm);

extern void omap2xxx_powerdomains_init(void);
extern void omap3xxx_powerdomains_init(void);
Expand Down

0 comments on commit c7b6c1f

Please sign in to comment.