From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] OMAP4: CM: Add CM accesor api for bitwise control
Date: Mon, 7 Feb 2011 18:47:10 +0530 [thread overview]
Message-ID: <1297084631-27474-3-git-send-email-rnayak@ti.com> (raw)
In-Reply-To: <1297084631-27474-2-git-send-email-rnayak@ti.com>
Add new OMAP4 CM accesor apis to set/clear and read
bitfields (based on mask) from CM registers.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
arch/arm/mach-omap2/cminst44xx.c | 21 +++++++++++++++++++++
arch/arm/mach-omap2/cminst44xx.h | 6 ++++++
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index c04bbbe..a482bfa 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -73,6 +73,27 @@ u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst,
return v;
}
+u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, s16 inst, s16 idx)
+{
+ return omap4_cminst_rmw_inst_reg_bits(bits, bits, part, inst, idx);
+}
+
+u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst, s16 idx)
+{
+ return omap4_cminst_rmw_inst_reg_bits(bits, 0x0, part, inst, idx);
+}
+
+u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, u32 mask)
+{
+ u32 v;
+
+ v = omap4_cminst_read_inst_reg(part, inst, idx);
+ v &= mask;
+ v >>= __ffs(mask);
+
+ return v;
+}
+
/*
*
*/
diff --git a/arch/arm/mach-omap2/cminst44xx.h b/arch/arm/mach-omap2/cminst44xx.h
index a6abd0a..2b32c18 100644
--- a/arch/arm/mach-omap2/cminst44xx.h
+++ b/arch/arm/mach-omap2/cminst44xx.h
@@ -25,6 +25,12 @@ extern u32 omap4_cminst_read_inst_reg(u8 part, s16 inst, u16 idx);
extern void omap4_cminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx);
extern u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part,
s16 inst, s16 idx);
+extern u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, s16 inst,
+ s16 idx);
+extern u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst,
+ s16 idx);
+extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx,
+ u32 mask);
extern int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg);
--
1.7.0.4
next prev parent reply other threads:[~2011-02-07 13:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 13:17 [PATCH 0/3] OMAP4 static dependency support Rajendra Nayak
2011-02-07 13:17 ` [PATCH 1/3] OMAP4: clockdomain: Add clkdm static dependency srcs Rajendra Nayak
2011-02-07 13:17 ` Rajendra Nayak [this message]
2011-02-07 13:17 ` [PATCH 3/3] OMAP4: clockdomain: Add wkup/sleep dependency support Rajendra Nayak
2011-02-08 23:52 ` Paul Walmsley
2011-02-11 2:06 ` Paul Walmsley
2011-02-11 4:04 ` Rajendra Nayak
2011-02-11 4:37 ` Paul Walmsley
2011-02-11 5:04 ` Rajendra Nayak
2011-02-11 5:14 ` Paul Walmsley
2011-02-11 5:21 ` Rajendra Nayak
2011-02-12 22:56 ` Paul Walmsley
2011-02-14 12:12 ` Rajendra Nayak
2011-02-14 16:48 ` Paul Walmsley
2011-02-12 23:07 ` Paul Walmsley
2011-02-08 23:49 ` [PATCH 0/3] OMAP4 static " Paul Walmsley
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=1297084631-27474-3-git-send-email-rnayak@ti.com \
--to=rnayak@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).