From: Kevin Hilman <khilman@deeprootsystems.com>
To: Nishanth Menon <nm@ti.com>
Cc: Linux-omap <linux-omap@vger.kernel.org>,
"Rajendra Nayak" <rnayak@ti.com>,
"Roger Quadros" <ext-roger.quadros@nokia.com>,
"Kalle Jokiniemi" <ext-kalle.jokiniemi@nokia.com>,
"Teerth Reddy" <teerth@ti.com>, "Paul Walmsley" <paul@pwsan.com>,
"Högander Jouni" <jouni.hogander@nokia.com>,
"Imberton Guilhem" <guilhem.imberton@motorola.com>,
"Mike Chan" <mikechan@google.com>
Subject: Re: [RFC][PATCH 2/2] OMAP3:PM:SR: SmartReflex Refactor Rev2.0
Date: Fri, 09 Oct 2009 14:37:34 -0700 [thread overview]
Message-ID: <87k4z4uu3l.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1254443465-13006-3-git-send-email-nm@ti.com> (Nishanth Menon's message of "Thu\, 1 Oct 2009 19\:31\:05 -0500")
Nishanth Menon <nm@ti.com> writes:
> Refactor the smart reflex implementation.
One other request for this refactor.
Can you remove the usage of OMAP2_IO_ADDRESS (now gone from l-o master)
in favor of ioremap().
Here's a totally untested first pass and converting the version
currently in PM branch. Could probably use some better error
detection though, and I didn't look up exactly what size
should be ioremap'd.
Kevin
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 1407783..bf57b21 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -48,6 +48,7 @@ struct omap_sr {
u32 opp1_nvalue, opp2_nvalue, opp3_nvalue, opp4_nvalue;
u32 opp5_nvalue;
u32 senp_mod, senn_mod;
+ u32 srbase_phys;
void __iomem *srbase_addr;
void __iomem *vpbase_addr;
};
@@ -105,7 +106,7 @@ static struct omap_sr sr1 = {
.is_sr_reset = 1,
.is_autocomp_active = 0,
.clk_length = 0,
- .srbase_addr = OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),
+ .srbase_phys = OMAP34XX_SR1_BASE,
};
static struct omap_sr sr2 = {
@@ -113,7 +114,7 @@ static struct omap_sr sr2 = {
.is_sr_reset = 1,
.is_autocomp_active = 0,
.clk_length = 0,
- .srbase_addr = OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
+ .srbase_phys = OMAP34XX_SR2_BASE,
};
static void cal_reciprocal(u32 sensor, u32 *sengain, u32 *rnsen)
@@ -987,6 +988,11 @@ static int __init omap3_sr_init(void)
return -ENODEV;
}
+ sr1.srbase_addr = ioremap(sr1.srbase_phys, SZ_4K);
+ sr2.srbase_addr = ioremap(sr2.srbase_phys, SZ_4K);
+ if (WARN_ON(!sr1.srbase_addr) || WARN_ON(!sr2.srbase_addr))
+ return;
+
/* Enable SR on T2 */
ret = twl4030_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &RdReg,
R_DCDC_GLOBAL_CFG);
next prev parent reply other threads:[~2009-10-09 21:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-02 0:31 [RFC][PATCH 0/2] OMAP3:PM:SR Refactor Nishanth Menon
2009-10-02 0:31 ` [RFC][PATCH 1/2] OMAP3:PM:SR: prepare: remove old SR code Nishanth Menon
2009-10-02 0:31 ` [RFC][PATCH 2/2] OMAP3:PM:SR: SmartReflex Refactor Rev2.0 Nishanth Menon
2009-10-02 14:30 ` Kevin Hilman
2009-10-09 21:37 ` Kevin Hilman [this message]
2009-10-09 21:50 ` Nishanth Menon
2009-10-02 0:40 ` [RFC][PATCH 0/2] OMAP3:PM:SR Refactor Nishanth Menon
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=87k4z4uu3l.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=ext-kalle.jokiniemi@nokia.com \
--cc=ext-roger.quadros@nokia.com \
--cc=guilhem.imberton@motorola.com \
--cc=jouni.hogander@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=mikechan@google.com \
--cc=nm@ti.com \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=teerth@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.