blob: ac8bbe91e5e648a087a0db9259681492db1b6ea3 [file] [log] [blame]
Duy Truonge833aca2013-02-12 13:35:08 -08001/* Copyright (c) 2007-2009,2012 The Linux Foundation. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#ifndef _ARCH_ARM_MACH_MSM_IDLE_H_
15#define _ARCH_ARM_MACH_MSM_IDLE_H_
16
Steve Mucklefcece052012-02-18 20:09:58 -080017/* 11 general purpose registers (r4-r14), 10 cp15 registers */
18#define CPU_SAVED_STATE_SIZE (4 * 11 + 4 * 10)
Steve Mucklefcece052012-02-18 20:09:58 -080019
Murali Nalajala93f29992012-03-21 15:59:27 +053020#define ON 1
21#define OFF 0
22#define TARGET_IS_8625 1
Murali Nalajala73c13332012-05-15 11:30:59 +053023#define POWER_COLLAPSED 1
Murali Nalajala93f29992012-03-21 15:59:27 +053024
Steve Mucklefcece052012-02-18 20:09:58 -080025#ifndef __ASSEMBLY__
26
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070027int msm_arch_idle(void);
28int msm_pm_collapse(void);
29void msm_pm_collapse_exit(void);
Steve Mucklefcece052012-02-18 20:09:58 -080030extern void *msm_saved_state;
31extern unsigned long msm_saved_state_phys;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070032
33#ifdef CONFIG_CPU_V7
34void msm_pm_boot_entry(void);
Maheshkumar Sivasubramaniana012e092011-08-18 10:13:03 -060035void msm_pm_set_l2_flush_flag(unsigned int flag);
Praveen Chidambaram79f3b4a2012-09-18 19:48:29 -060036int msm_pm_get_l2_flush_flag(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070037extern unsigned long msm_pm_pc_pgd;
Steve Mucklec25a9362012-03-22 16:40:01 -070038extern unsigned long msm_pm_boot_vector[NR_CPUS];
Murali Nalajala93f29992012-03-21 15:59:27 +053039extern uint32_t target_type;
Murali Nalajala73c13332012-05-15 11:30:59 +053040extern uint32_t apps_power_collapse;
41extern uint32_t *l2x0_base_addr;
Maheshkumar Sivasubramaniana012e092011-08-18 10:13:03 -060042#else
43static inline void msm_pm_set_l2_flush_flag(unsigned int flag)
44{
45 /* empty */
46}
Murali Nalajala41786ab2012-03-06 10:47:32 +053047static inline void msm_pm_boot_entry(void)
48{
49 /* empty */
50}
51static inline void msm_pm_write_boot_vector(unsigned int cpu,
52 unsigned long address)
53{
54 /* empty */
55}
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070056#endif
Steve Mucklefcece052012-02-18 20:09:58 -080057#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070058#endif