static int exynos_core_status(int cpu) { unsigned int val; unsigned int check_cpu = soc_is_exynos5260() ? cpu^4 : cpu; val = __raw_readl(EXYNOS_ARM_CORE_STATUS(check_cpu)); if (soc_is_exynos5260()) return val & 0x40000 ? 1 : 0; else return val & EXYNOS_CORE_LOCAL_PWR_EN ? 1 : 0; }
unsigned int exynos7420_cpu_state(unsigned int cpu_id) { unsigned int phys_cpu = cpu_logical_map(cpu_id); unsigned int core, cluster, val; core = MPIDR_AFFINITY_LEVEL(phys_cpu, 0); cluster = MPIDR_AFFINITY_LEVEL(phys_cpu, 1); val = __raw_readl(EXYNOS_ARM_CORE_STATUS(core + (4 * cluster))) & EXYNOS_CORE_PWR_EN; return val == 0xf; }
/** * exynos_cpu_power_state : returns the power state of the cpu * @cpu : the cpu to retrieve the power state from * */ int exynos_cpu_power_state(int cpu) { return (pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) & S5P_CORE_LOCAL_PWR_EN); }
static int exynos_cpu_power_state(void __iomem *power, int cpu) { return __raw_readl(power + EXYNOS_ARM_CORE_STATUS(cpu)) & S5P_CORE_LOCAL_PWR_EN; }