diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-09-06 14:59:40 +0800 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-31 14:26:24 +0100 |
commit | 69c31b7a6e9cd4654ed0bfc7e70b4d7076a5cdb3 (patch) | |
tree | 2f0581360d423e9d472a4c163e91babde57cd167 /arch/arm/mach-imx/localtimer.c | |
parent | 9fbbe6890c88aa332efe61d5894108dd8b932530 (diff) | |
download | blackbird-op-linux-69c31b7a6e9cd4654ed0bfc7e70b4d7076a5cdb3.tar.gz blackbird-op-linux-69c31b7a6e9cd4654ed0bfc7e70b4d7076a5cdb3.zip |
arm/imx6q: add smp and cpu hotplug support
It adds smp and cpu hotplug support for imx6q.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/localtimer.c')
-rw-r--r-- | arch/arm/mach-imx/localtimer.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/localtimer.c b/arch/arm/mach-imx/localtimer.c new file mode 100644 index 000000000000..3a163515d41f --- /dev/null +++ b/arch/arm/mach-imx/localtimer.c @@ -0,0 +1,35 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * Copyright 2011 Linaro Ltd. + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include <linux/init.h> +#include <linux/clockchips.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> +#include <asm/smp_twd.h> + +/* + * Setup the local clock events for a CPU. + */ +int __cpuinit local_timer_setup(struct clock_event_device *evt) +{ + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "arm,smp-twd"); + if (!twd_base) { + twd_base = of_iomap(np, 0); + WARN_ON(!twd_base); + } + evt->irq = irq_of_parse_and_map(np, 0); + twd_timer_setup(evt); + + return 0; +} |