1 // SPDX-License-Identifier: GPL-2.0-or-later 1 2 /* 3 * Copyright 2011 Freescale Semiconductor, Inc 4 * Copyright 2011 Linaro Ltd. 5 */ 6 7 #include <linux/errno.h> 8 #include <linux/jiffies.h> 9 #include <asm/cacheflush.h> 10 #include <asm/cp15.h> 11 #include <asm/proc-fns.h> 12 13 #include "common.h" 14 #include "hardware.h" 15 16 /* 17 * platform-specific code to shutdown a CPU 18 * 19 * Called with IRQs disabled 20 */ 21 void imx_cpu_die(unsigned int cpu) 22 { 23 v7_exit_coherency_flush(louis); 24 /* 25 * We use the cpu jumping argument reg 26 * imx_cpu_kill() which is running on 27 * the register being cleared to kill 28 */ 29 imx_set_cpu_arg(cpu, ~0); 30 31 while (1) 32 cpu_do_idle(); 33 } 34 35 int imx_cpu_kill(unsigned int cpu) 36 { 37 unsigned long timeout = jiffies + msec 38 39 while (imx_get_cpu_arg(cpu) == 0) 40 if (time_after(jiffies, timeou 41 return 0; 42 imx_enable_cpu(cpu, false); 43 imx_set_cpu_arg(cpu, 0); 44 if (cpu_is_imx7d()) 45 imx_gpcv2_set_core1_pdn_pup_by 46 return 1; 47 } 48
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.