Use dentry_path() to create full path to inode object
[pohmelfs.git] / arch / arm / mach-highbank / localtimer.c
blob5a00e7945fdf081b7e1193e835d25152554b2d62
1 /*
2 * Copyright 2010-2011 Calxeda, Inc.
3 * Based on localtimer.c, Copyright (C) 2002 ARM Ltd.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
17 #include <linux/init.h>
18 #include <linux/clockchips.h>
19 #include <linux/of.h>
20 #include <linux/of_address.h>
21 #include <linux/of_irq.h>
23 #include <asm/smp_twd.h>
26 * Setup the local clock events for a CPU.
28 int __cpuinit local_timer_setup(struct clock_event_device *evt)
30 struct device_node *np;
32 np = of_find_compatible_node(NULL, NULL, "arm,smp-twd");
33 if (!twd_base) {
34 twd_base = of_iomap(np, 0);
35 WARN_ON(!twd_base);
37 evt->irq = irq_of_parse_and_map(np, 0);
38 twd_timer_setup(evt);
39 return 0;