linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/9] OMAP clockdomain/powerdomain: optimize out sleepdep code on OMAP24xx
Date: Thu, 03 Dec 2009 06:45:35 -0700	[thread overview]
Message-ID: <20091203134533.16229.90970.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091203134321.16229.87539.stgit@localhost.localdomain>

OMAP24xx chips don't support software-configurable sleep dependencies.
Test early for this so the compiler can redact the entire function body
on OMAP24xx.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/powerdomain.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 9708f12..4147267 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -571,10 +571,10 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
 {
 	struct powerdomain *p;
 
-	if (!pwrdm1)
+	if (!cpu_is_omap34xx())
 		return -EINVAL;
 
-	if (!cpu_is_omap34xx())
+	if (!pwrdm1)
 		return -EINVAL;
 
 	p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
@@ -610,10 +610,10 @@ int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
 {
 	struct powerdomain *p;
 
-	if (!pwrdm1)
+	if (!cpu_is_omap34xx())
 		return -EINVAL;
 
-	if (!cpu_is_omap34xx())
+	if (!pwrdm1)
 		return -EINVAL;
 
 	p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
@@ -653,10 +653,10 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
 {
 	struct powerdomain *p;
 
-	if (!pwrdm1)
+	if (!cpu_is_omap34xx())
 		return -EINVAL;
 
-	if (!cpu_is_omap34xx())
+	if (!pwrdm1)
 		return -EINVAL;
 
 	p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);

  parent reply	other threads:[~2009-12-03 13:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03 13:45 [PATCH 0/9] Minor powerdomain/clockdomain/SDRC patches for 2.6.33 Paul Walmsley
2009-12-03 13:45 ` [PATCH 1/9] OMAP2/3 PRCM: don't export prm_*(), cm_*() functions Paul Walmsley
2009-12-03 13:45 ` [PATCH 2/9] OMAP clockdomain/powerdomain: remove CONFIG_OMAP_DEBUG_{CLOCK, POWER}DOMAIN Paul Walmsley
2009-12-03 13:45 ` Paul Walmsley [this message]
2009-12-03 13:45 ` [PATCH 4/9] OMAP powerdomain/PM: use symbolic constants for the max number of power states Paul Walmsley
2009-12-03 13:45 ` [PATCH 5/9] OMAP powerdomain: rearrange struct powerdomain to save some memory Paul Walmsley
2009-12-03 13:45 ` [PATCH 6/9] OMAP2/3 powerdomain: return errors rather than returning the output of IS_ERR() Paul Walmsley
2009-12-03 13:45 ` [PATCH 7/9] OMAP3: SDRC: Place SDRC AC timing and MR changes in CORE DVFS SRAM code behind Kconfig Paul Walmsley
2009-12-03 13:45 ` [PATCH 8/9] OMAP3: PM: Fix for MPU power domain MEM BANK position Paul Walmsley
2009-12-03 13:45 ` [PATCH 9/9] OMAP clock/hwmod: fix off-by-one errors 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=20091203134533.16229.90970.stgit@localhost.localdomain \
    --to=paul@pwsan.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).