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

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

Version: ~ [ linux-5.8-rc5 ] ~ [ linux-5.7.8 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.51 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.132 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.188 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.230 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.230 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ 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.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * OMAP4 SMP cpu-hotplug support
  3  *
  4  * Copyright (C) 2010 Texas Instruments, Inc.
  5  * Author:
  6  *      Santosh Shilimkar <santosh.shilimkar@ti.com>
  7  *
  8  * Platform file needed for the OMAP4 SMP. This file is based on arm
  9  * realview smp platform.
 10  * Copyright (c) 2002 ARM Limited.
 11  *
 12  * This program is free software; you can redistribute it and/or modify
 13  * it under the terms of the GNU General Public License version 2 as
 14  * published by the Free Software Foundation.
 15  */
 16 
 17 #include <linux/kernel.h>
 18 #include <linux/errno.h>
 19 #include <linux/smp.h>
 20 #include <linux/io.h>
 21 
 22 #include "omap-wakeupgen.h"
 23 #include "common.h"
 24 #include "powerdomain.h"
 25 
 26 /*
 27  * platform-specific code to shutdown a CPU
 28  * Called with IRQs disabled
 29  */
 30 void omap4_cpu_die(unsigned int cpu)
 31 {
 32         unsigned int boot_cpu = 0;
 33         void __iomem *base = omap_get_wakeupgen_base();
 34 
 35         /*
 36          * we're ready for shutdown now, so do it
 37          */
 38         if (omap_secure_apis_support()) {
 39                 if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
 40                         pr_err("Secure clear status failed\n");
 41         } else {
 42                 writel_relaxed(0, base + OMAP_AUX_CORE_BOOT_0);
 43         }
 44 
 45 
 46         for (;;) {
 47                 /*
 48                  * Enter into low power state
 49                  */
 50                 omap4_hotplug_cpu(cpu, PWRDM_POWER_OFF);
 51 
 52                 if (omap_secure_apis_support())
 53                         boot_cpu = omap_read_auxcoreboot0();
 54                 else
 55                         boot_cpu =
 56                                 readl_relaxed(base + OMAP_AUX_CORE_BOOT_0) >> 5;
 57 
 58                 if (boot_cpu == smp_processor_id()) {
 59                         /*
 60                          * OK, proper wakeup, we're done
 61                          */
 62                         break;
 63                 }
 64                 pr_debug("CPU%u: spurious wakeup call\n", cpu);
 65         }
 66 }
 67 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp