Commit 4185fe53 authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[ARM PATCH] 2189/1: S3C2410 - select pclk as source for timer if none specified for machine

Patch from Ben Dooks

Select the PCLK based TIMER4 to provide the system timer tick
if there is no machine specific timer setup specified. This
should make it easier to add new machines, as well as cut down
on the code required in time.c when they are added.

Signed-off-by: Ben Dooks 
parent dd271e16
......@@ -125,20 +125,15 @@ static void s3c2410_timer_setup (void)
tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK;
tcfg1 |= S3C2410_TCFG1_MUX4_TCLK1;
}
} else {
/* for the h1940 (and others), we use the pclk from the core
* to generate the timer values. since values around 50 to
* 70MHz are not values we can directly generate the timer
* value from, we need to pre-scaleand divide before using it.
*/
/* for the h1940, we use the pclk from the core to generate
* the timer values. since 67.5MHz is not a value we can directly
* generate the timer value from, we need to pre-scale and
* divied before using it.
*
* overall divsior to get 200Hz is 337500
* we can fit tcnt if we pre-scale by 6, producing a tick rate
* of 11.25MHz, and a tcnt of 56250.
*/
/* this is used as default if no other timer can be found */
if (machine_is_h1940() || machine_is_smdk2410() ||
machine_is_rx3715()) {
timer_ticks_usec = s3c24xx_pclk / (1000*1000);
timer_ticks_usec /= 6;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment