Skip to content

Commit

Permalink
Merge branch 'Issue-23_kernel_loading_problem_on_beagleboard_xM_Rev_A…
Browse files Browse the repository at this point in the history
…' into develop
  • Loading branch information
Max Galemin committed Mar 8, 2012
2 parents 7e18b75 + c366cf7 commit 26f7446
Showing 1 changed file with 62 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
From 8717b70a5a23395239235ec419f1802ef6293466 Mon Sep 17 00:00:00 2001
From: Max Galemin <[email protected]>
Date: Thu, 8 Mar 2012 23:18:06 +1100
Subject: [PATCH] Put the IVA2 DPLL in stop mode before un-reset IVA2 module

1. For 1 GHz operation before un-resetting the IVA2 module in omap3_iva_idle()
the IVA2 DPLL needs to be put in low power stop mode as bootloader can enable
the IVA2 DPLL in lock mode which can potentially lead to instability. Previous
IVA2 DPLL mode can be restored after IVA2 reset.
---
arch/arm/mach-omap2/pm34xx.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index efa6649..bcb1985 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -50,6 +50,7 @@
#include "pm.h"
#include "sdrc.h"
#include "control.h"
+#include "clock.h"

#ifdef CONFIG_SUSPEND
static suspend_state_t suspend_state = PM_SUSPEND_ON;
@@ -612,6 +613,8 @@ static const struct platform_suspend_ops omap_pm_ops = {
**/
static void __init omap3_iva_idle(void)
{
+ u32 iva2_dpll;
+
/* ensure IVA2 clock is disabled */
omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);

@@ -620,6 +623,13 @@ static void __init omap3_iva_idle(void)
OMAP3430_CLKACTIVITY_IVA2_MASK))
return;

+ iva2_dpll = omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD,
+ OMAP3430_CM_CLKEN_PLL);
+
+ /* Put the IVA2 DPLL in low power stop mode */
+ omap2_cm_write_mod_reg((iva2_dpll & ~OMAP3430_EN_IVA2_DPLL_MASK) |
+ DPLL_LOW_POWER_STOP, OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL);
+
/* Reset IVA2 */
omap2_prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK |
OMAP3430_RST2_IVA2_MASK |
@@ -645,6 +655,10 @@ static void __init omap3_iva_idle(void)
OMAP3430_RST2_IVA2_MASK |
OMAP3430_RST3_IVA2_MASK,
OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
+
+ /* Restore the IVA2 DPLL value */
+ omap2_cm_write_mod_reg(iva2_dpll, OMAP3430_IVA2_MOD,
+ OMAP3430_CM_CLKEN_PLL);
}

static void __init omap3_d2d_idle(void)
--
1.7.5.4

0 comments on commit 26f7446

Please sign in to comment.