From: vishwanath.bs@ti.com (Vishwanath BS)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] ARM: OMAP4 PM: Add IO Daisychain support
Date: Tue, 4 Oct 2011 23:22:02 +0530 [thread overview]
Message-ID: <1317750724-32553-3-git-send-email-vishwanath.bs@ti.com> (raw)
In-Reply-To: <1317750724-32553-1-git-send-email-vishwanath.bs@ti.com>
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/pm.h | 1 +
arch/arm/mach-omap2/pm44xx.c | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 9a36a7c..2e09d72 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -22,6 +22,7 @@ extern int omap3_can_sleep(void);
extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state);
extern int omap3_idle_init(void);
extern void omap3_enable_io_chain(void);
+extern void omap4_trigger_wuclk_ctrl(void);
#if defined(CONFIG_PM_OPP)
extern int omap3_opp_init(void);
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 59a870b..aa7cff4 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -16,8 +16,17 @@
#include <linux/err.h>
#include <linux/slab.h>
+#include <plat/common.h>
+
#include "powerdomain.h"
#include <mach/omap4-common.h>
+#include "pm.h"
+#include "cm-regbits-44xx.h"
+#include "cminst44xx.h"
+#include "prm-regbits-44xx.h"
+#include "prcm44xx.h"
+#include "prm44xx.h"
+#include "prminst44xx.h"
struct power_state {
struct powerdomain *pwrdm;
@@ -30,6 +39,33 @@ struct power_state {
static LIST_HEAD(pwrst_list);
+#define MAX_IOPAD_LATCH_TIME 1000
+
+void omap4_trigger_wuclk_ctrl(void)
+{
+ int i = 0;
+
+ /* Enable GLOBAL_WUEN */
+ if (!omap4_cminst_read_inst_reg_bits(OMAP4430_PRM_PARTITION,
+ OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET,
+ OMAP4430_GLOBAL_WUEN_MASK))
+ omap4_prminst_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
+ OMAP4430_GLOBAL_WUEN_MASK, OMAP4430_PRM_PARTITION,
+ OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
+
+ /* Trigger WUCLKIN enable */
+ omap4_prminst_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, OMAP4430_WUCLK_CTRL_MASK,
+ OMAP4430_PRM_PARTITION, OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
+ omap_test_timeout(
+ ((omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET)
+ >> OMAP4430_WUCLK_STATUS_SHIFT) == 1),
+ MAX_IOPAD_LATCH_TIME, i);
+ /* Trigger WUCLKIN disable */
+ omap4_prminst_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0,
+ OMAP4430_PRM_PARTITION, OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
+ return;
+}
+
#ifdef CONFIG_SUSPEND
static int omap4_pm_suspend(void)
{
--
1.7.0.4
next prev parent reply other threads:[~2011-10-04 17:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-04 17:52 [PATCH 0/4] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux Vishwanath BS
2011-10-04 17:52 ` [PATCH 1/4] ARM: OMAP3 PM: Fix IO Daisychain sequence Vishwanath BS
2011-10-04 18:54 ` Tony Lindgren
2011-10-04 20:47 ` Kevin Hilman
2011-10-05 4:19 ` Vishwanath Sripathy
2011-10-07 8:19 ` Paul Walmsley
2011-10-07 10:04 ` Vishwanath Sripathy
2011-10-04 17:52 ` Vishwanath BS [this message]
2011-10-07 8:13 ` [PATCH 2/4] ARM: OMAP4 PM: Add IO Daisychain support Paul Walmsley
2011-10-07 10:03 ` Vishwanath Sripathy
2011-10-04 17:52 ` [PATCH 3/4] ARM: OMAP3 PM: Enable IO Wake up Vishwanath BS
2011-10-04 17:52 ` [PATCH 4/4] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux Vishwanath BS
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317750724-32553-3-git-send-email-vishwanath.bs@ti.com \
--to=vishwanath.bs@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).