spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / arch / arm / mach-imx / hotplug.c
blob89493abd497c61f67e37a8eea984e517431f224a
1 /*
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/errno.h>
14 #include <asm/cacheflush.h>
15 #include <mach/common.h>
17 int platform_cpu_kill(unsigned int cpu)
19 return 1;
23 * platform-specific code to shutdown a CPU
25 * Called with IRQs disabled
27 void platform_cpu_die(unsigned int cpu)
29 flush_cache_all();
30 imx_enable_cpu(cpu, false);
31 cpu_do_idle();
33 /* We should never return from idle */
34 panic("cpu %d unexpectedly exit from shutdown\n", cpu);
37 int platform_cpu_disable(unsigned int cpu)
40 * we don't allow CPU 0 to be shutdown (it is still too special
41 * e.g. clock tick interrupts)
43 return cpu == 0 ? -EPERM : 0;