From: vishwanath.bs@ti.com (Vishwanath BS)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHV2 REPOST 3/7] ARM: OMAP4 PM: Add IO Daisychain support
Date: Wed, 14 Dec 2011 21:31:13 +0530 [thread overview]
Message-ID: <1323878477-21122-4-git-send-email-vishwanath.bs@ti.com> (raw)
In-Reply-To: <1323878477-21122-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>
Tested-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/mach-omap2/prm44xx.c | 30 ++++++++++++++++++++++++++++++
arch/arm/mach-omap2/prm44xx.h | 1 +
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 67d8d74..4dc58f7 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -142,3 +142,33 @@ static int __init omap4xxx_prcm_init(void)
return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup);
return 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
+
+/* 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 3d66ccd..a8678db 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);
/* OMAP4-specific VP functions */
u32 omap4_prm_vp_check_txdone(u8 vp_id);
--
1.7.0.4
next prev parent reply other threads:[~2011-12-14 16:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 16:01 [PATCHV2 REPOST 0/7] ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Vishwanath BS
2011-12-14 16:01 ` [PATCHV2 REPOST 1/7] ARM: OMAP3 PM: correct enable/disable of daisy io chain Vishwanath BS
2011-12-14 16:01 ` [PATCHV2 REPOST 2/7] ARM: OMAP3 PM: Move IO Daisychain function to omap3 prm file Vishwanath BS
2012-01-10 17:33 ` Kevin Hilman
2011-12-14 16:01 ` Vishwanath BS [this message]
2012-01-10 17:35 ` [PATCHV2 REPOST 3/7] ARM: OMAP4 PM: Add IO Daisychain support Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 4/7] ARM: OMAP3 PM: Enable IO Wake up Vishwanath BS
2012-01-10 17:36 ` Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 5/7] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux Vishwanath BS
2012-01-10 17:46 ` Kevin Hilman
2012-01-10 17:47 ` Kevin Hilman
2012-01-10 17:56 ` Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 6/7] ARM: OMAP3 PM: Remove IO Daisychain control from cpuidle Vishwanath BS
2012-01-10 17:56 ` Kevin Hilman
2011-12-14 16:01 ` [PATCHV2 REPOST 7/7] ARM: OMAP3 PM: Enable IO Daisychain for supported chips Vishwanath BS
2012-01-10 17:26 ` [PATCHV2 REPOST 0/7] ARM: OMAP3PLUS PM: Add IO DaisyChain support via hwmod mux Kevin Hilman
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=1323878477-21122-4-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).