Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd. |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 3 | * http://www.samsung.com |
| 4 | * |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 5 | * EXYNOS - Power Management support |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 6 | * |
| 7 | * Based on arch/arm/mach-s3c2410/pm.c |
| 8 | * Copyright (c) 2006 Simtec Electronics |
| 9 | * Ben Dooks <ben@simtec.co.uk> |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as |
| 13 | * published by the Free Software Foundation. |
| 14 | */ |
| 15 | |
| 16 | #include <linux/init.h> |
| 17 | #include <linux/suspend.h> |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 18 | #include <linux/syscore_ops.h> |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 19 | #include <linux/io.h> |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 20 | #include <linux/err.h> |
| 21 | #include <linux/clk.h> |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 22 | |
| 23 | #include <asm/cacheflush.h> |
| 24 | #include <asm/hardware/cache-l2x0.h> |
Shawn Guo | 63b870f | 2011-11-17 01:19:11 +0900 | [diff] [blame] | 25 | #include <asm/smp_scu.h> |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 26 | |
| 27 | #include <plat/cpu.h> |
| 28 | #include <plat/pm.h> |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 29 | #include <plat/pll.h> |
MyungJoo Ham | b93cb91 | 2011-07-21 11:25:23 +0900 | [diff] [blame] | 30 | #include <plat/regs-srom.h> |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 31 | |
| 32 | #include <mach/regs-irq.h> |
| 33 | #include <mach/regs-gpio.h> |
| 34 | #include <mach/regs-clock.h> |
| 35 | #include <mach/regs-pmu.h> |
| 36 | #include <mach/pm-core.h> |
Jaecheol Lee | e4cf2d1 | 2011-07-18 19:21:27 +0900 | [diff] [blame] | 37 | #include <mach/pmu.h> |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 38 | |
| 39 | static struct sleep_save exynos4_set_clksrc[] = { |
Kukjin Kim | a855039 | 2012-03-09 14:19:10 -0800 | [diff] [blame] | 40 | { .reg = EXYNOS4_CLKSRC_MASK_TOP , .val = 0x00000001, }, |
| 41 | { .reg = EXYNOS4_CLKSRC_MASK_CAM , .val = 0x11111111, }, |
| 42 | { .reg = EXYNOS4_CLKSRC_MASK_TV , .val = 0x00000111, }, |
| 43 | { .reg = EXYNOS4_CLKSRC_MASK_LCD0 , .val = 0x00001111, }, |
| 44 | { .reg = EXYNOS4_CLKSRC_MASK_MAUDIO , .val = 0x00000001, }, |
| 45 | { .reg = EXYNOS4_CLKSRC_MASK_FSYS , .val = 0x01011111, }, |
| 46 | { .reg = EXYNOS4_CLKSRC_MASK_PERIL0 , .val = 0x01111111, }, |
| 47 | { .reg = EXYNOS4_CLKSRC_MASK_PERIL1 , .val = 0x01110111, }, |
| 48 | { .reg = EXYNOS4_CLKSRC_MASK_DMC , .val = 0x00010000, }, |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 49 | }; |
| 50 | |
Jonghwan Choi | acd3561 | 2011-08-24 21:52:45 +0900 | [diff] [blame] | 51 | static struct sleep_save exynos4210_set_clksrc[] = { |
Kukjin Kim | a855039 | 2012-03-09 14:19:10 -0800 | [diff] [blame] | 52 | { .reg = EXYNOS4210_CLKSRC_MASK_LCD1 , .val = 0x00001111, }, |
Jonghwan Choi | acd3561 | 2011-08-24 21:52:45 +0900 | [diff] [blame] | 53 | }; |
| 54 | |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 55 | static struct sleep_save exynos4_epll_save[] = { |
Kukjin Kim | a855039 | 2012-03-09 14:19:10 -0800 | [diff] [blame] | 56 | SAVE_ITEM(EXYNOS4_EPLL_CON0), |
| 57 | SAVE_ITEM(EXYNOS4_EPLL_CON1), |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 58 | }; |
| 59 | |
| 60 | static struct sleep_save exynos4_vpll_save[] = { |
Kukjin Kim | a855039 | 2012-03-09 14:19:10 -0800 | [diff] [blame] | 61 | SAVE_ITEM(EXYNOS4_VPLL_CON0), |
| 62 | SAVE_ITEM(EXYNOS4_VPLL_CON1), |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 63 | }; |
| 64 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 65 | static struct sleep_save exynos_core_save[] = { |
MyungJoo Ham | b93cb91 | 2011-07-21 11:25:23 +0900 | [diff] [blame] | 66 | /* SROM side */ |
| 67 | SAVE_ITEM(S5P_SROM_BW), |
| 68 | SAVE_ITEM(S5P_SROM_BC0), |
| 69 | SAVE_ITEM(S5P_SROM_BC1), |
| 70 | SAVE_ITEM(S5P_SROM_BC2), |
| 71 | SAVE_ITEM(S5P_SROM_BC3), |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 72 | }; |
| 73 | |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 74 | |
Jaecheol Lee | f4ba4b0 | 2011-07-18 19:25:03 +0900 | [diff] [blame] | 75 | /* For Cortex-A9 Diagnostic and Power control register */ |
| 76 | static unsigned int save_arm_register[2]; |
| 77 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 78 | static int exynos_cpu_suspend(unsigned long arg) |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 79 | { |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 80 | outer_flush_all(); |
| 81 | |
| 82 | /* issue the standby signal into the pm unit. */ |
| 83 | cpu_do_idle(); |
| 84 | |
| 85 | /* we should never get past here */ |
| 86 | panic("sleep resumed to originator?"); |
| 87 | } |
| 88 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 89 | static void exynos_pm_prepare(void) |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 90 | { |
| 91 | u32 tmp; |
| 92 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 93 | s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 94 | s3c_pm_do_save(exynos4_epll_save, ARRAY_SIZE(exynos4_epll_save)); |
| 95 | s3c_pm_do_save(exynos4_vpll_save, ARRAY_SIZE(exynos4_vpll_save)); |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 96 | |
| 97 | tmp = __raw_readl(S5P_INFORM1); |
| 98 | |
| 99 | /* Set value of power down register for sleep mode */ |
| 100 | |
Jongpill Lee | 7d44d2b | 2012-02-17 09:51:31 +0900 | [diff] [blame^] | 101 | exynos_sys_powerdown_conf(SYS_SLEEP); |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 102 | __raw_writel(S5P_CHECK_SLEEP, S5P_INFORM1); |
| 103 | |
| 104 | /* ensure at least INFORM0 has the resume address */ |
| 105 | |
| 106 | __raw_writel(virt_to_phys(s3c_cpu_resume), S5P_INFORM0); |
| 107 | |
| 108 | /* Before enter central sequence mode, clock src register have to set */ |
| 109 | |
| 110 | s3c_pm_do_restore_core(exynos4_set_clksrc, ARRAY_SIZE(exynos4_set_clksrc)); |
| 111 | |
Jonghwan Choi | acd3561 | 2011-08-24 21:52:45 +0900 | [diff] [blame] | 112 | if (soc_is_exynos4210()) |
| 113 | s3c_pm_do_restore_core(exynos4210_set_clksrc, ARRAY_SIZE(exynos4210_set_clksrc)); |
| 114 | |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 115 | } |
| 116 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 117 | static int exynos_pm_add(struct device *dev, struct subsys_interface *sif) |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 118 | { |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 119 | pm_cpu_prep = exynos_pm_prepare; |
| 120 | pm_cpu_sleep = exynos_cpu_suspend; |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 121 | |
| 122 | return 0; |
| 123 | } |
| 124 | |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 125 | static unsigned long pll_base_rate; |
| 126 | |
| 127 | static void exynos4_restore_pll(void) |
| 128 | { |
| 129 | unsigned long pll_con, locktime, lockcnt; |
| 130 | unsigned long pll_in_rate; |
| 131 | unsigned int p_div, epll_wait = 0, vpll_wait = 0; |
| 132 | |
| 133 | if (pll_base_rate == 0) |
| 134 | return; |
| 135 | |
| 136 | pll_in_rate = pll_base_rate; |
| 137 | |
| 138 | /* EPLL */ |
| 139 | pll_con = exynos4_epll_save[0].val; |
| 140 | |
| 141 | if (pll_con & (1 << 31)) { |
| 142 | pll_con &= (PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT); |
| 143 | p_div = (pll_con >> PLL46XX_PDIV_SHIFT); |
| 144 | |
| 145 | pll_in_rate /= 1000000; |
| 146 | |
| 147 | locktime = (3000 / pll_in_rate) * p_div; |
| 148 | lockcnt = locktime * 10000 / (10000 / pll_in_rate); |
| 149 | |
Kukjin Kim | a855039 | 2012-03-09 14:19:10 -0800 | [diff] [blame] | 150 | __raw_writel(lockcnt, EXYNOS4_EPLL_LOCK); |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 151 | |
| 152 | s3c_pm_do_restore_core(exynos4_epll_save, |
| 153 | ARRAY_SIZE(exynos4_epll_save)); |
| 154 | epll_wait = 1; |
| 155 | } |
| 156 | |
| 157 | pll_in_rate = pll_base_rate; |
| 158 | |
| 159 | /* VPLL */ |
| 160 | pll_con = exynos4_vpll_save[0].val; |
| 161 | |
| 162 | if (pll_con & (1 << 31)) { |
| 163 | pll_in_rate /= 1000000; |
| 164 | /* 750us */ |
| 165 | locktime = 750; |
| 166 | lockcnt = locktime * 10000 / (10000 / pll_in_rate); |
| 167 | |
Kukjin Kim | a855039 | 2012-03-09 14:19:10 -0800 | [diff] [blame] | 168 | __raw_writel(lockcnt, EXYNOS4_VPLL_LOCK); |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 169 | |
| 170 | s3c_pm_do_restore_core(exynos4_vpll_save, |
| 171 | ARRAY_SIZE(exynos4_vpll_save)); |
| 172 | vpll_wait = 1; |
| 173 | } |
| 174 | |
| 175 | /* Wait PLL locking */ |
| 176 | |
| 177 | do { |
| 178 | if (epll_wait) { |
Kukjin Kim | a855039 | 2012-03-09 14:19:10 -0800 | [diff] [blame] | 179 | pll_con = __raw_readl(EXYNOS4_EPLL_CON0); |
| 180 | if (pll_con & (1 << EXYNOS4_EPLLCON0_LOCKED_SHIFT)) |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 181 | epll_wait = 0; |
| 182 | } |
| 183 | |
| 184 | if (vpll_wait) { |
Kukjin Kim | a855039 | 2012-03-09 14:19:10 -0800 | [diff] [blame] | 185 | pll_con = __raw_readl(EXYNOS4_VPLL_CON0); |
| 186 | if (pll_con & (1 << EXYNOS4_VPLLCON0_LOCKED_SHIFT)) |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 187 | vpll_wait = 0; |
| 188 | } |
| 189 | } while (epll_wait || vpll_wait); |
| 190 | } |
| 191 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 192 | static struct subsys_interface exynos_pm_interface = { |
Kay Sievers | 4a858cf | 2011-12-21 16:01:38 -0800 | [diff] [blame] | 193 | .name = "exynos4_pm", |
Thomas Abraham | 9ee6af9 | 2012-05-15 15:47:40 +0900 | [diff] [blame] | 194 | .subsys = &exynos_subsys, |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 195 | .add_dev = exynos_pm_add, |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 196 | }; |
| 197 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 198 | static __init int exynos_pm_drvinit(void) |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 199 | { |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 200 | struct clk *pll_base; |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 201 | unsigned int tmp; |
| 202 | |
| 203 | s3c_pm_init(); |
| 204 | |
| 205 | /* All wakeup disable */ |
| 206 | |
| 207 | tmp = __raw_readl(S5P_WAKEUP_MASK); |
| 208 | tmp |= ((0xFF << 8) | (0x1F << 1)); |
| 209 | __raw_writel(tmp, S5P_WAKEUP_MASK); |
| 210 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 211 | if (!soc_is_exynos5250()) { |
| 212 | pll_base = clk_get(NULL, "xtal"); |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 213 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 214 | if (!IS_ERR(pll_base)) { |
| 215 | pll_base_rate = clk_get_rate(pll_base); |
| 216 | clk_put(pll_base); |
| 217 | } |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 218 | } |
| 219 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 220 | return subsys_interface_register(&exynos_pm_interface); |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 221 | } |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 222 | arch_initcall(exynos_pm_drvinit); |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 223 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 224 | static int exynos_pm_suspend(void) |
Jaecheol Lee | 12974e9 | 2011-07-18 19:21:41 +0900 | [diff] [blame] | 225 | { |
| 226 | unsigned long tmp; |
| 227 | |
| 228 | /* Setting Central Sequence Register for power down mode */ |
| 229 | |
| 230 | tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION); |
| 231 | tmp &= ~S5P_CENTRAL_LOWPWR_CFG; |
| 232 | __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); |
| 233 | |
Inderpal Singh | 5ddfa84 | 2012-05-15 00:20:09 +0900 | [diff] [blame] | 234 | if (soc_is_exynos4212() || soc_is_exynos4412()) { |
Jongpill Lee | 00a351f | 2011-09-27 07:26:04 +0900 | [diff] [blame] | 235 | tmp = __raw_readl(S5P_CENTRAL_SEQ_OPTION); |
| 236 | tmp &= ~(S5P_USE_STANDBYWFI_ISP_ARM | |
| 237 | S5P_USE_STANDBYWFE_ISP_ARM); |
| 238 | __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); |
| 239 | } |
| 240 | |
Jaecheol Lee | f4ba4b0 | 2011-07-18 19:25:03 +0900 | [diff] [blame] | 241 | /* Save Power control register */ |
| 242 | asm ("mrc p15, 0, %0, c15, c0, 0" |
| 243 | : "=r" (tmp) : : "cc"); |
| 244 | save_arm_register[0] = tmp; |
| 245 | |
| 246 | /* Save Diagnostic register */ |
| 247 | asm ("mrc p15, 0, %0, c15, c0, 1" |
| 248 | : "=r" (tmp) : : "cc"); |
| 249 | save_arm_register[1] = tmp; |
| 250 | |
Jaecheol Lee | 12974e9 | 2011-07-18 19:21:41 +0900 | [diff] [blame] | 251 | return 0; |
| 252 | } |
| 253 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 254 | static void exynos_pm_resume(void) |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 255 | { |
Jaecheol Lee | e240ab1 | 2011-07-18 19:21:34 +0900 | [diff] [blame] | 256 | unsigned long tmp; |
| 257 | |
| 258 | /* |
| 259 | * If PMU failed while entering sleep mode, WFI will be |
| 260 | * ignored by PMU and then exiting cpu_do_idle(). |
| 261 | * S5P_CENTRAL_LOWPWR_CFG bit will not be set automatically |
| 262 | * in this situation. |
| 263 | */ |
| 264 | tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION); |
| 265 | if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) { |
| 266 | tmp |= S5P_CENTRAL_LOWPWR_CFG; |
| 267 | __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); |
| 268 | /* No need to perform below restore code */ |
| 269 | goto early_wakeup; |
| 270 | } |
Jaecheol Lee | f4ba4b0 | 2011-07-18 19:25:03 +0900 | [diff] [blame] | 271 | /* Restore Power control register */ |
| 272 | tmp = save_arm_register[0]; |
| 273 | asm volatile ("mcr p15, 0, %0, c15, c0, 0" |
| 274 | : : "r" (tmp) |
| 275 | : "cc"); |
| 276 | |
| 277 | /* Restore Diagnostic register */ |
| 278 | tmp = save_arm_register[1]; |
| 279 | asm volatile ("mcr p15, 0, %0, c15, c0, 1" |
| 280 | : : "r" (tmp) |
| 281 | : "cc"); |
Jaecheol Lee | e240ab1 | 2011-07-18 19:21:34 +0900 | [diff] [blame] | 282 | |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 283 | /* For release retention */ |
| 284 | |
| 285 | __raw_writel((1 << 28), S5P_PAD_RET_MAUDIO_OPTION); |
| 286 | __raw_writel((1 << 28), S5P_PAD_RET_GPIO_OPTION); |
| 287 | __raw_writel((1 << 28), S5P_PAD_RET_UART_OPTION); |
| 288 | __raw_writel((1 << 28), S5P_PAD_RET_MMCA_OPTION); |
| 289 | __raw_writel((1 << 28), S5P_PAD_RET_MMCB_OPTION); |
| 290 | __raw_writel((1 << 28), S5P_PAD_RET_EBIA_OPTION); |
| 291 | __raw_writel((1 << 28), S5P_PAD_RET_EBIB_OPTION); |
| 292 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 293 | s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 294 | |
Jaecheol Lee | 56c03d9 | 2011-07-18 19:25:13 +0900 | [diff] [blame] | 295 | exynos4_restore_pll(); |
| 296 | |
Marek Szyprowski | 556ef3e | 2012-01-27 14:47:45 +0900 | [diff] [blame] | 297 | #ifdef CONFIG_SMP |
Shawn Guo | 63b870f | 2011-11-17 01:19:11 +0900 | [diff] [blame] | 298 | scu_enable(S5P_VA_SCU); |
Marek Szyprowski | 556ef3e | 2012-01-27 14:47:45 +0900 | [diff] [blame] | 299 | #endif |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 300 | |
Jaecheol Lee | e240ab1 | 2011-07-18 19:21:34 +0900 | [diff] [blame] | 301 | early_wakeup: |
| 302 | return; |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 303 | } |
| 304 | |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 305 | static struct syscore_ops exynos_pm_syscore_ops = { |
| 306 | .suspend = exynos_pm_suspend, |
| 307 | .resume = exynos_pm_resume, |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 308 | }; |
| 309 | |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 310 | static __init int exynos4_pm_syscore_init(void) |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 311 | { |
Jongpill Lee | c934710 | 2012-02-17 09:49:54 +0900 | [diff] [blame] | 312 | register_syscore_ops(&exynos_pm_syscore_ops); |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 313 | return 0; |
Jaecheol Lee | 1663895 | 2011-03-10 13:33:59 +0900 | [diff] [blame] | 314 | } |
Rafael J. Wysocki | bb072c3 | 2011-04-22 22:03:21 +0200 | [diff] [blame] | 315 | arch_initcall(exynos4_pm_syscore_init); |