summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/cm2xxx_3xxx.h
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-10-21 11:01:11 +0400
committerPaul Walmsley <paul@pwsan.com>2012-10-21 11:01:11 +0400
commit4bd5259e53accda0fe295d3b25da348f4d5f4b09 (patch)
tree6ddacb5a75a8eda93916eaa917775ac36b561b81 /arch/arm/mach-omap2/cm2xxx_3xxx.h
parentff4ae5d9319b86f940e410e92659c50f9879ff46 (diff)
downloadlinux-4bd5259e53accda0fe295d3b25da348f4d5f4b09.tar.xz
ARM: OMAP2/3: clockdomain/PRM/CM: move the low-level clockdomain functions into PRM/CM
Move the low-level SoC-specific clockdomain control functions into cm*.c and prm*.c. For example, OMAP2xxx low-level clockdomain functions go into cm2xxx.c. Then remove the unnecessary clockdomain*xxx*.c files. The objective is to centralize low-level CM and PRM register accesses into the cm*.[ch] and prm*.[ch] files, and then to export an OMAP SoC-independent API to higher-level OMAP power management code. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Vaibhav Hiremath <hvaibhav@ti.com> Acked-by: Rajendra Nayak <rnayak@ti.com> Reviewed-by: Russ Dill <Russ.Dill@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/cm2xxx_3xxx.h')
-rw-r--r--arch/arm/mach-omap2/cm2xxx_3xxx.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.h b/arch/arm/mach-omap2/cm2xxx_3xxx.h
index 865d332f6fb1..0e26bb1bf7e2 100644
--- a/arch/arm/mach-omap2/cm2xxx_3xxx.h
+++ b/arch/arm/mach-omap2/cm2xxx_3xxx.h
@@ -74,6 +74,18 @@ static inline u32 omap2_cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module,
return v;
}
+/* Read a CM register, AND it, and shift the result down to bit 0 */
+static inline u32 omap2_cm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask)
+{
+ u32 v;
+
+ v = omap2_cm_read_mod_reg(domain, idx);
+ v &= mask;
+ v >>= __ffs(mask);
+
+ return v;
+}
+
static inline u32 omap2_cm_set_mod_reg_bits(u32 bits, s16 module, s16 idx)
{
return omap2_cm_rmw_mod_reg_bits(bits, bits, module, idx);