* [PATCHv2 1/7] ARM: OMAP3 PM: correct enable/disable of daisy io chain
2011-10-07 17:47 [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
@ 2011-10-07 17:47 ` Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 2/7] ARM: OMAP3 PM: Move IO Daisychain function to omap3 prm file Vishwanath BS
` (6 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Vishwanath BS @ 2011-10-07 17:47 UTC (permalink / raw)
To: linux-arm-kernel
From: Mohan V <mohanv@ti.com>
Currently the enabling and disabling of IO Daisy chain is not
according to the TRM. The below steps are followed to enable/
disable the IO chain according to the "Sec 3.5.7.2.2
I/O Wake-Up Mechanism" in OMAP3630 Public TRM[1].
Steps to enable IO chain:
[a] Set PM_WKEN_WKUP.EN_IO bit
[b] Set the PM_WKEN_WKUP.EN_IO_CHAIN bit
[c] Poll for PM_WKST_WKUP.ST_IO_CHAIN.
[d] When ST_IO_CHAIN bit set to 1, clear PM_WKEN_WKUP.EN_IO_CHAIN
[e] Clear ST_IO_CHAIN bit.
Steps to disable IO chain:
[a] Clear PM_WKEN_WKUP.EN_IO_CHAIN bit
[b] Clear PM_WKEN_WKUP.EN_IO bit
[c] Clear PM_WKST_WKUP.ST_IO bit by writing 1 to it.
Step [e] & [c] in each case can be skipped, as these are handled
by the PRCM interrupt handler later.
[1] http://focus.ti.com/pdfs/wtbu/OMAP36xx_ES1.x_PUBLIC_TRM_vV.zip
Signed-off-by: Mohan V <mohanv@ti.com>
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
---
arch/arm/mach-omap2/pm34xx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 7255d9b..041f6e6 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -105,7 +105,7 @@ static void omap3_enable_io_chain(void)
/* Do a readback to assure write has been done */
omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
- while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN) &
+ while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST) &
OMAP3430_ST_IO_CHAIN_MASK)) {
timeout++;
if (timeout > 1000) {
@@ -113,9 +113,9 @@ static void omap3_enable_io_chain(void)
"activation failed.\n");
return;
}
- omap2_prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
- WKUP_MOD, PM_WKEN);
}
+ omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
+ PM_WKEN);
}
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCHv2 2/7] ARM: OMAP3 PM: Move IO Daisychain function to omap3 prm file
2011-10-07 17:47 [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 1/7] ARM: OMAP3 PM: correct enable/disable of daisy io chain Vishwanath BS
@ 2011-10-07 17:47 ` Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 3/7] ARM: OMAP4 PM: Add IO Daisychain support Vishwanath BS
` (5 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Vishwanath BS @ 2011-10-07 17:47 UTC (permalink / raw)
To: linux-arm-kernel
Since IO Daisychain modifies only PRM registers, it makes sense to move it to
PRM File.
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
---
arch/arm/mach-omap2/pm34xx.c | 33 +--------------------------------
arch/arm/mach-omap2/prm2xxx_3xxx.c | 35 +++++++++++++++++++++++++++++++++++
arch/arm/mach-omap2/prm2xxx_3xxx.h | 14 ++++++++++++++
3 files changed, 50 insertions(+), 32 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 041f6e6..352ad3c 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -95,37 +95,6 @@ static inline void omap3_per_restore_context(void)
omap_gpio_restore_context();
}
-static void omap3_enable_io_chain(void)
-{
- int timeout = 0;
-
- if (omap_rev() >= OMAP3430_REV_ES3_1) {
- omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
- PM_WKEN);
- /* Do a readback to assure write has been done */
- omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
-
- while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST) &
- OMAP3430_ST_IO_CHAIN_MASK)) {
- timeout++;
- if (timeout > 1000) {
- printk(KERN_ERR "Wake up daisy chain "
- "activation failed.\n");
- return;
- }
- }
- omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
- PM_WKEN);
- }
-}
-
-static void omap3_disable_io_chain(void)
-{
- if (omap_rev() >= OMAP3430_REV_ES3_1)
- omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
- PM_WKEN);
-}
-
static void omap3_core_save_context(void)
{
omap3_ctrl_save_padconf();
@@ -376,7 +345,7 @@ void omap_sram_idle(void)
(per_next_state < PWRDM_POWER_ON ||
core_next_state < PWRDM_POWER_ON)) {
omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
- omap3_enable_io_chain();
+ omap3_trigger_wuclk_ctrl();
}
/* Block console output in case it is on one of the OMAP UARTs */
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index 051213f..915d726 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -156,3 +156,38 @@ int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift)
return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0;
}
+
+/**
+ * Maximum time(us) it takes to output the signal WUCLKOUT of the last pad of
+ * the I/O ring after asserting WUCLKIN high
+ */
+#define MAX_IOPAD_LATCH_TIME 1000
+
+/* OMAP3 Daisychain trigger sequence */
+void omap3_trigger_wuclk_ctrl(void)
+{
+ int i = 0;
+
+ if (omap_rev() >= OMAP3430_REV_ES3_1) {
+ omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
+ PM_WKEN);
+ /* Do a readback to assure write has been done */
+ omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
+
+ omap_test_timeout(
+ (((omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST) &
+ OMAP3430_ST_IO_CHAIN_MASK) == 1)),
+ MAX_IOPAD_LATCH_TIME, i);
+
+ omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
+ PM_WKEN);
+ }
+}
+
+/* OMAP3 Daisychain disable sequence */
+void omap3_disable_io_chain(void)
+{
+ if (omap_rev() >= OMAP3430_REV_ES3_1)
+ omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
+ PM_WKEN);
+}
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h
index a1fc62a..8bc574d 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.h
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h
@@ -289,6 +289,18 @@ static inline int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift,
"not suppose to be used on omap4\n");
return 0;
}
+extern void omap3_trigger_wuclk_ctrl(void)
+{
+ WARN(1, "prm: omap2xxx/omap3xxx specific function and "
+ "not suppose to be used on omap4\n");
+ return 0;
+}
+extern void omap3_disable_io_chain(void)
+{
+ WARN(1, "prm: omap2xxx/omap3xxx specific function and "
+ "not suppose to be used on omap4\n");
+ return 0;
+}
#else
/* Power/reset management domain register get/set */
extern u32 omap2_prm_read_mod_reg(s16 module, u16 idx);
@@ -302,6 +314,8 @@ extern u32 omap2_prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask);
extern int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift);
extern int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift);
extern int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift);
+extern void omap3_trigger_wuclk_ctrl(void);
+extern void omap3_disable_io_chain(void);
#endif /* CONFIG_ARCH_OMAP4 */
#endif
--
1.7.0.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCHv2 3/7] ARM: OMAP4 PM: Add IO Daisychain support
2011-10-07 17:47 [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 1/7] ARM: OMAP3 PM: correct enable/disable of daisy io chain Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 2/7] ARM: OMAP3 PM: Move IO Daisychain function to omap3 prm file Vishwanath BS
@ 2011-10-07 17:47 ` Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 4/7] ARM: OMAP3 PM: Enable IO Wake up Vishwanath BS
` (4 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Vishwanath BS @ 2011-10-07 17:47 UTC (permalink / raw)
To: linux-arm-kernel
From: Rajendra Nayak <rnayak@ti.com>
patch adds IO Daisychain support for OMAP4 as per section 3.9.4 in OMAP4430
Public TRM.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
---
arch/arm/mach-omap2/prm44xx.c | 33 +++++++++++++++++++++++++++++++++
arch/arm/mach-omap2/prm44xx.h | 1 +
2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 0016555..7e19678 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -23,6 +23,8 @@
#include "prm44xx.h"
#include "prm-regbits-44xx.h"
+#include "prcm44xx.h"
+#include "prminst44xx.h"
/* PRM low-level functions */
@@ -50,3 +52,34 @@ u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg)
return v;
}
+
+/**
+ * Maximum time(us) it takes to output the signal WUCLKOUT of the last pad of
+ * the I/O ring after asserting WUCLKIN high
+ */
+#define MAX_IOPAD_LATCH_TIME 1000
+
+/* OMAP4 IO Daisychain trigger sequence */
+void omap4_trigger_wuclk_ctrl(void)
+{
+ int i = 0;
+
+ /* Enable GLOBAL_WUEN */
+ if (!(omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET)
+ & OMAP4430_GLOBAL_WUEN_MASK))
+ omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
+ OMAP4430_GLOBAL_WUEN_MASK, OMAP4430_PRM_DEVICE_INST,
+ OMAP4_PRM_IO_PMCTRL_OFFSET);
+
+ /* Trigger WUCLKIN enable */
+ omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, OMAP4430_WUCLK_CTRL_MASK,
+ OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
+ omap_test_timeout(
+ ((omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET)
+ >> OMAP4430_WUCLK_STATUS_SHIFT) == 1), MAX_IOPAD_LATCH_TIME, i);
+ /* Trigger WUCLKIN disable */
+ omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0,
+ OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
+ return;
+}
+
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 7dfa379..275b25a 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -750,6 +750,7 @@
extern u32 omap4_prm_read_inst_reg(s16 inst, u16 idx);
extern void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 idx);
extern u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
+extern void omap4_trigger_wuclk_ctrl(void);
# endif
--
1.7.0.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCHv2 4/7] ARM: OMAP3 PM: Enable IO Wake up
2011-10-07 17:47 [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
` (2 preceding siblings ...)
2011-10-07 17:47 ` [PATCHv2 3/7] ARM: OMAP4 PM: Add IO Daisychain support Vishwanath BS
@ 2011-10-07 17:47 ` Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 5/7] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux Vishwanath BS
` (3 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Vishwanath BS @ 2011-10-07 17:47 UTC (permalink / raw)
To: linux-arm-kernel
Enable IO Wake up for OMAP3 as part of PM Init.
Currently this has been managed in cpuidle path which is not the right place.
Subsequent patch will remove IO Daisy chain handling in cpuidle path once daisy
chain is handled as part of hwmod mux.
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
---
arch/arm/mach-omap2/pm34xx.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 352ad3c..c282552 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -854,6 +854,9 @@ static int __init omap3_pm_init(void)
goto err1;
}
+ if (omap3_has_io_wakeup())
+ omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
+
ret = pwrdm_for_each(pwrdms_setup, NULL);
if (ret) {
printk(KERN_ERR "Failed to setup powerdomains\n");
--
1.7.0.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCHv2 5/7] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux
2011-10-07 17:47 [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
` (3 preceding siblings ...)
2011-10-07 17:47 ` [PATCHv2 4/7] ARM: OMAP3 PM: Enable IO Wake up Vishwanath BS
@ 2011-10-07 17:47 ` Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 6/7] ARM: OMAP3 PM: Remove IO Daisychain control from cpuidle Vishwanath BS
` (2 subsequent siblings)
7 siblings, 0 replies; 16+ messages in thread
From: Vishwanath BS @ 2011-10-07 17:47 UTC (permalink / raw)
To: linux-arm-kernel
IO Daisychain feature has to be triggered whenever there is a change in
device's mux configuration (See section 3.9.4 in OMAP4 Public TRM vP).
Now devices can idle independent of the powerdomain, there can be a window where device
is idled and corresponding powerdomain can be ON/INACTIVE state. In such situations,
since both module wake up is enabled at padlevel as well as io daisychain sequence is
triggered, there will be 2 PRCM interrupts (Module async wake up via swakeup and IO Pad
interrupt). But as PRCM Interrupt handler clears the Module Padlevel WKST bit in the
first interrupt, module specific interrupt handler will not triggered for the second time
Also look at detailed explanation given by Rajendra at
http://www.spinics.net/lists/linux-serial/msg04480.html
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
---
This has been tested on OMAP3 using Chain Handler + UART Runtime patches [1]. Special
thanks to GOvind for testing and confirming this behaviour on UART3.
[1]: git://gitorious.org/runtime_3-0/runtime_3-0.git v6_uart_runtime
arch/arm/mach-omap2/omap_hwmod.c | 9 +++++++--
arch/arm/mach-omap2/pm.c | 11 +++++++++++
arch/arm/mach-omap2/pm.h | 1 +
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 84cc0bd..070f3f5 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -151,6 +151,7 @@
#include "prm44xx.h"
#include "prminst44xx.h"
#include "mux.h"
+#include "pm.h"
/* Maximum microseconds to wait for OMAP module to softreset */
#define MAX_MODULE_SOFTRESET_WAIT 10000
@@ -1462,8 +1463,10 @@ static int _enable(struct omap_hwmod *oh)
/* Mux pins for device runtime if populated */
if (oh->mux && (!oh->mux->enabled ||
((oh->_state == _HWMOD_STATE_IDLE) &&
- oh->mux->pads_dynamic)))
+ oh->mux->pads_dynamic))) {
omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED);
+ omap_trigger_wuclk_ctrl();
+ }
_add_initiator_dep(oh, mpu_oh);
@@ -1553,8 +1556,10 @@ static int _idle(struct omap_hwmod *oh)
clkdm_hwmod_disable(oh->clkdm, oh);
/* Mux pins for device idle if populated */
- if (oh->mux && oh->mux->pads_dynamic)
+ if (oh->mux && oh->mux->pads_dynamic) {
omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE);
+ omap_trigger_wuclk_ctrl();
+ }
oh->_state = _HWMOD_STATE_IDLE;
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 472bf22..79be7af 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -23,6 +23,8 @@
#include "powerdomain.h"
#include "clockdomain.h"
#include "pm.h"
+#include "prm2xxx_3xxx.h"
+#include "prm44xx.h"
static struct omap_device_pm_latency *pm_lats;
@@ -95,6 +97,15 @@ static void omap2_init_processor_devices(void)
}
}
+void omap_trigger_wuclk_ctrl(void)
+{
+ if (cpu_is_omap34xx())
+ omap3_trigger_wuclk_ctrl();
+
+ if (cpu_is_omap44xx())
+ omap4_trigger_wuclk_ctrl();
+}
+
/* Types of sleep_switch used in omap_set_pwrdm_state */
#define FORCEWAKEUP_SWITCH 0
#define LOWPOWERSTATE_SWITCH 1
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 4e166ad..05c2da2 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -21,6 +21,7 @@ extern void omap_sram_idle(void);
extern int omap3_can_sleep(void);
extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state);
extern int omap3_idle_init(void);
+void omap_trigger_wuclk_ctrl(void);
#if defined(CONFIG_PM_OPP)
extern int omap3_opp_init(void);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCHv2 6/7] ARM: OMAP3 PM: Remove IO Daisychain control from cpuidle
2011-10-07 17:47 [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
` (4 preceding siblings ...)
2011-10-07 17:47 ` [PATCHv2 5/7] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux Vishwanath BS
@ 2011-10-07 17:47 ` Vishwanath BS
2011-10-07 17:47 ` [PATCHv2 7/7] ARM: OMAP3 PM: Enable IO Daisychain for supported chips Vishwanath BS
2011-11-08 0:58 ` [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Kevin Hilman
7 siblings, 0 replies; 16+ messages in thread
From: Vishwanath BS @ 2011-10-07 17:47 UTC (permalink / raw)
To: linux-arm-kernel
As IO Daisy chain sequence is triggered via hwmod mux, there is no need to
control it from cpuidle path for OMAP3.
Also as omap3_disable_io_chain is no longer being used, just remove the function.
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
---
arch/arm/mach-omap2/pm34xx.c | 15 ---------------
arch/arm/mach-omap2/prm2xxx_3xxx.c | 8 --------
2 files changed, 0 insertions(+), 23 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index c282552..ea78d72 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -341,12 +341,6 @@ void omap_sram_idle(void)
/* Enable IO-PAD and IO-CHAIN wakeups */
per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
- if (omap3_has_io_wakeup() &&
- (per_next_state < PWRDM_POWER_ON ||
- core_next_state < PWRDM_POWER_ON)) {
- omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
- omap3_trigger_wuclk_ctrl();
- }
/* Block console output in case it is on one of the OMAP UARTs */
if (!is_suspending())
@@ -438,15 +432,6 @@ void omap_sram_idle(void)
console_unlock();
console_still_active:
- /* Disable IO-PAD and IO-CHAIN wakeup */
- if (omap3_has_io_wakeup() &&
- (per_next_state < PWRDM_POWER_ON ||
- core_next_state < PWRDM_POWER_ON)) {
- omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
- PM_WKEN);
- omap3_disable_io_chain();
- }
-
pwrdm_post_transition();
clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]);
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index 915d726..0c70bc4 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -183,11 +183,3 @@ void omap3_trigger_wuclk_ctrl(void)
PM_WKEN);
}
}
-
-/* OMAP3 Daisychain disable sequence */
-void omap3_disable_io_chain(void)
-{
- if (omap_rev() >= OMAP3430_REV_ES3_1)
- omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
- PM_WKEN);
-}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCHv2 7/7] ARM: OMAP3 PM: Enable IO Daisychain for supported chips
2011-10-07 17:47 [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
` (5 preceding siblings ...)
2011-10-07 17:47 ` [PATCHv2 6/7] ARM: OMAP3 PM: Remove IO Daisychain control from cpuidle Vishwanath BS
@ 2011-10-07 17:47 ` Vishwanath BS
2011-11-08 0:58 ` [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Kevin Hilman
7 siblings, 0 replies; 16+ messages in thread
From: Vishwanath BS @ 2011-10-07 17:47 UTC (permalink / raw)
To: linux-arm-kernel
IO Daisychain has to be enabled only if the corresponding omap has
io wake up capability.
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
---
arch/arm/mach-omap2/prm2xxx_3xxx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index 0c70bc4..9a92fef 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -168,7 +168,7 @@ void omap3_trigger_wuclk_ctrl(void)
{
int i = 0;
- if (omap_rev() >= OMAP3430_REV_ES3_1) {
+ if ((omap_rev() >= OMAP3430_REV_ES3_1) && omap3_has_io_wakeup()) {
omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
PM_WKEN);
/* Do a readback to assure write has been done */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux
2011-10-07 17:47 [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
` (6 preceding siblings ...)
2011-10-07 17:47 ` [PATCHv2 7/7] ARM: OMAP3 PM: Enable IO Daisychain for supported chips Vishwanath BS
@ 2011-11-08 0:58 ` Kevin Hilman
2011-11-29 11:22 ` Vishwanath Sripathy
7 siblings, 1 reply; 16+ messages in thread
From: Kevin Hilman @ 2011-11-08 0:58 UTC (permalink / raw)
To: linux-arm-kernel
Hi Vishwa,
Vishwanath BS <vishwanath.bs@ti.com> writes:
> The folowing patch series provides IO Daisychain feature via omap hwmod mux
> framework.
The series looks OK at first glance, but needs a refresh against current
mainline.
Can you refresh this against Tony's 'fixes' branch and re-test.
I tested this on OMAP3430/n900 and noticed that it no longer hit off
mode from idle.
IOW, If I enable UART timeouts and then enable off mode, I don't
actually ever hit off during idle. However, if I do a suspend/resume I
see it hits off mode, then subsequent attempts to hit off during idle work.
Can you investigate this?
Kevin
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux
2011-11-08 0:58 ` [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Kevin Hilman
@ 2011-11-29 11:22 ` Vishwanath Sripathy
2011-11-29 14:59 ` Vishwanath Sripathy
0 siblings, 1 reply; 16+ messages in thread
From: Vishwanath Sripathy @ 2011-11-29 11:22 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Kevin Hilman [mailto:khilman at ti.com]
> Sent: Tuesday, November 08, 2011 6:28 AM
> To: Vishwanath BS
> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
> support via hwmod mux
>
> Hi Vishwa,
>
> Vishwanath BS <vishwanath.bs@ti.com> writes:
>
> > The folowing patch series provides IO Daisychain feature via omap
> hwmod mux
> > framework.
>
> The series looks OK at first glance, but needs a refresh against
> current
> mainline.
OK.
>
> Can you refresh this against Tony's 'fixes' branch and re-test.
>
> I tested this on OMAP3430/n900 and noticed that it no longer hit off
> mode from idle.
>
> IOW, If I enable UART timeouts and then enable off mode, I don't
> actually ever hit off during idle. However, if I do a
> suspend/resume I
> see it hits off mode, then subsequent attempts to hit off during
> idle work.
>
> Can you investigate this?
OK. Let me check that.
Regards
Vishwa
>
> Kevin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux
2011-11-29 11:22 ` Vishwanath Sripathy
@ 2011-11-29 14:59 ` Vishwanath Sripathy
2011-11-30 0:48 ` Kevin Hilman
0 siblings, 1 reply; 16+ messages in thread
From: Vishwanath Sripathy @ 2011-11-29 14:59 UTC (permalink / raw)
To: linux-arm-kernel
Hi Kevin,
> -----Original Message-----
> From: Vishwanath Sripathy [mailto:vishwanath.bs at ti.com]
> Sent: Tuesday, November 29, 2011 4:53 PM
> To: Kevin Hilman
> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> Subject: RE: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
> support via hwmod mux
>
> > -----Original Message-----
> > From: Kevin Hilman [mailto:khilman at ti.com]
> > Sent: Tuesday, November 08, 2011 6:28 AM
> > To: Vishwanath BS
> > Cc: linux-omap at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org
> > Subject: Re: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
> > support via hwmod mux
> >
> > Hi Vishwa,
> >
> > Vishwanath BS <vishwanath.bs@ti.com> writes:
> >
> > > The folowing patch series provides IO Daisychain feature via
> omap
> > hwmod mux
> > > framework.
> >
> > The series looks OK at first glance, but needs a refresh against
> > current
> > mainline.
> OK.
> >
> > Can you refresh this against Tony's 'fixes' branch and re-test.
> >
> > I tested this on OMAP3430/n900 and noticed that it no longer hit
> off
> > mode from idle.
> >
> > IOW, If I enable UART timeouts and then enable off mode, I don't
> > actually ever hit off during idle. However, if I do a
> > suspend/resume I
> > see it hits off mode, then subsequent attempts to hit off during
> > idle work.
> >
> > Can you investigate this?
> OK. Let me check that.
I rebased these patches against latest Tony's fixes branch and tested it
on OMAP3430 SDP. I see that Core enters off mode in idle path after
setting UART timeout w/o having to suspend the system.
Is there anything else I need to do to see the issue mentioned by you?
Regards
Vishwa
>
> Regards
> Vishwa
> >
> > Kevin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux
2011-11-29 14:59 ` Vishwanath Sripathy
@ 2011-11-30 0:48 ` Kevin Hilman
2011-11-30 9:27 ` Vishwanath Sripathy
0 siblings, 1 reply; 16+ messages in thread
From: Kevin Hilman @ 2011-11-30 0:48 UTC (permalink / raw)
To: linux-arm-kernel
Vishwanath Sripathy <vishwanath.bs@ti.com> writes:
> Hi Kevin,
>
>> -----Original Message-----
>> From: Vishwanath Sripathy [mailto:vishwanath.bs at ti.com]
>> Sent: Tuesday, November 29, 2011 4:53 PM
>> To: Kevin Hilman
>> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org
>> Subject: RE: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
>> support via hwmod mux
>>
>> > -----Original Message-----
>> > From: Kevin Hilman [mailto:khilman at ti.com]
>> > Sent: Tuesday, November 08, 2011 6:28 AM
>> > To: Vishwanath BS
>> > Cc: linux-omap at vger.kernel.org; linux-arm-
>> kernel at lists.infradead.org
>> > Subject: Re: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
>> > support via hwmod mux
>> >
>> > Hi Vishwa,
>> >
>> > Vishwanath BS <vishwanath.bs@ti.com> writes:
>> >
>> > > The folowing patch series provides IO Daisychain feature via
>> omap
>> > hwmod mux
>> > > framework.
>> >
>> > The series looks OK at first glance, but needs a refresh against
>> > current
>> > mainline.
>> OK.
>> >
>> > Can you refresh this against Tony's 'fixes' branch and re-test.
>> >
>> > I tested this on OMAP3430/n900 and noticed that it no longer hit
>> off
>> > mode from idle.
>> >
>> > IOW, If I enable UART timeouts and then enable off mode, I don't
>> > actually ever hit off during idle. However, if I do a
>> > suspend/resume I
>> > see it hits off mode, then subsequent attempts to hit off during
>> > idle work.
>> >
>> > Can you investigate this?
>> OK. Let me check that.
> I rebased these patches against latest Tony's fixes branch and tested it
> on OMAP3430 SDP. I see that Core enters off mode in idle path after
> setting UART timeout w/o having to suspend the system.
OK, sounds good.
Do you have a branch that I can test as well?
Kevin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux
2011-11-30 0:48 ` Kevin Hilman
@ 2011-11-30 9:27 ` Vishwanath Sripathy
2011-12-02 16:58 ` Vishwanath Sripathy
0 siblings, 1 reply; 16+ messages in thread
From: Vishwanath Sripathy @ 2011-11-30 9:27 UTC (permalink / raw)
To: linux-arm-kernel
---
> >> > Can you refresh this against Tony's 'fixes' branch and re-test.
> >> >
> >> > I tested this on OMAP3430/n900 and noticed that it no longer
> hit
> >> off
> >> > mode from idle.
> >> >
> >> > IOW, If I enable UART timeouts and then enable off mode, I
> don't
> >> > actually ever hit off during idle. However, if I do a
> >> > suspend/resume I
> >> > see it hits off mode, then subsequent attempts to hit off
> during
> >> > idle work.
> >> >
> >> > Can you investigate this?
> >> OK. Let me check that.
> > I rebased these patches against latest Tony's fixes branch and
> tested it
> > on OMAP3430 SDP. I see that Core enters off mode in idle path
> after
> > setting UART timeout w/o having to suspend the system.
>
> OK, sounds good.
>
> Do you have a branch that I can test as well?
Sure. It's available at
git://gitorious.org/omap-pm/linux.git for_3.3/io_daisy_chain
Regards
Vishwa
>
> Kevin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux
2011-11-30 9:27 ` Vishwanath Sripathy
@ 2011-12-02 16:58 ` Vishwanath Sripathy
2011-12-13 14:23 ` Vishwanath Sripathy
0 siblings, 1 reply; 16+ messages in thread
From: Vishwanath Sripathy @ 2011-12-02 16:58 UTC (permalink / raw)
To: linux-arm-kernel
Kevin,
> -----Original Message-----
> From: Vishwanath Sripathy [mailto:vishwanath.bs at ti.com]
> Sent: Wednesday, November 30, 2011 2:58 PM
> To: Kevin Hilman
> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> Subject: RE: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
> support via hwmod mux
>
> ---
> > >> > Can you refresh this against Tony's 'fixes' branch and re-
> test.
> > >> >
> > >> > I tested this on OMAP3430/n900 and noticed that it no longer
> > hit
> > >> off
> > >> > mode from idle.
> > >> >
> > >> > IOW, If I enable UART timeouts and then enable off mode, I
> > don't
> > >> > actually ever hit off during idle. However, if I do a
> > >> > suspend/resume I
> > >> > see it hits off mode, then subsequent attempts to hit off
> > during
> > >> > idle work.
> > >> >
> > >> > Can you investigate this?
> > >> OK. Let me check that.
> > > I rebased these patches against latest Tony's fixes branch and
> > tested it
> > > on OMAP3430 SDP. I see that Core enters off mode in idle path
> > after
> > > setting UART timeout w/o having to suspend the system.
> >
> > OK, sounds good.
> >
> > Do you have a branch that I can test as well?
> Sure. It's available at
> git://gitorious.org/omap-pm/linux.git for_3.3/io_daisy_chain
Did you get any chance to test it at your side?
Should I post the rebased patches?
Regards
Vishwa
>
> Regards
> Vishwa
> >
> > Kevin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux
2011-12-02 16:58 ` Vishwanath Sripathy
@ 2011-12-13 14:23 ` Vishwanath Sripathy
2011-12-13 19:31 ` Kevin Hilman
0 siblings, 1 reply; 16+ messages in thread
From: Vishwanath Sripathy @ 2011-12-13 14:23 UTC (permalink / raw)
To: linux-arm-kernel
Kevin,
> -----Original Message-----
> From: Vishwanath Sripathy [mailto:vishwanath.bs at ti.com]
> Sent: Friday, December 02, 2011 10:29 PM
> To: Kevin Hilman
> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> Subject: RE: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
> support via hwmod mux
>
> Kevin,
>
> > -----Original Message-----
> > From: Vishwanath Sripathy [mailto:vishwanath.bs at ti.com]
> > Sent: Wednesday, November 30, 2011 2:58 PM
> > To: Kevin Hilman
> > Cc: linux-omap at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org
> > Subject: RE: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
> > support via hwmod mux
> >
> > ---
> > > >> > Can you refresh this against Tony's 'fixes' branch and re-
> > test.
> > > >> >
> > > >> > I tested this on OMAP3430/n900 and noticed that it no
> longer
> > > hit
> > > >> off
> > > >> > mode from idle.
> > > >> >
> > > >> > IOW, If I enable UART timeouts and then enable off mode, I
> > > don't
> > > >> > actually ever hit off during idle. However, if I do a
> > > >> > suspend/resume I
> > > >> > see it hits off mode, then subsequent attempts to hit off
> > > during
> > > >> > idle work.
> > > >> >
> > > >> > Can you investigate this?
> > > >> OK. Let me check that.
> > > > I rebased these patches against latest Tony's fixes branch and
> > > tested it
> > > > on OMAP3430 SDP. I see that Core enters off mode in idle path
> > > after
> > > > setting UART timeout w/o having to suspend the system.
> > >
> > > OK, sounds good.
> > >
> > > Do you have a branch that I can test as well?
> > Sure. It's available at
> > git://gitorious.org/omap-pm/linux.git for_3.3/io_daisy_chain
> Did you get any chance to test it at your side?
> Should I post the rebased patches?
I have rebased these patch series against LO master commit id:
deee6d5359969a0ce4e2760cfd7b9f379bd5698a and same is available here [1].
I have tested these patch series along with Tero's Chain Handler +
Govind's UART Runtime series which is available at [2].
Regards
Vishwa
[1]:
git://gitorious.org/omap-pm/linux.git for_3.3/io_daisy_chain_rebased
[2]:
git://gitorious.org/runtime_3-0/runtime_3-0.git
for_3_3/tmp_rc4_uart_pm_intg
>
> Regards
> Vishwa
> >
> > Regards
> > Vishwa
> > >
> > > Kevin
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux
2011-12-13 14:23 ` Vishwanath Sripathy
@ 2011-12-13 19:31 ` Kevin Hilman
0 siblings, 0 replies; 16+ messages in thread
From: Kevin Hilman @ 2011-12-13 19:31 UTC (permalink / raw)
To: linux-arm-kernel
Vishwanath Sripathy <vishwanath.bs@ti.com> writes:
> Kevin,
>
>> -----Original Message-----
>> From: Vishwanath Sripathy [mailto:vishwanath.bs at ti.com]
>> Sent: Friday, December 02, 2011 10:29 PM
>> To: Kevin Hilman
>> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org
>> Subject: RE: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
>> support via hwmod mux
>>
>> Kevin,
>>
>> > -----Original Message-----
>> > From: Vishwanath Sripathy [mailto:vishwanath.bs at ti.com]
>> > Sent: Wednesday, November 30, 2011 2:58 PM
>> > To: Kevin Hilman
>> > Cc: linux-omap at vger.kernel.org; linux-arm-
>> kernel at lists.infradead.org
>> > Subject: RE: [PATCHv2 0/7]ARM: OMAP3PLUS PM: Add IO DaisyChain
>> > support via hwmod mux
>> >
>> > ---
>> > > >> > Can you refresh this against Tony's 'fixes' branch and re-
>> > test.
>> > > >> >
>> > > >> > I tested this on OMAP3430/n900 and noticed that it no
>> longer
>> > > hit
>> > > >> off
>> > > >> > mode from idle.
>> > > >> >
>> > > >> > IOW, If I enable UART timeouts and then enable off mode, I
>> > > don't
>> > > >> > actually ever hit off during idle. However, if I do a
>> > > >> > suspend/resume I
>> > > >> > see it hits off mode, then subsequent attempts to hit off
>> > > during
>> > > >> > idle work.
>> > > >> >
>> > > >> > Can you investigate this?
>> > > >> OK. Let me check that.
>> > > > I rebased these patches against latest Tony's fixes branch and
>> > > tested it
>> > > > on OMAP3430 SDP. I see that Core enters off mode in idle path
>> > > after
>> > > > setting UART timeout w/o having to suspend the system.
>> > >
>> > > OK, sounds good.
>> > >
>> > > Do you have a branch that I can test as well?
>> > Sure. It's available at
>> > git://gitorious.org/omap-pm/linux.git for_3.3/io_daisy_chain
>> Did you get any chance to test it at your side?
>> Should I post the rebased patches?
> I have rebased these patch series against LO master commit id:
> deee6d5359969a0ce4e2760cfd7b9f379bd5698a and same is available here [1].
>
> I have tested these patch series along with Tero's Chain Handler +
> Govind's UART Runtime series which is available at [2].
Thanks.
Can you repost the latest version, with tested-bys as appropriate and
describing how it was tested and on what platforms.
This series has several dependencies/conflicts with Tero's series, so it
would be helpful that the posted version is based on Tero's stuff.
Since Tero's stuff is going through Paul, your series will as well (if
Paul is OK with it.)
Kevin
^ permalink raw reply [flat|nested] 16+ messages in thread