aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/pm44xx.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 8edb015f561..715035d0512 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -99,6 +99,8 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
99static int __init omap4_pm_init(void) 99static int __init omap4_pm_init(void)
100{ 100{
101 int ret; 101 int ret;
102 struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm;
103 struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;
102 104
103 if (!cpu_is_omap44xx()) 105 if (!cpu_is_omap44xx())
104 return -ENODEV; 106 return -ENODEV;
@@ -111,6 +113,34 @@ static int __init omap4_pm_init(void)
111 goto err2; 113 goto err2;
112 } 114 }
113 115
116 /*
117 * The dynamic dependency between MPUSS -> MEMIF and
118 * MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
119 * expected. The hardware recommendation is to enable static
120 * dependencies for these to avoid system lock ups or random crashes.
121 */
122 mpuss_clkdm = clkdm_lookup("mpuss_clkdm");
123 emif_clkdm = clkdm_lookup("l3_emif_clkdm");
124 l3_1_clkdm = clkdm_lookup("l3_1_clkdm");
125 l3_2_clkdm = clkdm_lookup("l3_2_clkdm");
126 l4_per_clkdm = clkdm_lookup("l4_per_clkdm");
127 ducati_clkdm = clkdm_lookup("ducati_clkdm");
128 if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) ||
129 (!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm))
130 goto err2;
131
132 ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm);
133 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm);
134 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_2_clkdm);
135 ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm);
136 ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);
137 ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
138 if (ret) {
139 pr_err("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 "
140 "wakeup dependency\n");
141 goto err2;
142 }
143
114#ifdef CONFIG_SUSPEND 144#ifdef CONFIG_SUSPEND
115 suspend_set_ops(&omap_pm_ops); 145 suspend_set_ops(&omap_pm_ops);
116#endif /* CONFIG_SUSPEND */ 146#endif /* CONFIG_SUSPEND */