blob: 5550e96e3ccdca578c1f4f8142241517b3eec318 [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/* 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;
Girish Mahadevan55944992012-10-26 11:03:07 -060031extern void (*msm_pm_disable_l2_fn)(void);
32extern void (*msm_pm_enable_l2_fn)(void);
33extern void (*msm_pm_flush_l2_fn)(void);
Steve Mucklefcece052012-02-18 20:09:58 -080034extern unsigned long msm_saved_state_phys;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070035
36#ifdef CONFIG_CPU_V7
37void msm_pm_boot_entry(void);
Maheshkumar Sivasubramaniana012e092011-08-18 10:13:03 -060038void msm_pm_set_l2_flush_flag(unsigned int flag);
Praveen Chidambaramc594a092012-09-18 19:48:29 -060039int msm_pm_get_l2_flush_flag(void);
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;
Murali Nalajala73c13332012-05-15 11:30:59 +053043extern uint32_t apps_power_collapse;
44extern uint32_t *l2x0_base_addr;
Maheshkumar Sivasubramaniana012e092011-08-18 10:13:03 -060045#else
46static inline void msm_pm_set_l2_flush_flag(unsigned int flag)
47{
48 /* empty */
49}
Murali Nalajala41786ab2012-03-06 10:47:32 +053050static inline void msm_pm_boot_entry(void)
51{
52 /* empty */
53}
54static inline void msm_pm_write_boot_vector(unsigned int cpu,
55 unsigned long address)
56{
57 /* empty */
58}
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070059#endif
Steve Mucklefcece052012-02-18 20:09:58 -080060#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070061#endif