aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/time.c')
-rw-r--r--arch/blackfin/kernel/time.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c
index 715b3945e4c7..eb2352320454 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -6,9 +6,10 @@
6 * Created: 6 * Created:
7 * Description: This file contains the bfin-specific time handling details. 7 * Description: This file contains the bfin-specific time handling details.
8 * Most of the stuff is located in the machine specific files. 8 * Most of the stuff is located in the machine specific files.
9 * FIXME: (This file is subject for removal)
9 * 10 *
10 * Modified: 11 * Modified:
11 * Copyright 2004-2006 Analog Devices Inc. 12 * Copyright 2004-2008 Analog Devices Inc.
12 * 13 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 * 15 *
@@ -35,6 +36,7 @@
35#include <linux/irq.h> 36#include <linux/irq.h>
36 37
37#include <asm/blackfin.h> 38#include <asm/blackfin.h>
39#include <asm/time.h>
38 40
39/* This is an NTP setting */ 41/* This is an NTP setting */
40#define TICK_SIZE (tick_nsec / 1000) 42#define TICK_SIZE (tick_nsec / 1000)
@@ -47,21 +49,6 @@ static struct irqaction bfin_timer_irq = {
47 .flags = IRQF_DISABLED 49 .flags = IRQF_DISABLED
48}; 50};
49 51
50/*
51 * The way that the Blackfin core timer works is:
52 * - CCLK is divided by a programmable 8-bit pre-scaler (TSCALE)
53 * - Every time TSCALE ticks, a 32bit is counted down (TCOUNT)
54 *
55 * If you take the fastest clock (1ns, or 1GHz to make the math work easier)
56 * 10ms is 10,000,000 clock ticks, which fits easy into a 32-bit counter
57 * (32 bit counter is 4,294,967,296ns or 4.2 seconds) so, we don't need
58 * to use TSCALE, and program it to zero (which is pass CCLK through).
59 * If you feel like using it, try to keep HZ * TIMESCALE to some
60 * value that divides easy (like power of 2).
61 */
62
63#define TIME_SCALE 1
64
65static void 52static void
66time_sched_init(irq_handler_t timer_routine) 53time_sched_init(irq_handler_t timer_routine)
67{ 54{