diff options
| author | Inderpal Singh <inderpal.singh@linaro.org> | 2012-05-14 11:20:09 -0400 |
|---|---|---|
| committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-14 11:20:09 -0400 |
| commit | 5ddfa8428b9f21453b1160846143e0b50d51b27c (patch) | |
| tree | 1b72d0eea77ba8fcd431e6e10f8010a8fb03fc73 | |
| parent | f1cb86ece24fbdf99d0cd544a2f0076f2d01eaa5 (diff) | |
ARM: EXYNOS: Support Suspend/Resume for EXYNOS4412
This patch provides the suspend/resume support for EXYNOS4412.
Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
| -rw-r--r-- | arch/arm/mach-exynos/include/mach/regs-pmu.h | 10 | ||||
| -rw-r--r-- | arch/arm/mach-exynos/pm.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-exynos/pmu.c | 24 |
3 files changed, 30 insertions, 6 deletions
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index 4c53f38b5a9e..606b19907f99 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h | |||
| @@ -177,7 +177,7 @@ | |||
| 177 | 177 | ||
| 178 | #define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0) | 178 | #define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0) |
| 179 | 179 | ||
| 180 | /* Only for EXYNOS4212 */ | 180 | /* Only for EXYNOS4x12 */ |
| 181 | #define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) | 181 | #define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) |
| 182 | #define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) | 182 | #define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) |
| 183 | #define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058) | 183 | #define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058) |
| @@ -218,4 +218,12 @@ | |||
| 218 | #define S5P_SECSS_MEM_OPTION S5P_PMUREG(0x2EC8) | 218 | #define S5P_SECSS_MEM_OPTION S5P_PMUREG(0x2EC8) |
| 219 | #define S5P_ROTATOR_MEM_OPTION S5P_PMUREG(0x2F48) | 219 | #define S5P_ROTATOR_MEM_OPTION S5P_PMUREG(0x2F48) |
| 220 | 220 | ||
| 221 | /* Only for EXYNOS4412 */ | ||
| 222 | #define S5P_ARM_CORE2_LOWPWR S5P_PMUREG(0x1020) | ||
| 223 | #define S5P_DIS_IRQ_CORE2 S5P_PMUREG(0x1024) | ||
| 224 | #define S5P_DIS_IRQ_CENTRAL2 S5P_PMUREG(0x1028) | ||
| 225 | #define S5P_ARM_CORE3_LOWPWR S5P_PMUREG(0x1030) | ||
| 226 | #define S5P_DIS_IRQ_CORE3 S5P_PMUREG(0x1034) | ||
| 227 | #define S5P_DIS_IRQ_CENTRAL3 S5P_PMUREG(0x1038) | ||
| 228 | |||
| 221 | #endif /* __ASM_ARCH_REGS_PMU_H */ | 229 | #endif /* __ASM_ARCH_REGS_PMU_H */ |
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 428cfeb57724..f0bb4677eb11 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c | |||
| @@ -313,7 +313,7 @@ static int exynos4_pm_suspend(void) | |||
| 313 | tmp &= ~S5P_CENTRAL_LOWPWR_CFG; | 313 | tmp &= ~S5P_CENTRAL_LOWPWR_CFG; |
| 314 | __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); | 314 | __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); |
| 315 | 315 | ||
| 316 | if (soc_is_exynos4212()) { | 316 | if (soc_is_exynos4212() || soc_is_exynos4412()) { |
| 317 | tmp = __raw_readl(S5P_CENTRAL_SEQ_OPTION); | 317 | tmp = __raw_readl(S5P_CENTRAL_SEQ_OPTION); |
| 318 | tmp &= ~(S5P_USE_STANDBYWFI_ISP_ARM | | 318 | tmp &= ~(S5P_USE_STANDBYWFI_ISP_ARM | |
| 319 | S5P_USE_STANDBYWFE_ISP_ARM); | 319 | S5P_USE_STANDBYWFE_ISP_ARM); |
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index bba48f5c3e8f..77c6815eebee 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c | |||
| @@ -94,7 +94,7 @@ static struct exynos4_pmu_conf exynos4210_pmu_config[] = { | |||
| 94 | { PMU_TABLE_END,}, | 94 | { PMU_TABLE_END,}, |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | static struct exynos4_pmu_conf exynos4212_pmu_config[] = { | 97 | static struct exynos4_pmu_conf exynos4x12_pmu_config[] = { |
| 98 | { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, | 98 | { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, |
| 99 | { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, | 99 | { S5P_DIS_IRQ_CORE0, { 0x0, 0x0, 0x0 } }, |
| 100 | { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } }, | 100 | { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } }, |
| @@ -202,6 +202,16 @@ static struct exynos4_pmu_conf exynos4212_pmu_config[] = { | |||
| 202 | { PMU_TABLE_END,}, | 202 | { PMU_TABLE_END,}, |
| 203 | }; | 203 | }; |
| 204 | 204 | ||
| 205 | static struct exynos4_pmu_conf exynos4412_pmu_config[] = { | ||
| 206 | { S5P_ARM_CORE2_LOWPWR, { 0x0, 0x0, 0x2 } }, | ||
| 207 | { S5P_DIS_IRQ_CORE2, { 0x0, 0x0, 0x0 } }, | ||
| 208 | { S5P_DIS_IRQ_CENTRAL2, { 0x0, 0x0, 0x0 } }, | ||
| 209 | { S5P_ARM_CORE3_LOWPWR, { 0x0, 0x0, 0x2 } }, | ||
| 210 | { S5P_DIS_IRQ_CORE3, { 0x0, 0x0, 0x0 } }, | ||
| 211 | { S5P_DIS_IRQ_CENTRAL3, { 0x0, 0x0, 0x0 } }, | ||
| 212 | { PMU_TABLE_END,}, | ||
| 213 | }; | ||
| 214 | |||
| 205 | void exynos4_sys_powerdown_conf(enum sys_powerdown mode) | 215 | void exynos4_sys_powerdown_conf(enum sys_powerdown mode) |
| 206 | { | 216 | { |
| 207 | unsigned int i; | 217 | unsigned int i; |
| @@ -209,6 +219,12 @@ void exynos4_sys_powerdown_conf(enum sys_powerdown mode) | |||
| 209 | for (i = 0; (exynos4_pmu_config[i].reg != PMU_TABLE_END) ; i++) | 219 | for (i = 0; (exynos4_pmu_config[i].reg != PMU_TABLE_END) ; i++) |
| 210 | __raw_writel(exynos4_pmu_config[i].val[mode], | 220 | __raw_writel(exynos4_pmu_config[i].val[mode], |
| 211 | exynos4_pmu_config[i].reg); | 221 | exynos4_pmu_config[i].reg); |
| 222 | |||
| 223 | if (soc_is_exynos4412()) { | ||
| 224 | for (i = 0; exynos4412_pmu_config[i].reg != PMU_TABLE_END ; i++) | ||
| 225 | __raw_writel(exynos4412_pmu_config[i].val[mode], | ||
| 226 | exynos4412_pmu_config[i].reg); | ||
| 227 | } | ||
| 212 | } | 228 | } |
| 213 | 229 | ||
| 214 | static int __init exynos4_pmu_init(void) | 230 | static int __init exynos4_pmu_init(void) |
| @@ -218,9 +234,9 @@ static int __init exynos4_pmu_init(void) | |||
| 218 | if (soc_is_exynos4210()) { | 234 | if (soc_is_exynos4210()) { |
| 219 | exynos4_pmu_config = exynos4210_pmu_config; | 235 | exynos4_pmu_config = exynos4210_pmu_config; |
| 220 | pr_info("EXYNOS4210 PMU Initialize\n"); | 236 | pr_info("EXYNOS4210 PMU Initialize\n"); |
| 221 | } else if (soc_is_exynos4212()) { | 237 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { |
| 222 | exynos4_pmu_config = exynos4212_pmu_config; | 238 | exynos4_pmu_config = exynos4x12_pmu_config; |
| 223 | pr_info("EXYNOS4212 PMU Initialize\n"); | 239 | pr_info("EXYNOS4x12 PMU Initialize\n"); |
| 224 | } else { | 240 | } else { |
| 225 | pr_info("EXYNOS4: PMU not supported\n"); | 241 | pr_info("EXYNOS4: PMU not supported\n"); |
| 226 | } | 242 | } |
