diff options
author | Andy Green <andy@openmoko.com> | 2008-11-21 12:37:48 +0000 |
---|---|---|
committer | Andy Green <andy@openmoko.com> | 2008-11-21 12:37:48 +0000 |
commit | a7e6827348e9e85466c9ab6488769bf862e9fd0b (patch) | |
tree | c61f9126a906a80bc4b0e4e259f8c39b904179de /arch/arm/mach-s3c6400 | |
parent | 8ddc1622f93675a10de39e1f38a230e953bf2a04 (diff) |
MERGE-via-balaji-tracking-s3c64xx-clock-fixes
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'arch/arm/mach-s3c6400')
-rw-r--r-- | arch/arm/mach-s3c6400/include/mach/pwm-clock.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 |