diff options
author | yagi <yagi@ke66.alps.lineo.co.jp> | 2012-06-15 22:53:19 +0900 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2012-07-03 17:15:16 -0400 |
commit | 43df8a0ffe16a50ba589a6e7db811740004d29d3 (patch) | |
tree | 57fc101c98f0ed619701bf90eef516527076c0cc | |
parent | 44a2c68ff012eabdc6131a51b0942e981fe96d55 (diff) |
update: mvf_time.c
-rw-r--r-- | arch/arm/plat-mxc/mvf_time.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/mvf_time.c b/arch/arm/plat-mxc/mvf_time.c index 039e45e8864c..40b2a60402af 100644 --- a/arch/arm/plat-mxc/mvf_time.c +++ b/arch/arm/plat-mxc/mvf_time.c @@ -174,17 +174,31 @@ static void mvf_set_mode(enum clock_event_mode mode, /* * IRQ handler for the timer */ +#if 1 +#define COUNT_UP_VAL 660000 +static unsigned long total_cnt = 0; +static unsigned long long old_jiff = 0; +#endif static irqreturn_t mvf_timer_interrupt(int irq, void *dev_id) { struct clock_event_device *evt = &clockevent_mvf; uint32_t tstat; + unsigned long reg; tstat = __raw_readl(timer_base + PIT_TFLG(TIMER_CH)); if ( tstat ) { __raw_writel(tstat, timer_base + PIT_TFLG(TIMER_CH)); gpt_irq_acknowledge(); evt->event_handler(evt); - jiffies++; +#if 1 + reg = __raw_readl(timer_base + PIT_LDVAL(TIMER_CH)); + total_cnt += reg; + if (total_cnt >= COUNT_UP_VAL) { + total_cnt = 0; + jiffies++; + //printk("jiffies = %ld\n",jiffies); + } +#endif return IRQ_HANDLED; } // /* DEBUG */ printk("DBG: %s[%d]: NONE Exit\n",__func__,__LINE__); |