From a7e6827348e9e85466c9ab6488769bf862e9fd0b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 21 Nov 2008 12:37:48 +0000 Subject: MERGE-via-balaji-tracking-s3c64xx-clock-fixes Signed-off-by: Andy Green --- arch/arm/mach-s3c6400/include/mach/pwm-clock.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/arm/mach-s3c6400') diff --git a/arch/arm/mach-s3c6400/include/mach/pwm-clock.h b/arch/arm/mach-s3c6400/include/mach/pwm-clock.h index fe156c4e46e..b25bedee0d5 100644 --- a/arch/arm/mach-s3c6400/include/mach/pwm-clock.h +++ b/arch/arm/mach-s3c6400/include/mach/pwm-clock.h @@ -42,4 +42,15 @@ static inline unsigned int pwm_tdiv_has_div1(void) return 1; } +/** + * pwm_tdiv_div_bits() - calculate TCFG1 divisor value. + * @div: The divisor to calculate the bit information for. + * + * Turn a divisor into the necessary bit field for TCFG1. + */ +static inline unsigned long pwm_tdiv_div_bits(unsigned int div) +{ + return ilog2(div); +} + #define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK -- cgit v1.2.3