blob: aee24b5e44ee3825da03d7760a2ba6d15b9de373 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/* linux/arch/arm/mach-exynos/include/mach/pmu.h
*
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* EXYNOS4210 - PMU support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_ARCH_PMU_H
#define __ASM_ARCH_PMU_H __FILE__
#include <linux/cpu.h>
static inline void exynos4_reset_assert_ctrl(unsigned int on)
{
unsigned int i;
unsigned int core_option;
for (i = 0 ; i < num_possible_cpus(); i++) {
core_option = __raw_readl(S5P_ARM_CORE_OPTION(i));
core_option &= ~S5P_USE_DELAYED_RESET_ASSERTION;
core_option |= (on << S5P_USE_DELAYED_RESET_OFFSET);
__raw_writel(core_option, S5P_ARM_CORE_OPTION(i));
}
}
static inline int exynos4_is_c2c_use(void)
{
unsigned int ret;
ret = __raw_readl(S5P_C2C_CTRL);
return ret;
}
enum sys_powerdown {
SYS_AFTR,
SYS_LPA,
SYS_SLEEP,
NUM_SYS_POWERDOWN,
};
struct exynos4_pmu_conf {
void __iomem *reg;
unsigned long val[NUM_SYS_POWERDOWN];
};
enum c2c_pwr_mode {
MIN_LATENCY,
SHORT_LATENCY,
MAX_LATENCY,
};
struct exynos4_c2c_pmu_conf {
void __iomem *reg;
unsigned long val;
};
/* external function for exynos4 series */
extern void exynos4_sys_powerdown_conf(enum sys_powerdown mode);
extern int exynos4_enter_lp(unsigned long *saveblk, long);
extern void exynos4_idle_resume(void);
extern void exynos4_c2c_request_pwr_mode(enum c2c_pwr_mode mode);
/* external function for exynos5 series */
extern void exynos5_sys_powerdown_conf(enum sys_powerdown mode);
extern int exynos5_enter_lp(unsigned long *saveblk, long);
extern void exynos5_idle_resume(void);
#endif /* __ASM_ARCH_PMU_H */
|