From 4e4685027cc8e940d43a4d6e63773bfab9165913 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 25 Mar 2014 14:49:49 +0100 Subject: ARM: OMAP: hide custom bit manipulation function sr32() The only remaining user of the custom bit manipulation function sr32() is arch/arm/cpu/armv7/omap3/clock.c, so make it a static function in that file to prepare complete removal. Signed-off-by: Wolfgang Denk Cc: Tom Rini Cc: Albert ARIBAUD --- arch/arm/cpu/armv7/omap3/clock.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/arm/cpu/armv7/omap3') diff --git a/arch/arm/cpu/armv7/omap3/clock.c b/arch/arm/cpu/armv7/omap3/clock.c index 1bc27bdc7f..16e6c5fe84 100644 --- a/arch/arm/cpu/armv7/omap3/clock.c +++ b/arch/arm/cpu/armv7/omap3/clock.c @@ -21,6 +21,19 @@ #include #include +/* + * sr32 - clear & set a value in a bit range for a 32 bit address + */ +static inline void sr32(void *addr, u32 start_bit, u32 num_bits, u32 value) +{ + u32 tmp, msk = 0; + msk = 1 << num_bits; + --msk; + tmp = readl((u32)addr) & ~(msk << start_bit); + tmp |= value << start_bit; + writel(tmp, (u32)addr); +} + /****************************************************************************** * get_sys_clk_speed() - determine reference oscillator speed * based on known 32kHz clock and gptimer. -- cgit v1.2.1