diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch new file mode 100644 index 00000000..b0af9e7f --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 8fb6b7c488b31fbff5b81bdeea5dbb236342458b Mon Sep 17 00:00:00 2001 | ||
2 | From: Rajendra Nayak <rnayak@ti.com> | ||
3 | Date: Tue, 29 Mar 2011 22:37:43 +0530 | ||
4 | Subject: [PATCH 5/6] OMAP2+: hwmod: Follow the recomended PRCM sequence | ||
5 | |||
6 | Follow the recomended PRCM sequence. | ||
7 | This still does not take care of Optional clocks. | ||
8 | |||
9 | Signed-off-by: Rajendra Nayak <rnayak@ti.com> | ||
10 | --- | ||
11 | arch/arm/mach-omap2/omap_hwmod.c | 9 ++++++++- | ||
12 | 1 files changed, 8 insertions(+), 1 deletions(-) | ||
13 | |||
14 | diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c | ||
15 | index e034294..fc0db0c 100644 | ||
16 | --- a/arch/arm/mach-omap2/omap_hwmod.c | ||
17 | +++ b/arch/arm/mach-omap2/omap_hwmod.c | ||
18 | @@ -1223,6 +1223,7 @@ static int _reset(struct omap_hwmod *oh) | ||
19 | static int _enable(struct omap_hwmod *oh) | ||
20 | { | ||
21 | int r; | ||
22 | + int hwsup = 0; | ||
23 | |||
24 | if (oh->_state != _HWMOD_STATE_INITIALIZED && | ||
25 | oh->_state != _HWMOD_STATE_IDLE && | ||
26 | @@ -1250,10 +1251,16 @@ static int _enable(struct omap_hwmod *oh) | ||
27 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); | ||
28 | |||
29 | _add_initiator_dep(oh, mpu_oh); | ||
30 | + if (oh->_clk && oh->_clk->clkdm) { | ||
31 | + hwsup = clkdm_is_idle(oh->_clk->clkdm); | ||
32 | + clkdm_wakeup(oh->_clk->clkdm); | ||
33 | + } | ||
34 | _enable_clocks(oh); | ||
35 | - | ||
36 | r = _wait_target_ready(oh); | ||
37 | if (!r) { | ||
38 | + if (oh->_clk && oh->_clk->clkdm && hwsup) | ||
39 | + clkdm_allow_idle(oh->_clk->clkdm); | ||
40 | + | ||
41 | oh->_state = _HWMOD_STATE_ENABLED; | ||
42 | |||
43 | /* Access the sysconfig only if the target is ready */ | ||
44 | -- | ||
45 | 1.6.6.1 | ||
46 | |||