diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2014-02-26 08:28:18 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2014-03-04 21:40:52 -0500 |
commit | afc51f4643063c4285f713a27bb39077b1ef1ed3 (patch) | |
tree | 6facdf18e3dbc5f0bb70170202865945fdea32cd /arch/arm/mach-imx | |
parent | facadba6a12813d8bbc5586261d873fa5f3dd4fa (diff) |
ARM: imx6: call suspend_set_ops() from suspend routine
Rename function imx6q_ocram_suspend_init() to imx6q_suspend_init() and
call suspend_set_ops() from there. Now we get a centralized function
for suspend initialization.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/pm-imx6q.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c index a9a187d54e68..2473ad4db819 100644 --- a/arch/arm/mach-imx/pm-imx6q.c +++ b/arch/arm/mach-imx/pm-imx6q.c | |||
@@ -382,8 +382,7 @@ out: | |||
382 | return ret; | 382 | return ret; |
383 | } | 383 | } |
384 | 384 | ||
385 | static int __init imx6q_ocram_suspend_init(const struct imx6_pm_socdata | 385 | static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata) |
386 | *socdata) | ||
387 | { | 386 | { |
388 | phys_addr_t ocram_pbase; | 387 | phys_addr_t ocram_pbase; |
389 | struct device_node *node; | 388 | struct device_node *node; |
@@ -394,6 +393,8 @@ static int __init imx6q_ocram_suspend_init(const struct imx6_pm_socdata | |||
394 | int i, ret = 0; | 393 | int i, ret = 0; |
395 | const u32 *mmdc_offset_array; | 394 | const u32 *mmdc_offset_array; |
396 | 395 | ||
396 | suspend_set_ops(&imx6q_pm_ops); | ||
397 | |||
397 | if (!socdata) { | 398 | if (!socdata) { |
398 | pr_warn("%s: invalid argument!\n", __func__); | 399 | pr_warn("%s: invalid argument!\n", __func__); |
399 | return -EINVAL; | 400 | return -EINVAL; |
@@ -515,9 +516,9 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata | |||
515 | 516 | ||
516 | WARN_ON(!ccm_base); | 517 | WARN_ON(!ccm_base); |
517 | 518 | ||
518 | ret = imx6q_ocram_suspend_init(socdata); | 519 | ret = imx6q_suspend_init(socdata); |
519 | if (ret) | 520 | if (ret) |
520 | pr_warn("%s: failed to initialize ocram suspend %d!\n", | 521 | pr_warn("%s: No DDR LPM support with suspend %d!\n", |
521 | __func__, ret); | 522 | __func__, ret); |
522 | 523 | ||
523 | /* | 524 | /* |
@@ -531,9 +532,6 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata | |||
531 | if (!IS_ERR(gpr)) | 532 | if (!IS_ERR(gpr)) |
532 | regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_GINT, | 533 | regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_GINT, |
533 | IMX6Q_GPR1_GINT); | 534 | IMX6Q_GPR1_GINT); |
534 | |||
535 | |||
536 | suspend_set_ops(&imx6q_pm_ops); | ||
537 | } | 535 | } |
538 | 536 | ||
539 | void __init imx6q_pm_init(void) | 537 | void __init imx6q_pm_init(void) |