public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH 4/4] SmartReflex: fix sparse issues
Date: Thu, 17 Jul 2008 20:52:41 -0600	[thread overview]
Message-ID: <20080718025239.20613.30676.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080718024832.20613.30050.stgit@localhost.localdomain>

Fix sparse issues with smartreflex.c.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---

 arch/arm/mach-omap2/smartreflex.c |   10 ++++++----
 arch/arm/mach-omap2/smartreflex.h |    3 +++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 0f3a659..f460831 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -60,9 +60,11 @@ struct sr_custom_clk {
 	struct omap_sr 	*sr;
 };
 
+#define SR_REGADDR(offs)     (__force void __iomem *)(sr->srbase_addr + offset)
+
 static inline void sr_write_reg(struct omap_sr *sr, int offset, u32 value)
 {
-	__raw_writel(value, sr->srbase_addr + offset);
+	__raw_writel(value, SR_REGADDR(offset));
 }
 
 static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
@@ -70,16 +72,16 @@ static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
 {
 	u32 reg_val;
 
-	reg_val = __raw_readl(sr->srbase_addr + offset);
+	reg_val = __raw_readl(SR_REGADDR(offset));
 	reg_val &= ~mask;
 	reg_val |= value;
 
-	__raw_writel(reg_val, sr->srbase_addr + offset);
+	__raw_writel(reg_val, SR_REGADDR(offset));
 }
 
 static inline u32 sr_read_reg(struct omap_sr *sr, int offset)
 {
-	return __raw_readl(sr->srbase_addr + offset);
+	return __raw_readl(SR_REGADDR(offset));
 }
 
 /* Custom clock handling functions */
diff --git a/arch/arm/mach-omap2/smartreflex.h b/arch/arm/mach-omap2/smartreflex.h
index 9b9904d..be6e6b9 100644
--- a/arch/arm/mach-omap2/smartreflex.h
+++ b/arch/arm/mach-omap2/smartreflex.h
@@ -248,6 +248,9 @@ extern u32 current_vdd2_opp;
 #ifdef CONFIG_OMAP_SMARTREFLEX
 void enable_smartreflex(int srid);
 void disable_smartreflex(int srid);
+int sr_voltagescale_vcbypass(u32 target_opp, u8 vsel);
+void sr_start_vddautocomap(int srid, u32 target_opp_no);
+int sr_stop_vddautocomap(int srid);
 #else
 static inline void enable_smartreflex(int srid) {}
 static inline void disable_smartreflex(int srid) {}



  parent reply	other threads:[~2008-07-18  3:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18  2:52 [PATCH 0/4] mach-omap2: resolve remaining sparse issues Paul Walmsley
2008-07-18  2:52 ` [PATCH 1/4] Add prototypes for public functions or declare private functions static: Paul Walmsley
2008-07-18  2:52 ` [PATCH 2/4] mach-omap2: mark casts between integers and pointers with __force Paul Walmsley
2008-07-18  2:52 ` [PATCH 3/4] mach-omap2: fix sparse warnings, some style issues for OMAP2 builds Paul Walmsley
2008-07-18  2:52 ` Paul Walmsley [this message]
2008-08-05 11:49 ` [PATCH 0/4] mach-omap2: resolve remaining sparse issues 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=20080718025239.20613.30676.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