blob: c4fdde47742128fb34f0f873fd3adbe9863032b0 [file] [log] [blame]
Kevin Hilman8bd22942009-05-28 10:56:16 -07001/*
2 * OMAP2 Power Management Routines
3 *
4 * Copyright (C) 2005 Texas Instruments, Inc.
5 * Copyright (C) 2006-2008 Nokia Corporation
6 *
7 * Written by:
8 * Richard Woodruff <r-woodruff2@ti.com>
9 * Tony Lindgren
10 * Juha Yrjola
11 * Amit Kucheria <amit.kucheria@nokia.com>
12 * Igor Stoppa <igor.stoppa@nokia.com>
13 *
14 * Based on pm.c for omap1
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#include <linux/suspend.h>
22#include <linux/sched.h>
23#include <linux/proc_fs.h>
24#include <linux/interrupt.h>
25#include <linux/sysfs.h>
26#include <linux/module.h>
27#include <linux/delay.h>
28#include <linux/clk.h>
Kevin Hilman8bd22942009-05-28 10:56:16 -070029#include <linux/irq.h>
30#include <linux/time.h>
31#include <linux/gpio.h>
32
33#include <asm/mach/time.h>
34#include <asm/mach/irq.h>
35#include <asm/mach-types.h>
36
Tony Lindgrence491cf2009-10-20 09:40:47 -070037#include <plat/clock.h>
38#include <plat/sram.h>
Tony Lindgrence491cf2009-10-20 09:40:47 -070039#include <plat/dma.h>
40#include <plat/board.h>
Kevin Hilman8bd22942009-05-28 10:56:16 -070041
Tony Lindgrenee0839c2012-02-24 10:34:35 -080042#include <mach/irqs.h>
43
Tony Lindgren4e653312011-11-10 22:45:17 +010044#include "common.h"
Paul Walmsley59fb6592010-12-21 15:30:55 -070045#include "prm2xxx_3xxx.h"
Kevin Hilman8bd22942009-05-28 10:56:16 -070046#include "prm-regbits-24xx.h"
Paul Walmsley59fb6592010-12-21 15:30:55 -070047#include "cm2xxx_3xxx.h"
Kevin Hilman8bd22942009-05-28 10:56:16 -070048#include "cm-regbits-24xx.h"
49#include "sdrc.h"
50#include "pm.h"
Paul Walmsley4814ced2010-10-08 11:40:20 -060051#include "control.h"
Paul Walmsley72e06d02010-12-21 21:05:16 -070052#include "powerdomain.h"
Paul Walmsley1540f2142010-12-21 21:05:15 -070053#include "clockdomain.h"
Kevin Hilman8bd22942009-05-28 10:56:16 -070054
Kevin Hilmane83df172010-12-08 22:40:40 +000055#ifdef CONFIG_SUSPEND
56static suspend_state_t suspend_state = PM_SUSPEND_ON;
57static inline bool is_suspending(void)
58{
59 return (suspend_state != PM_SUSPEND_ON);
60}
61#else
62static inline bool is_suspending(void)
63{
64 return false;
65}
66#endif
67
Kevin Hilman8bd22942009-05-28 10:56:16 -070068static void (*omap2_sram_idle)(void);
69static void (*omap2_sram_suspend)(u32 dllctrl, void __iomem *sdrc_dlla_ctrl,
70 void __iomem *sdrc_power);
71
Paul Walmsley369d5612010-01-26 20:13:01 -070072static struct powerdomain *mpu_pwrdm, *core_pwrdm;
73static struct clockdomain *dsp_clkdm, *mpu_clkdm, *wkup_clkdm, *gfx_clkdm;
Kevin Hilman8bd22942009-05-28 10:56:16 -070074
75static struct clk *osc_ck, *emul_ck;
76
77static int omap2_fclks_active(void)
78{
79 u32 f1, f2;
80
Paul Walmsleyc4d7e582010-12-21 21:05:14 -070081 f1 = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
82 f2 = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2);
Kevin Hilman4af40162009-02-04 10:51:40 -080083
Paul Walmsley1e056dd2012-02-09 18:24:03 -070084 return (f1 | f2) ? 1 : 0;
Kevin Hilman8bd22942009-05-28 10:56:16 -070085}
86
Kevin Hilman8bd22942009-05-28 10:56:16 -070087static void omap2_enter_full_retention(void)
88{
89 u32 l;
Kevin Hilman8bd22942009-05-28 10:56:16 -070090
91 /* There is 1 reference hold for all children of the oscillator
92 * clock, the following will remove it. If no one else uses the
93 * oscillator itself it will be disabled if/when we enter retention
94 * mode.
95 */
96 clk_disable(osc_ck);
97
98 /* Clear old wake-up events */
99 /* REVISIT: These write to reserved bits? */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700100 omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, PM_WKST1);
101 omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP24XX_PM_WKST2);
102 omap2_prm_write_mod_reg(0xffffffff, WKUP_MOD, PM_WKST);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700103
104 /*
105 * Set MPU powerdomain's next power state to RETENTION;
106 * preserve logic state during retention
107 */
108 pwrdm_set_logic_retst(mpu_pwrdm, PWRDM_POWER_RET);
109 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_RET);
110
111 /* Workaround to kill USB */
112 l = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0) | OMAP24XX_USBSTANDBYCTRL;
113 omap_ctrl_writel(l, OMAP2_CONTROL_DEVCONF0);
114
Paul Walmsley72e06d02010-12-21 21:05:16 -0700115 omap2_gpio_prepare_for_idle(0);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700116
Kevin Hilman8bd22942009-05-28 10:56:16 -0700117 /* One last check for pending IRQs to avoid extra latency due
118 * to sleeping unnecessarily. */
Jouni Hogander94434532009-02-03 15:49:04 -0800119 if (omap_irq_pending())
Kevin Hilman8bd22942009-05-28 10:56:16 -0700120 goto no_sleep;
121
122 /* Jump to SRAM suspend code */
123 omap2_sram_suspend(sdrc_read_reg(SDRC_DLLA_CTRL),
124 OMAP_SDRC_REGADDR(SDRC_DLLA_CTRL),
125 OMAP_SDRC_REGADDR(SDRC_POWER));
Kevin Hilman8bd22942009-05-28 10:56:16 -0700126
Kevin Hilman4af40162009-02-04 10:51:40 -0800127no_sleep:
Kevin Hilman43ffcd92009-01-27 11:09:24 -0800128 omap2_gpio_resume_after_idle();
Kevin Hilman8bd22942009-05-28 10:56:16 -0700129
130 clk_enable(osc_ck);
131
132 /* clear CORE wake-up events */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700133 omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, PM_WKST1);
134 omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP24XX_PM_WKST2);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700135
136 /* wakeup domain events - bit 1: GPT1, bit5 GPIO */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700137 omap2_prm_clear_mod_reg_bits(0x4 | 0x1, WKUP_MOD, PM_WKST);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700138
139 /* MPU domain wake events */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700140 l = omap2_prm_read_mod_reg(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700141 if (l & 0x01)
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700142 omap2_prm_write_mod_reg(0x01, OCP_MOD,
Kevin Hilman8bd22942009-05-28 10:56:16 -0700143 OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
144 if (l & 0x20)
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700145 omap2_prm_write_mod_reg(0x20, OCP_MOD,
Kevin Hilman8bd22942009-05-28 10:56:16 -0700146 OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
147
148 /* Mask future PRCM-to-MPU interrupts */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700149 omap2_prm_write_mod_reg(0x0, OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700150}
151
152static int omap2_i2c_active(void)
153{
154 u32 l;
155
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700156 l = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
Paul Walmsleyf38ca102010-05-20 12:31:04 -0600157 return l & (OMAP2420_EN_I2C2_MASK | OMAP2420_EN_I2C1_MASK);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700158}
159
160static int sti_console_enabled;
161
162static int omap2_allow_mpu_retention(void)
163{
164 u32 l;
165
166 /* Check for MMC, UART2, UART1, McSPI2, McSPI1 and DSS1. */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700167 l = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
Paul Walmsley2fd0f752010-05-18 18:40:23 -0600168 if (l & (OMAP2420_EN_MMC_MASK | OMAP24XX_EN_UART2_MASK |
169 OMAP24XX_EN_UART1_MASK | OMAP24XX_EN_MCSPI2_MASK |
170 OMAP24XX_EN_MCSPI1_MASK | OMAP24XX_EN_DSS1_MASK))
Kevin Hilman8bd22942009-05-28 10:56:16 -0700171 return 0;
172 /* Check for UART3. */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700173 l = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2);
Paul Walmsley2fd0f752010-05-18 18:40:23 -0600174 if (l & OMAP24XX_EN_UART3_MASK)
Kevin Hilman8bd22942009-05-28 10:56:16 -0700175 return 0;
176 if (sti_console_enabled)
177 return 0;
178
179 return 1;
180}
181
182static void omap2_enter_mpu_retention(void)
183{
184 int only_idle = 0;
Kevin Hilman8bd22942009-05-28 10:56:16 -0700185
186 /* Putting MPU into the WFI state while a transfer is active
187 * seems to cause the I2C block to timeout. Why? Good question. */
188 if (omap2_i2c_active())
189 return;
190
191 /* The peripherals seem not to be able to wake up the MPU when
192 * it is in retention mode. */
193 if (omap2_allow_mpu_retention()) {
194 /* REVISIT: These write to reserved bits? */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700195 omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, PM_WKST1);
196 omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP24XX_PM_WKST2);
197 omap2_prm_write_mod_reg(0xffffffff, WKUP_MOD, PM_WKST);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700198
199 /* Try to enter MPU retention */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700200 omap2_prm_write_mod_reg((0x01 << OMAP_POWERSTATE_SHIFT) |
Paul Walmsley2fd0f752010-05-18 18:40:23 -0600201 OMAP_LOGICRETSTATE_MASK,
Abhijit Pagare37903002010-01-26 20:12:51 -0700202 MPU_MOD, OMAP2_PM_PWSTCTRL);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700203 } else {
204 /* Block MPU retention */
205
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700206 omap2_prm_write_mod_reg(OMAP_LOGICRETSTATE_MASK, MPU_MOD,
Abhijit Pagare37903002010-01-26 20:12:51 -0700207 OMAP2_PM_PWSTCTRL);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700208 only_idle = 1;
209 }
210
Kevin Hilman8bd22942009-05-28 10:56:16 -0700211 omap2_sram_idle();
Kevin Hilman8bd22942009-05-28 10:56:16 -0700212}
213
214static int omap2_can_sleep(void)
215{
216 if (omap2_fclks_active())
217 return 0;
218 if (osc_ck->usecount > 1)
219 return 0;
220 if (omap_dma_running())
221 return 0;
222
223 return 1;
224}
225
226static void omap2_pm_idle(void)
227{
Kevin Hilman8bd22942009-05-28 10:56:16 -0700228 local_fiq_disable();
229
230 if (!omap2_can_sleep()) {
Jouni Hogander94434532009-02-03 15:49:04 -0800231 if (omap_irq_pending())
Kevin Hilman8bd22942009-05-28 10:56:16 -0700232 goto out;
233 omap2_enter_mpu_retention();
234 goto out;
235 }
236
Jouni Hogander94434532009-02-03 15:49:04 -0800237 if (omap_irq_pending())
Kevin Hilman8bd22942009-05-28 10:56:16 -0700238 goto out;
239
240 omap2_enter_full_retention();
241
242out:
243 local_fiq_enable();
Kevin Hilman8bd22942009-05-28 10:56:16 -0700244}
245
Kevin Hilman05fad3e2010-12-22 23:04:17 +0000246#ifdef CONFIG_SUSPEND
Kevin Hilmane83df172010-12-08 22:40:40 +0000247static int omap2_pm_begin(suspend_state_t state)
248{
Kevin Hilman8bd22942009-05-28 10:56:16 -0700249 disable_hlt();
Jean Pihetc1663812010-12-09 18:39:58 +0100250 suspend_state = state;
Kevin Hilman8bd22942009-05-28 10:56:16 -0700251 return 0;
252}
253
Kevin Hilman8bd22942009-05-28 10:56:16 -0700254static int omap2_pm_enter(suspend_state_t state)
255{
256 int ret = 0;
257
258 switch (state) {
259 case PM_SUSPEND_STANDBY:
260 case PM_SUSPEND_MEM:
Paul Walmsley645c56a2012-02-24 10:34:32 -0800261 omap2_enter_full_retention();
Kevin Hilman8bd22942009-05-28 10:56:16 -0700262 break;
263 default:
264 ret = -EINVAL;
265 }
266
267 return ret;
268}
269
Kevin Hilmane83df172010-12-08 22:40:40 +0000270static void omap2_pm_end(void)
271{
272 suspend_state = PM_SUSPEND_ON;
Jean Pihetc1663812010-12-09 18:39:58 +0100273 enable_hlt();
Kevin Hilmane83df172010-12-08 22:40:40 +0000274}
275
Lionel Debroux2f55ac02010-11-16 14:14:02 +0100276static const struct platform_suspend_ops omap_pm_ops = {
Kevin Hilmane83df172010-12-08 22:40:40 +0000277 .begin = omap2_pm_begin,
Kevin Hilman8bd22942009-05-28 10:56:16 -0700278 .enter = omap2_pm_enter,
Kevin Hilmane83df172010-12-08 22:40:40 +0000279 .end = omap2_pm_end,
Kevin Hilman8bd22942009-05-28 10:56:16 -0700280 .valid = suspend_valid_only_mem,
281};
Kevin Hilman05fad3e2010-12-22 23:04:17 +0000282#else
283static const struct platform_suspend_ops __initdata omap_pm_ops;
284#endif /* CONFIG_SUSPEND */
Kevin Hilman8bd22942009-05-28 10:56:16 -0700285
Kevin Hilman8bd22942009-05-28 10:56:16 -0700286static void __init prcm_setup_regs(void)
287{
288 int i, num_mem_banks;
289 struct powerdomain *pwrdm;
290
Paul Walmsley4ef70c02011-02-25 15:39:30 -0700291 /*
292 * Enable autoidle
293 * XXX This should be handled by hwmod code or PRCM init code
294 */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700295 omap2_prm_write_mod_reg(OMAP24XX_AUTOIDLE_MASK, OCP_MOD,
Kevin Hilman8bd22942009-05-28 10:56:16 -0700296 OMAP2_PRCM_SYSCONFIG_OFFSET);
297
Kevin Hilman8bd22942009-05-28 10:56:16 -0700298 /*
299 * Set CORE powerdomain memory banks to retain their contents
300 * during RETENTION
301 */
302 num_mem_banks = pwrdm_get_mem_bank_count(core_pwrdm);
303 for (i = 0; i < num_mem_banks; i++)
304 pwrdm_set_mem_retst(core_pwrdm, i, PWRDM_POWER_RET);
305
306 /* Set CORE powerdomain's next power state to RETENTION */
307 pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_RET);
308
309 /*
310 * Set MPU powerdomain's next power state to RETENTION;
311 * preserve logic state during retention
312 */
313 pwrdm_set_logic_retst(mpu_pwrdm, PWRDM_POWER_RET);
314 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_RET);
315
316 /* Force-power down DSP, GFX powerdomains */
317
318 pwrdm = clkdm_get_pwrdm(dsp_clkdm);
319 pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF);
Rajendra Nayak68b921a2011-02-25 16:06:47 -0700320 clkdm_sleep(dsp_clkdm);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700321
322 pwrdm = clkdm_get_pwrdm(gfx_clkdm);
323 pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF);
Rajendra Nayak68b921a2011-02-25 16:06:47 -0700324 clkdm_sleep(gfx_clkdm);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700325
Paul Walmsley51d070a2011-01-27 02:52:55 -0700326 /* Enable hardware-supervised idle for all clkdms */
Paul Walmsley92206fd2012-02-02 02:38:50 -0700327 clkdm_for_each(omap_pm_clkdms_setup, NULL);
Paul Walmsley369d5612010-01-26 20:13:01 -0700328 clkdm_add_wkdep(mpu_clkdm, wkup_clkdm);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700329
Kevin Hilman8bd22942009-05-28 10:56:16 -0700330 /* REVISIT: Configure number of 32 kHz clock cycles for sys_clk
331 * stabilisation */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700332 omap2_prm_write_mod_reg(15 << OMAP_SETUP_TIME_SHIFT, OMAP24XX_GR_MOD,
333 OMAP2_PRCM_CLKSSETUP_OFFSET);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700334
335 /* Configure automatic voltage transition */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700336 omap2_prm_write_mod_reg(2 << OMAP_SETUP_TIME_SHIFT, OMAP24XX_GR_MOD,
337 OMAP2_PRCM_VOLTSETUP_OFFSET);
338 omap2_prm_write_mod_reg(OMAP24XX_AUTO_EXTVOLT_MASK |
339 (0x1 << OMAP24XX_SETOFF_LEVEL_SHIFT) |
340 OMAP24XX_MEMRETCTRL_MASK |
341 (0x1 << OMAP24XX_SETRET_LEVEL_SHIFT) |
342 (0x0 << OMAP24XX_VOLT_LEVEL_SHIFT),
343 OMAP24XX_GR_MOD, OMAP2_PRCM_VOLTCTRL_OFFSET);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700344
345 /* Enable wake-up events */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700346 omap2_prm_write_mod_reg(OMAP24XX_EN_GPIOS_MASK | OMAP24XX_EN_GPT1_MASK,
347 WKUP_MOD, PM_WKEN);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700348}
349
Kevin Hilman7cc515f2009-06-10 09:02:25 -0700350static int __init omap2_pm_init(void)
Kevin Hilman8bd22942009-05-28 10:56:16 -0700351{
352 u32 l;
353
354 if (!cpu_is_omap24xx())
355 return -ENODEV;
356
357 printk(KERN_INFO "Power Management for OMAP2 initializing\n");
Paul Walmsleyc4d7e582010-12-21 21:05:14 -0700358 l = omap2_prm_read_mod_reg(OCP_MOD, OMAP2_PRCM_REVISION_OFFSET);
Kevin Hilman8bd22942009-05-28 10:56:16 -0700359 printk(KERN_INFO "PRCM revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
360
Paul Walmsley369d5612010-01-26 20:13:01 -0700361 /* Look up important powerdomains */
Kevin Hilman8bd22942009-05-28 10:56:16 -0700362
363 mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
364 if (!mpu_pwrdm)
365 pr_err("PM: mpu_pwrdm not found\n");
366
367 core_pwrdm = pwrdm_lookup("core_pwrdm");
368 if (!core_pwrdm)
369 pr_err("PM: core_pwrdm not found\n");
370
Paul Walmsley369d5612010-01-26 20:13:01 -0700371 /* Look up important clockdomains */
372
373 mpu_clkdm = clkdm_lookup("mpu_clkdm");
374 if (!mpu_clkdm)
375 pr_err("PM: mpu_clkdm not found\n");
376
377 wkup_clkdm = clkdm_lookup("wkup_clkdm");
378 if (!wkup_clkdm)
379 pr_err("PM: wkup_clkdm not found\n");
380
Kevin Hilman8bd22942009-05-28 10:56:16 -0700381 dsp_clkdm = clkdm_lookup("dsp_clkdm");
382 if (!dsp_clkdm)
Paul Walmsley369d5612010-01-26 20:13:01 -0700383 pr_err("PM: dsp_clkdm not found\n");
Kevin Hilman8bd22942009-05-28 10:56:16 -0700384
385 gfx_clkdm = clkdm_lookup("gfx_clkdm");
386 if (!gfx_clkdm)
387 pr_err("PM: gfx_clkdm not found\n");
388
389
390 osc_ck = clk_get(NULL, "osc_ck");
391 if (IS_ERR(osc_ck)) {
392 printk(KERN_ERR "could not get osc_ck\n");
393 return -ENODEV;
394 }
395
396 if (cpu_is_omap242x()) {
397 emul_ck = clk_get(NULL, "emul_ck");
398 if (IS_ERR(emul_ck)) {
399 printk(KERN_ERR "could not get emul_ck\n");
400 clk_put(osc_ck);
401 return -ENODEV;
402 }
403 }
404
405 prcm_setup_regs();
406
407 /* Hack to prevent MPU retention when STI console is enabled. */
408 {
409 const struct omap_sti_console_config *sti;
410
411 sti = omap_get_config(OMAP_TAG_STI_CONSOLE,
412 struct omap_sti_console_config);
413 if (sti != NULL && sti->enable)
414 sti_console_enabled = 1;
415 }
416
417 /*
418 * We copy the assembler sleep/wakeup routines to SRAM.
419 * These routines need to be in SRAM as that's the only
420 * memory the MPU can see when it wakes up.
421 */
422 if (cpu_is_omap24xx()) {
423 omap2_sram_idle = omap_sram_push(omap24xx_idle_loop_suspend,
424 omap24xx_idle_loop_suspend_sz);
425
426 omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend,
427 omap24xx_cpu_suspend_sz);
428 }
429
430 suspend_set_ops(&omap_pm_ops);
Nicolas Pitre0bcd24b2012-01-04 16:27:48 -0500431 arm_pm_idle = omap2_pm_idle;
Kevin Hilman8bd22942009-05-28 10:56:16 -0700432
433 return 0;
434}
435
436late_initcall(omap2_pm_init);