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/plat-s3c24xx/include | |
parent | 8ddc1622f93675a10de39e1f38a230e953bf2a04 (diff) |
MERGE-via-balaji-tracking-s3c64xx-clock-fixes
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'arch/arm/plat-s3c24xx/include')
-rw-r--r-- | arch/arm/plat-s3c24xx/include/mach/pwm-clock.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h b/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h index 3194ed329ea..a087de21bc2 100644 --- a/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h +++ b/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h @@ -41,4 +41,15 @@ static inline unsigned int pwm_tdiv_has_div1(void) return 0; } +/** + * 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) - 1; +} + #define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK |