OMAP3: PM: restore SRAM functions after off-mode.
Generalize the copy of SRAM functions into omap_push_sram_idle() so it can be used on init but also after off-mode transitions. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
This commit is contained in:
Родитель
c96631e138
Коммит
3231fc889c
|
@ -749,6 +749,12 @@ static int __init clkdms_setup(struct clockdomain *clkdm, void *unused)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void omap_push_sram_idle(void)
|
||||||
|
{
|
||||||
|
_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
|
||||||
|
omap34xx_cpu_suspend_sz);
|
||||||
|
}
|
||||||
|
|
||||||
static int __init omap3_pm_init(void)
|
static int __init omap3_pm_init(void)
|
||||||
{
|
{
|
||||||
struct power_state *pwrst, *tmp;
|
struct power_state *pwrst, *tmp;
|
||||||
|
@ -786,9 +792,7 @@ static int __init omap3_pm_init(void)
|
||||||
goto err2;
|
goto err2;
|
||||||
}
|
}
|
||||||
|
|
||||||
_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
|
omap_push_sram_idle();
|
||||||
omap34xx_cpu_suspend_sz);
|
|
||||||
|
|
||||||
#ifdef CONFIG_SUSPEND
|
#ifdef CONFIG_SUSPEND
|
||||||
suspend_set_ops(&omap_pm_ops);
|
suspend_set_ops(&omap_pm_ops);
|
||||||
#endif /* CONFIG_SUSPEND */
|
#endif /* CONFIG_SUSPEND */
|
||||||
|
|
|
@ -68,4 +68,10 @@ extern u32 omap3_sram_configure_core_dpll(
|
||||||
u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1);
|
u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1);
|
||||||
extern unsigned long omap3_sram_configure_core_dpll_sz;
|
extern unsigned long omap3_sram_configure_core_dpll_sz;
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
extern void omap_push_sram_idle(void);
|
||||||
|
#else
|
||||||
|
static inline void omap_push_sram_idle(void) {}
|
||||||
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -396,22 +396,24 @@ u32 omap3_configure_core_dpll(u32 m2, u32 unlock_dll, u32 f, u32 inc,
|
||||||
sdrc_actim_ctrl_b_1, sdrc_mr_1);
|
sdrc_actim_ctrl_b_1, sdrc_mr_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */
|
#ifdef CONFIG_PM
|
||||||
void restore_sram_functions(void)
|
void omap3_sram_restore_context(void)
|
||||||
{
|
{
|
||||||
omap_sram_ceil = omap_sram_base + omap_sram_size;
|
omap_sram_ceil = omap_sram_base + omap_sram_size;
|
||||||
|
|
||||||
_omap3_sram_configure_core_dpll =
|
_omap3_sram_configure_core_dpll =
|
||||||
omap_sram_push(omap3_sram_configure_core_dpll,
|
omap_sram_push(omap3_sram_configure_core_dpll,
|
||||||
omap3_sram_configure_core_dpll_sz);
|
omap3_sram_configure_core_dpll_sz);
|
||||||
|
omap_push_sram_idle();
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
int __init omap34xx_sram_init(void)
|
int __init omap34xx_sram_init(void)
|
||||||
{
|
{
|
||||||
_omap3_sram_configure_core_dpll =
|
_omap3_sram_configure_core_dpll =
|
||||||
omap_sram_push(omap3_sram_configure_core_dpll,
|
omap_sram_push(omap3_sram_configure_core_dpll,
|
||||||
omap3_sram_configure_core_dpll_sz);
|
omap3_sram_configure_core_dpll_sz);
|
||||||
|
omap_push_sram_idle();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче