/* * arch/arm/mach-sunxi/platsmp-v1.h * * Copyright(c) 2013-2015 Allwinnertech Co., Ltd. * http://www.allwinnertech.com * * Author: east_yang * * sunxi smp ops header file for platform v1 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #ifndef __PLATSMP_V1_H__ #define __PLATSMP_V1_H__ static inline int sunxi_is_wfi_mode(int cpu) { #ifdef CONFIG_EVB_PLATFORM return readl(sunxi_cpucfg_base + CPUCFG_CPU_STATUS_REG(cpu)) & (1<<2); #else return 1; #endif } static inline void sunxi_enable_cpu(int cpu) { unsigned int value; /* Assert nCOREPORESET LOW and hold L1RSTDISABLE LOW. * Ensure DBGPWRDUP is held LOW to prevent any external * debug access to the processor. */ /* assert cpu core reset */ writel(0, sunxi_cpucfg_base + CPUCFG_CPU_RST_CTRL_REG(cpu)); /* L1RSTDISABLE hold low */ value = readl(sunxi_cpucfg_base + CPUCFG_GEN_CTRL_REG); value &= ~(1<