diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2010-08-24 10:51:55 +0400 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2010-08-30 09:44:16 +0400 |
commit | f70409aff3a10e22ff9c66f87e9cbc3de7cbd7f7 (patch) | |
tree | c8b7d4b4127f3d908b403d230940a9c122ed44e8 /arch/arm/cpu/armv7/s5p-common/timer.c | |
parent | 545dabbeef56ffea33cedee56067edacd9fb90f0 (diff) | |
download | u-boot-f70409aff3a10e22ff9c66f87e9cbc3de7cbd7f7.tar.xz |
ARMV7: S5P: separate the peripheral clocks
Because of peripheral devices can select clock sources,
separate the peripheral clocks. (pwm, uart and so on)
It just return the pclk at s5pc1xx SoC,
but s5pc210 SoC must be calculated by own clock register setting.
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'arch/arm/cpu/armv7/s5p-common/timer.c')
-rw-r--r-- | arch/arm/cpu/armv7/s5p-common/timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c index 1f1c7ff340..04906503e6 100644 --- a/arch/arm/cpu/armv7/s5p-common/timer.c +++ b/arch/arm/cpu/armv7/s5p-common/timer.c @@ -57,7 +57,7 @@ int timer_init(void) /* * @ PWM Timer 4 * Timer Freq(HZ) = - * PCLK / { (prescaler_value + 1) * (divider_value) } + * PWM_CLK / { (prescaler_value + 1) * (divider_value) } */ /* set prescaler : 16 */ @@ -68,7 +68,7 @@ int timer_init(void) if (count_value == 0) { /* reset initial value */ /* count_value = 2085937.5(HZ) (per 1 sec)*/ - count_value = get_pclk() / ((PRESCALER_1 + 1) * + count_value = get_pwm_clk() / ((PRESCALER_1 + 1) * (MUX_DIV_2 + 1)); /* count_value / 100 = 20859.375(HZ) (per 10 msec) */ |