Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 355419
b: refs/heads/master
c: 6f179b7
h: refs/heads/master
i:
  355417: 83cb437
  355415: 1a78daf
v: v3
  • Loading branch information
Fabio Baltieri authored and Linus Walleij committed Jan 7, 2013
1 parent 7f504de commit e565518
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0baf066fcbc408c75dc161a9298fc4bfdde6051f
refs/heads/master: 6f179b724b1488ead0acc1a04f2adade99ca0736
11 changes: 11 additions & 0 deletions trunk/drivers/clocksource/nomadik-mtu.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/clocksource.h>
#include <linux/clk.h>
#include <linux/jiffies.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/platform_data/clocksource-nomadik-mtu.h>
#include <asm/mach/time.h>
Expand Down Expand Up @@ -64,6 +65,7 @@ static void __iomem *mtu_base;
static bool clkevt_periodic;
static u32 clk_prescale;
static u32 nmdk_cycle; /* write-once */
static struct delay_timer mtu_delay_timer;

#ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK
/*
Expand All @@ -80,6 +82,11 @@ static u32 notrace nomadik_read_sched_clock(void)
}
#endif

static unsigned long nmdk_timer_read_current_timer(void)
{
return ~readl_relaxed(mtu_base + MTU_VAL(0));
}

/* Clockevent device: use one-shot mode */
static int nmdk_clkevt_next(unsigned long evt, struct clock_event_device *ev)
{
Expand Down Expand Up @@ -227,4 +234,8 @@ void __init nmdk_timer_init(void __iomem *base, int irq)
setup_irq(irq, &nmdk_timer_irq);
nmdk_clkevt.cpumask = cpumask_of(0);
clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);

mtu_delay_timer.read_current_timer = &nmdk_timer_read_current_timer;
mtu_delay_timer.freq = rate;
register_current_timer_delay(&mtu_delay_timer);
}

0 comments on commit e565518

Please sign in to comment.