arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git] / arch / arm / mach-omap2 / omap-hotplug.c
blob8343fcf4f399b7be242b215ee153bb873a292e5c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * OMAP4 SMP cpu-hotplug support
5 * Copyright (C) 2010 Texas Instruments, Inc.
6 * Author:
7 * Santosh Shilimkar <santosh.shilimkar@ti.com>
9 * Platform file needed for the OMAP4 SMP. This file is based on arm
10 * realview smp platform.
11 * Copyright (c) 2002 ARM Limited.
14 #include <linux/kernel.h>
15 #include <linux/errno.h>
16 #include <linux/smp.h>
17 #include <linux/io.h>
19 #include "omap-wakeupgen.h"
20 #include "common.h"
21 #include "powerdomain.h"
24 * platform-specific code to shutdown a CPU
25 * Called with IRQs disabled
27 void omap4_cpu_die(unsigned int cpu)
29 unsigned int boot_cpu = 0;
30 void __iomem *base = omap_get_wakeupgen_base();
33 * we're ready for shutdown now, so do it
35 if (omap_secure_apis_support()) {
36 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
37 pr_err("Secure clear status failed\n");
38 } else {
39 writel_relaxed(0, base + OMAP_AUX_CORE_BOOT_0);
43 for (;;) {
45 * Enter into low power state
47 omap4_hotplug_cpu(cpu, PWRDM_POWER_OFF);
49 if (omap_secure_apis_support())
50 boot_cpu = omap_read_auxcoreboot0() >> 9;
51 else
52 boot_cpu =
53 readl_relaxed(base + OMAP_AUX_CORE_BOOT_0) >> 5;
55 if (boot_cpu == smp_processor_id()) {
57 * OK, proper wakeup, we're done
59 break;
61 pr_debug("CPU%u: spurious wakeup call\n", cpu);
65 /* Needed by kexec and platform_can_cpu_hotplug() */
66 int omap4_cpu_kill(unsigned int cpu)
68 return 1;