2 * Copyright 2011 Freescale Semiconductor, Inc.
3 * Copyright 2011 Linaro Ltd.
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
13 #include <linux/init.h>
14 #include <linux/clockchips.h>
15 #include <linux/of_address.h>
16 #include <linux/of_irq.h>
17 #include <asm/smp_twd.h>
20 * Setup the local clock events for a CPU.
22 int __cpuinit
local_timer_setup(struct clock_event_device
*evt
)
24 struct device_node
*np
;
26 np
= of_find_compatible_node(NULL
, NULL
, "arm,smp-twd");
28 twd_base
= of_iomap(np
, 0);
31 evt
->irq
= irq_of_parse_and_map(np
, 0);