blob: bfd632fb1bbcda630e807a00736498153f3e219e [file] [log] [blame]
Murali Nalajala41786ab2012-03-06 10:47:32 +05301/* Copyright (c) 2007-2009,2012 Code Aurora Forum. 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#ifdef CONFIG_MSM_CPU_AVS
18/* 11 general purpose registers (r4-r14), 10 cp15 registers, 3 AVS registers */
19#define CPU_SAVED_STATE_SIZE (4 * 11 + 4 * 10 + 4 * 3)
20#else
21/* 11 general purpose registers (r4-r14), 10 cp15 registers */
22#define CPU_SAVED_STATE_SIZE (4 * 11 + 4 * 10)
23#endif
24
Murali Nalajala93f29992012-03-21 15:59:27 +053025#define ON 1
26#define OFF 0
27#define TARGET_IS_8625 1
28
Steve Mucklefcece052012-02-18 20:09:58 -080029#ifndef __ASSEMBLY__
30
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070031int msm_arch_idle(void);
32int msm_pm_collapse(void);
33void msm_pm_collapse_exit(void);
Steve Mucklefcece052012-02-18 20:09:58 -080034extern void *msm_saved_state;
35extern unsigned long msm_saved_state_phys;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070036
37#ifdef CONFIG_CPU_V7
38void msm_pm_boot_entry(void);
Maheshkumar Sivasubramaniana012e092011-08-18 10:13:03 -060039void msm_pm_set_l2_flush_flag(unsigned int flag);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070040extern unsigned long msm_pm_pc_pgd;
Steve Mucklec25a9362012-03-22 16:40:01 -070041extern unsigned long msm_pm_boot_vector[NR_CPUS];
Murali Nalajala93f29992012-03-21 15:59:27 +053042extern uint32_t target_type;
Maheshkumar Sivasubramaniana012e092011-08-18 10:13:03 -060043#else
44static inline void msm_pm_set_l2_flush_flag(unsigned int flag)
45{
46 /* empty */
47}
Murali Nalajala41786ab2012-03-06 10:47:32 +053048static inline void msm_pm_boot_entry(void)
49{
50 /* empty */
51}
52static inline void msm_pm_write_boot_vector(unsigned int cpu,
53 unsigned long address)
54{
55 /* empty */
56}
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070057#endif
Steve Mucklefcece052012-02-18 20:09:58 -080058#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070059#endif