diff options
author | Rajendra Nayak <rnayak@ti.com> | 2010-12-21 22:01:18 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-12-21 22:01:18 -0500 |
commit | 12627578523d2d9396cae76b1dad0ed3dccf1730 (patch) | |
tree | 0cce660ef2a1bc3390823469fed55a409617194a /arch/arm/mach-omap2/powerdomain44xx.c | |
parent | f327e07b0ef9c60a6018799c9f04de10101d8e5a (diff) |
OMAP: powerdomain: Arch specific funcs for logic control
Define the following architecture specific funtions for omap2/3/4
.pwrdm_set_logic_retst
.pwrdm_read_logic_pwrst
.pwrdm_read_prev_logic_pwrst
.pwrdm_read_logic_retst
Convert the platform-independent framework to call these functions.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain44xx.c')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain44xx.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/powerdomain44xx.c b/arch/arm/mach-omap2/powerdomain44xx.c index 5dc337c0e5d5..996790acebc9 100644 --- a/arch/arm/mach-omap2/powerdomain44xx.c +++ b/arch/arm/mach-omap2/powerdomain44xx.c | |||
@@ -47,9 +47,35 @@ static int omap4_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm) | |||
47 | OMAP4430_LASTPOWERSTATEENTERED_MASK); | 47 | OMAP4430_LASTPOWERSTATEENTERED_MASK); |
48 | } | 48 | } |
49 | 49 | ||
50 | static int omap4_pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst) | ||
51 | { | ||
52 | u32 v; | ||
53 | |||
54 | v = pwrst << __ffs(OMAP4430_LOGICRETSTATE_MASK); | ||
55 | prm_rmw_mod_reg_bits(OMAP4430_LOGICRETSTATE_MASK, v, | ||
56 | pwrdm->prcm_offs, OMAP4_PM_PWSTCTRL); | ||
57 | |||
58 | return 0; | ||
59 | } | ||
60 | |||
61 | static int omap4_pwrdm_read_logic_pwrst(struct powerdomain *pwrdm) | ||
62 | { | ||
63 | return prm_read_mod_bits_shift(pwrdm->prcm_offs, OMAP4_PM_PWSTST, | ||
64 | OMAP4430_LOGICSTATEST_MASK); | ||
65 | } | ||
66 | |||
67 | static int omap4_pwrdm_read_logic_retst(struct powerdomain *pwrdm) | ||
68 | { | ||
69 | return prm_read_mod_bits_shift(pwrdm->prcm_offs, OMAP4_PM_PWSTCTRL, | ||
70 | OMAP4430_LOGICRETSTATE_MASK); | ||
71 | } | ||
72 | |||
50 | struct pwrdm_ops omap4_pwrdm_operations = { | 73 | struct pwrdm_ops omap4_pwrdm_operations = { |
51 | .pwrdm_set_next_pwrst = omap4_pwrdm_set_next_pwrst, | 74 | .pwrdm_set_next_pwrst = omap4_pwrdm_set_next_pwrst, |
52 | .pwrdm_read_next_pwrst = omap4_pwrdm_read_next_pwrst, | 75 | .pwrdm_read_next_pwrst = omap4_pwrdm_read_next_pwrst, |
53 | .pwrdm_read_pwrst = omap4_pwrdm_read_pwrst, | 76 | .pwrdm_read_pwrst = omap4_pwrdm_read_pwrst, |
54 | .pwrdm_read_prev_pwrst = omap4_pwrdm_read_prev_pwrst, | 77 | .pwrdm_read_prev_pwrst = omap4_pwrdm_read_prev_pwrst, |
78 | .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst, | ||
79 | .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst, | ||
80 | .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst, | ||
55 | }; | 81 | }; |