From: Sanjeev Premi <premi@ti.com>
To: linux-omap@vger.kernel.org
Cc: Sanjeev Premi <premi@ti.com>
Subject: [PATCH 1/2] omap3: voltage: remove unnecessary param passing
Date: Thu, 17 Mar 2011 20:42:36 +0530 [thread overview]
Message-ID: <1300374757-23010-2-git-send-email-premi@ti.com> (raw)
In-Reply-To: <1300374757-23010-1-git-send-email-premi@ti.com>
It is not necessary to pass the params prm_mod and
prm_irqst_mod to omap_voltage_early_init().
Signed-off-by: Sanjeev Premi <premi@ti.com>
---
arch/arm/mach-omap2/voltage.c | 18 ++++++++++++++----
arch/arm/mach-omap2/voltage.h | 3 +--
arch/arm/mach-omap2/voltagedomains3xxx_data.c | 5 +----
arch/arm/mach-omap2/voltagedomains44xx_data.c | 6 +-----
4 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index c6facf7..ce3098a 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -1096,12 +1096,22 @@ int __init omap_voltage_late_init(void)
}
/* XXX document */
-int __init omap_voltage_early_init(s16 prm_mod, s16 prm_irqst_ocp_mod,
- struct omap_vdd_info *omap_vdd_array[],
+int __init omap_voltage_early_init(struct omap_vdd_info *omap_vdd_array[],
u8 omap_vdd_count)
{
- prm_mod_offs = prm_mod;
- prm_irqst_ocp_mod_offs = prm_irqst_ocp_mod;
+ if (cpu_is_omap44xx()) {
+ prm_mod_offs = OMAP4430_PRM_DEVICE_INST;
+ prm_irqst_ocp_mod_offs = OMAP4430_PRM_OCP_SOCKET_INST;
+ } else if (cpu_is_omap34xx()) {
+ prm_mod_offs = OMAP3430_GR_MOD;
+ prm_irqst_ocp_mod_offs = OCP_MOD;
+ } else {
+ /* TODO:
+ * What should be done for OMAP24xx?
+ * Would we even reach here?
+ */
+ }
+
vdd_info = omap_vdd_array;
nr_scalable_vdd = omap_vdd_count;
return 0;
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index e9f5408..b56530e 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -151,8 +151,7 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
unsigned long volt);
unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm);
struct dentry *omap_voltage_get_dbgdir(struct voltagedomain *voltdm);
-int __init omap_voltage_early_init(s16 prm_mod, s16 prm_irqst_mod,
- struct omap_vdd_info *omap_vdd_array[],
+int __init omap_voltage_early_init(struct omap_vdd_info *omap_vdd_array[],
u8 omap_vdd_count);
#ifdef CONFIG_PM
int omap_voltage_register_pmic(struct voltagedomain *voltdm,
diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
index def230f..6f6999d 100644
--- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
@@ -70,8 +70,6 @@ static struct omap_vdd_info *omap3_vdd_info[] = {
/* OMAP3 specific voltage init functions */
static int __init omap3xxx_voltage_early_init(void)
{
- s16 prm_mod = OMAP3430_GR_MOD;
- s16 prm_irqst_ocp_mod = OCP_MOD;
if (!cpu_is_omap34xx())
return 0;
@@ -88,8 +86,7 @@ static int __init omap3xxx_voltage_early_init(void)
omap3_vdd2_info.volt_data = omap34xx_vddcore_volt_data;
}
- return omap_voltage_early_init(prm_mod, prm_irqst_ocp_mod,
- omap3_vdd_info,
+ return omap_voltage_early_init(omap3_vdd_info,
ARRAY_SIZE(omap3_vdd_info));
};
core_initcall(omap3xxx_voltage_early_init);
diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c
index cb64996..208a67d 100644
--- a/arch/arm/mach-omap2/voltagedomains44xx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c
@@ -81,9 +81,6 @@ static struct omap_vdd_info *omap4_vdd_info[] = {
/* OMAP4 specific voltage init functions */
static int __init omap44xx_voltage_early_init(void)
{
- s16 prm_mod = OMAP4430_PRM_DEVICE_INST;
- s16 prm_irqst_ocp_mod = OMAP4430_PRM_OCP_SOCKET_INST;
-
if (!cpu_is_omap44xx())
return 0;
@@ -95,8 +92,7 @@ static int __init omap44xx_voltage_early_init(void)
omap4_vdd_iva_info.volt_data = omap44xx_vdd_iva_volt_data;
omap4_vdd_core_info.volt_data = omap44xx_vdd_core_volt_data;
- return omap_voltage_early_init(prm_mod, prm_irqst_ocp_mod,
- omap4_vdd_info,
+ return omap_voltage_early_init(omap4_vdd_info,
ARRAY_SIZE(omap4_vdd_info));
};
core_initcall(omap44xx_voltage_early_init);
--
1.7.2.2
next prev parent reply other threads:[~2011-03-17 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 15:12 [PATCH 0/2] omap2+: voltage: simple clean-ups Sanjeev Premi
2011-03-17 15:12 ` Sanjeev Premi [this message]
2011-03-17 20:10 ` [PATCH 1/2] omap3: voltage: remove unnecessary param passing Kevin Hilman
2011-03-18 4:58 ` Premi, Sanjeev
2011-03-17 15:12 ` [PATCH 2/2] omap3: voltage: fix variable type and name Sanjeev Premi
2011-03-17 20:11 ` Kevin Hilman
2011-03-18 4:53 ` Premi, Sanjeev
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=1300374757-23010-2-git-send-email-premi@ti.com \
--to=premi@ti.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;
as well as URLs for NNTP newsgroup(s).