From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH 3/6] powerdomain: add pwrdm_get_mem_bank_count()
Date: Tue, 20 May 2008 18:41:33 -0600 [thread overview]
Message-ID: <20080521004128.6131.98309.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080521003910.6131.63409.stgit@localhost.localdomain>
Add a function pwrdm_get_mem_bank_count() to the powerdomain code to
return the number of memory banks contained inside an OMAP
powerdomain. This will be used by the PM code to configure the memory
bank retention state.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/powerdomain.c | 14 ++++++++++++++
include/asm-arm/arch-omap/powerdomain.h | 2 ++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 94b16d0..3a8dae0 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -588,6 +588,20 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
(1 << pwrdm2->dep_bit));
}
+/**
+ * pwrdm_get_mem_bank_count - get number of memory banks in this powerdomain
+ * @pwrdm: struct powerdomain *
+ *
+ * Return the number of controllable memory banks in powerdomain pwrdm,
+ * starting with 1. Returns -EINVAL if the powerdomain pointer is null.
+ */
+int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm)
+{
+ if (!pwrdm)
+ return -EINVAL;
+
+ return pwrdm->banks;
+}
/**
* pwrdm_set_next_pwrst - set next powerdomain power state
diff --git a/include/asm-arm/arch-omap/powerdomain.h b/include/asm-arm/arch-omap/powerdomain.h
index 40a054d..39b7df6 100644
--- a/include/asm-arm/arch-omap/powerdomain.h
+++ b/include/asm-arm/arch-omap/powerdomain.h
@@ -134,6 +134,8 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2);
int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2);
int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2);
+int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm);
+
int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst);
int pwrdm_read_next_pwrst(struct powerdomain *pwrdm);
int pwrdm_read_pwrst(struct powerdomain *pwrdm);
next prev parent reply other threads:[~2008-05-21 0:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 0:41 [PATCH 0/6] OMAP2 PM: link clocks to clockdomains, use clkdm/pwrdm code Paul Walmsley
2008-05-21 0:41 ` [PATCH 1/6] 24xx clock: associate clocks with clockdomains Paul Walmsley
2008-05-21 0:41 ` [PATCH 2/6] 24xx clock: add missing SSI L4 interface clock Paul Walmsley
2008-05-21 0:41 ` Paul Walmsley [this message]
2008-05-21 0:41 ` [PATCH 4/6] clockdomain: add clkdm_get_pwrdm() Paul Walmsley
2008-05-21 0:41 ` [PATCH 5/6] 24xx PM: convert pm24xx.c code to use pwrdm/clkdm interfaces Paul Walmsley
2008-05-21 0:43 ` [PATCH 6/6] DSP Gateway: remove manual clockdomain/powerdomain tweaking Paul Walmsley
2008-05-28 20:41 ` [PATCH 0/6] OMAP2 PM: link clocks to clockdomains, use clkdm/pwrdm code Tony Lindgren
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=20080521004128.6131.98309.stgit@localhost.localdomain \
--to=paul@pwsan.com \
--cc=linux-omap@vger.kernel.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