aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/samsung-time.c
diff options
context:
space:
mode:
authorRomain Naour <romain.naour@openwide.fr>2013-01-09 21:47:04 -0500
committerKukjin Kim <kgene.kim@samsung.com>2013-03-05 06:16:38 -0500
commit7f78b6eb5f51731fd7d6e272b5adc1d030f0791f (patch)
treeefb624c83c58059865fc8fa51b15bbdd341c2e6a /arch/arm/plat-samsung/samsung-time.c
parentc1fcd403ced3ad0d63418cc1120e1562283b16ce (diff)
ARM: S3C24XX: Add samsung-time support for s3c24xx
Signed-off-by: Naour Romain <romain.naour@openwide.fr> Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com> [heiko@sntech.de: tested on a s3c2416 based machine] Reviewed-and-Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung/samsung-time.c')
-rw-r--r--arch/arm/plat-samsung/samsung-time.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/plat-samsung/samsung-time.c b/arch/arm/plat-samsung/samsung-time.c
index aa8aa8014cc1..f899cbc9b288 100644
--- a/arch/arm/plat-samsung/samsung-time.c
+++ b/arch/arm/plat-samsung/samsung-time.c
@@ -2,7 +2,7 @@
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 2 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com/ 3 * http://www.samsung.com/
4 * 4 *
5 * SAMSUNG - Common hr-timer support 5 * samsung - Common hr-timer support (s3c and s5p)
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
@@ -267,8 +267,8 @@ static void __init samsung_clockevent_init(void)
267 267
268 tscaler = clk_get_parent(tdiv_event); 268 tscaler = clk_get_parent(tdiv_event);
269 269
270 clk_set_rate(tscaler, pclk / 2); 270 clk_set_rate(tscaler, pclk / TSCALER_DIV);
271 clk_set_rate(tdiv_event, pclk / 2); 271 clk_set_rate(tdiv_event, pclk / TDIV);
272 clk_set_parent(tin_event, tdiv_event); 272 clk_set_parent(tin_event, tdiv_event);
273 273
274 clock_rate = clk_get_rate(tin_event); 274 clock_rate = clk_get_rate(tin_event);
@@ -329,7 +329,7 @@ static void __init samsung_clocksource_init(void)
329 329
330 pclk = clk_get_rate(timerclk); 330 pclk = clk_get_rate(timerclk);
331 331
332 clk_set_rate(tdiv_source, pclk / 2); 332 clk_set_rate(tdiv_source, pclk / TDIV);
333 clk_set_parent(tin_source, tdiv_source); 333 clk_set_parent(tin_source, tdiv_source);
334 334
335 clock_rate = clk_get_rate(tin_source); 335 clock_rate = clk_get_rate(tin_source);
@@ -337,10 +337,10 @@ static void __init samsung_clocksource_init(void)
337 samsung_time_setup(timer_source.source_id, TCNT_MAX); 337 samsung_time_setup(timer_source.source_id, TCNT_MAX);
338 samsung_time_start(timer_source.source_id, PERIODIC); 338 samsung_time_start(timer_source.source_id, PERIODIC);
339 339
340 setup_sched_clock(samsung_read_sched_clock, 32, clock_rate); 340 setup_sched_clock(samsung_read_sched_clock, TSIZE, clock_rate);
341 341
342 if (clocksource_mmio_init(samsung_timer_reg(), "samsung_clocksource_timer", 342 if (clocksource_mmio_init(samsung_timer_reg(), "samsung_clocksource_timer",
343 clock_rate, 250, 32, clocksource_mmio_readl_down)) 343 clock_rate, 250, TSIZE, clocksource_mmio_readl_down))
344 panic("samsung_clocksource_timer: can't register clocksource\n"); 344 panic("samsung_clocksource_timer: can't register clocksource\n");
345} 345}
346 346