diff options
author | Kevin Hilman <khilman@ti.com> | 2011-03-28 13:25:12 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-15 15:02:07 -0400 |
commit | 4bb73adec43bbf63d39e1c2021de0aab0c60ea34 (patch) | |
tree | dc05e399041841aaebe773c4ac37fd86e82777d2 /arch/arm/mach-omap2/prm44xx.c | |
parent | 842ec22852cf843558828e6f7a6da2bf72f341a5 (diff) |
OMAP2+: PRM: add register access functions for VC/VP
On OMAP3+, the voltage controller (VC) and voltage processor (VP) are
inside the PRM. Add some PRM helper functions for register access to
these module registers.
Thanks to Nishanth Menon for finding/fixing a sparse problem.
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/prm44xx.c')
-rw-r--r-- | arch/arm/mach-omap2/prm44xx.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index 390e32c53b0e..495a31a7e8a7 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include "vp.h" | 24 | #include "vp.h" |
25 | #include "prm44xx.h" | 25 | #include "prm44xx.h" |
26 | #include "prm-regbits-44xx.h" | 26 | #include "prm-regbits-44xx.h" |
27 | #include "prcm44xx.h" | ||
28 | #include "prminst44xx.h" | ||
27 | 29 | ||
28 | /* PRM low-level functions */ | 30 | /* PRM low-level functions */ |
29 | 31 | ||
@@ -99,3 +101,23 @@ void omap4_prm_vp_clear_txdone(u8 vp_id) | |||
99 | OMAP4430_PRM_OCP_SOCKET_INST, | 101 | OMAP4430_PRM_OCP_SOCKET_INST, |
100 | vp->irqstatus_mpu); | 102 | vp->irqstatus_mpu); |
101 | }; | 103 | }; |
104 | |||
105 | u32 omap4_prm_vcvp_read(u8 offset) | ||
106 | { | ||
107 | return omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, | ||
108 | OMAP4430_PRM_DEVICE_INST, offset); | ||
109 | } | ||
110 | |||
111 | void omap4_prm_vcvp_write(u32 val, u8 offset) | ||
112 | { | ||
113 | omap4_prminst_write_inst_reg(val, OMAP4430_PRM_PARTITION, | ||
114 | OMAP4430_PRM_DEVICE_INST, offset); | ||
115 | } | ||
116 | |||
117 | u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset) | ||
118 | { | ||
119 | return omap4_prminst_rmw_inst_reg_bits(mask, bits, | ||
120 | OMAP4430_PRM_PARTITION, | ||
121 | OMAP4430_PRM_DEVICE_INST, | ||
122 | offset); | ||
123 | } | ||