~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-omap2/omap-hotplug.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * OMAP4 SMP cpu-hotplug support
  4  *
  5  * Copyright (C) 2010 Texas Instruments, Inc.
  6  * Author:
  7  *      Santosh Shilimkar <santosh.shilimkar@ti.com>
  8  *
  9  * Platform file needed for the OMAP4 SMP. This file is based on arm
 10  * realview smp platform.
 11  * Copyright (c) 2002 ARM Limited.
 12  */
 13 
 14 #include <linux/kernel.h>
 15 #include <linux/errno.h>
 16 #include <linux/smp.h>
 17 #include <linux/io.h>
 18 
 19 #include "omap-wakeupgen.h"
 20 #include "common.h"
 21 #include "powerdomain.h"
 22 
 23 /*
 24  * platform-specific code to shutdown a CPU
 25  * Called with IRQs disabled
 26  */
 27 void omap4_cpu_die(unsigned int cpu)
 28 {
 29         unsigned int boot_cpu = 0;
 30         void __iomem *base = omap_get_wakeupgen_base();
 31 
 32         /*
 33          * we're ready for shutdown now, so do it
 34          */
 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);
 40         }
 41 
 42 
 43         for (;;) {
 44                 /*
 45                  * Enter into low power state
 46                  */
 47                 omap4_hotplug_cpu(cpu, PWRDM_POWER_OFF);
 48 
 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;
 54 
 55                 if (boot_cpu == smp_processor_id()) {
 56                         /*
 57                          * OK, proper wakeup, we're done
 58                          */
 59                         break;
 60                 }
 61                 pr_debug("CPU%u: spurious wakeup call\n", cpu);
 62         }
 63 }
 64 
 65 /* Needed by kexec and platform_can_cpu_hotplug() */
 66 int omap4_cpu_kill(unsigned int cpu)
 67 {
 68         return 1;
 69 }
 70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php