diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-06-25 17:14:03 +0530 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2014-07-23 11:17:12 +0530 |
commit | c9a98e1849a201ce88b42fc177b449df576a92b4 (patch) | |
tree | db1ca32678f84b0aa586f615aa43daf6dd56c906 /arch/arc/kernel | |
parent | 2b75c0f93e395aa6130c20a08016b143e6ec8c53 (diff) | |
download | linux-c9a98e1849a201ce88b42fc177b449df576a92b4.tar.bz2 |
ARC: update some comments
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r-- | arch/arc/kernel/time.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c index f92cfb14ecd3..dbe74f418019 100644 --- a/arch/arc/kernel/time.c +++ b/arch/arc/kernel/time.c @@ -144,12 +144,12 @@ static struct clocksource arc_counter = { /********** Clock Event Device *********/ /* - * Arm the timer to interrupt after @limit cycles + * Arm the timer to interrupt after @cycles * The distinction for oneshot/periodic is done in arc_event_timer_ack() below */ -static void arc_timer_event_setup(unsigned int limit) +static void arc_timer_event_setup(unsigned int cycles) { - write_aux_reg(ARC_REG_TIMER0_LIMIT, limit); + write_aux_reg(ARC_REG_TIMER0_LIMIT, cycles); write_aux_reg(ARC_REG_TIMER0_CNT, 0); /* start from 0 */ write_aux_reg(ARC_REG_TIMER0_CTRL, TIMER_CTRL_IE | TIMER_CTRL_NH); @@ -168,6 +168,10 @@ static void arc_clkevent_set_mode(enum clock_event_mode mode, { switch (mode) { case CLOCK_EVT_MODE_PERIODIC: + /* + * At X Hz, 1 sec = 1000ms -> X cycles; + * 10ms -> X / 100 cycles + */ arc_timer_event_setup(arc_get_core_freq() / HZ); break; case CLOCK_EVT_MODE_ONESHOT: |