summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/prm44xx.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-28 10:25:12 -0700
committerKevin Hilman <khilman@ti.com>2011-09-15 12:02:07 -0700
commit4bb73adec43bbf63d39e1c2021de0aab0c60ea34 (patch)
treedc05e399041841aaebe773c4ac37fd86e82777d2 /arch/arm/mach-omap2/prm44xx.c
parent842ec22852cf843558828e6f7a6da2bf72f341a5 (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.c22
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 @@
#include "vp.h"
#include "prm44xx.h"
#include "prm-regbits-44xx.h"
+#include "prcm44xx.h"
+#include "prminst44xx.h"
/* PRM low-level functions */
@@ -99,3 +101,23 @@ void omap4_prm_vp_clear_txdone(u8 vp_id)
OMAP4430_PRM_OCP_SOCKET_INST,
vp->irqstatus_mpu);
};
+
+u32 omap4_prm_vcvp_read(u8 offset)
+{
+ return omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
+ OMAP4430_PRM_DEVICE_INST, offset);
+}
+
+void omap4_prm_vcvp_write(u32 val, u8 offset)
+{
+ omap4_prminst_write_inst_reg(val, OMAP4430_PRM_PARTITION,
+ OMAP4430_PRM_DEVICE_INST, offset);
+}
+
+u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset)
+{
+ return omap4_prminst_rmw_inst_reg_bits(mask, bits,
+ OMAP4430_PRM_PARTITION,
+ OMAP4430_PRM_DEVICE_INST,
+ offset);
+}