diff options
Diffstat (limited to 'arch/arm/mach-omap2/cm2xxx_3xxx.h')
-rw-r--r-- | arch/arm/mach-omap2/cm2xxx_3xxx.h | 12 |
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, | |||
74 | return v; | 74 | return v; |
75 | } | 75 | } |
76 | 76 | ||
77 | /* Read a CM register, AND it, and shift the result down to bit 0 */ | ||
78 | static inline u32 omap2_cm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask) | ||
79 | { | ||
80 | u32 v; | ||
81 | |||
82 | v = omap2_cm_read_mod_reg(domain, idx); | ||
83 | v &= mask; | ||
84 | v >>= __ffs(mask); | ||
85 | |||
86 | return v; | ||
87 | } | ||
88 | |||
77 | static inline u32 omap2_cm_set_mod_reg_bits(u32 bits, s16 module, s16 idx) | 89 | static inline u32 omap2_cm_set_mod_reg_bits(u32 bits, s16 module, s16 idx) |
78 | { | 90 | { |
79 | return omap2_cm_rmw_mod_reg_bits(bits, bits, module, idx); | 91 | return omap2_cm_rmw_mod_reg_bits(bits, bits, module, idx); |