Skip to content

Commit

Permalink
microblaze: timer: Do not initialized system timer twice
Browse files Browse the repository at this point in the history
Only one system timer can be setup.
Do not initialize more system timers.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
  • Loading branch information
Michal Simek committed Jan 27, 2014
1 parent 839396a commit 03fe0d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/microblaze/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,15 @@ static int __init xilinx_clocksource_init(void)
static void __init xilinx_timer_init(struct device_node *timer)
{
struct clk *clk;
static int initialized;
u32 irq;
u32 timer_num = 1;

if (initialized)
return;

initialized = 1;

timer_baseaddr = of_iomap(timer, 0);
if (!timer_baseaddr) {
pr_err("ERROR: invalid timer base address\n");
Expand Down

0 comments on commit 03fe0d3

Please sign in to comment.