public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Sanjeev Premi <premi@ti.com>
To: linux-omap@vger.kernel.org
Cc: Sanjeev Premi <premi@ti.com>
Subject: [RFC 1/3] omap: voltage: Allow custom vp_init() implementation
Date: Wed, 23 Feb 2011 23:28:31 +0530	[thread overview]
Message-ID: <1298483913-20344-2-git-send-email-premi@ti.com> (raw)
In-Reply-To: <1298483913-20344-1-git-send-email-premi@ti.com>

Current implementation expects AVS to be available
on the processor - by default. May not be true.

This patch allows the vp_init() to be implemented
per processor (or family) - same as vc_init().

Signed-off-by: Sanjeev Premi <premi@ti.com>
---
 arch/arm/mach-omap2/voltage.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 12be525..bbc36e7 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -312,6 +312,8 @@ static struct dentry *voltage_dir;
 
 /* Init function pointers */
 static void (*vc_init) (struct omap_vdd_info *vdd);
+static void (*vp_init) (struct omap_vdd_info *vdd);
+
 static int (*vdd_data_configure) (struct omap_vdd_info *vdd);
 
 static u32 omap3_voltage_read_reg(u16 mod, u8 offset)
@@ -416,7 +418,7 @@ static void vp_latch_vsel(struct omap_vdd_info *vdd)
 }
 
 /* Generic voltage init functions */
-static void __init vp_init(struct omap_vdd_info *vdd)
+static void __init omap_vp_init(struct omap_vdd_info *vdd)
 {
 	u32 vp_val;
 	u16 mod;
@@ -1557,11 +1559,13 @@ static int __init omap_voltage_early_init(void)
 		vdd_info = omap3_vdd_info;
 		nr_scalable_vdd = OMAP3_NR_SCALABLE_VDD;
 		vc_init = omap3_vc_init;
+		vp_init = omap_vp_init;
 		vdd_data_configure = omap3_vdd_data_configure;
 	} else if (cpu_is_omap44xx()) {
 		vdd_info = omap4_vdd_info;
 		nr_scalable_vdd = OMAP4_NR_SCALABLE_VDD;
 		vc_init = omap4_vc_init;
+		vp_init = omap_vp_init;
 		vdd_data_configure = omap4_vdd_data_configure;
 	} else {
 		pr_warning("%s: voltage driver support not added\n", __func__);
-- 
1.7.2.2


  reply	other threads:[~2011-02-23 17:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 17:58 [RFC 0/3] Support TPS65023 with AM35xx Sanjeev Premi
2011-02-23 17:58 ` Sanjeev Premi [this message]
2011-02-23 18:36   ` [RFC 1/3] omap: voltage: Allow custom vp_init() implementation Menon, Nishanth
2011-02-23 20:45     ` Premi, Sanjeev
2011-02-24  1:11       ` Nishanth Menon
2011-02-23 17:58 ` [RFC 2/3] am35xx: voltage: Add basic initialization Sanjeev Premi
2011-02-23 18:40   ` Menon, Nishanth
2011-02-23 17:58 ` [RFC 3/3] am35xx: pm: Hook-up with TPS65023 Sanjeev Premi
2011-02-23 18:43   ` Menon, Nishanth
2011-02-24 13:20     ` Premi, Sanjeev
2011-02-24 10:04   ` Vishwanath Sripathy
2011-03-07 15:20     ` Premi, Sanjeev
2011-03-07 16:31       ` Vishwanath Sripathy
2011-03-08 12:26         ` Premi, Sanjeev
2011-03-08 12:45           ` Vishwanath Sripathy
2011-03-08 13:25             ` Premi, Sanjeev
2011-03-08 12:46           ` Nishanth Menon
2011-03-08 13:18             ` Premi, Sanjeev
2011-03-08 13:27               ` Menon, Nishanth
2011-03-08 13:37                 ` Premi, Sanjeev
2011-03-08 16:08                 ` Kevin Hilman

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=1298483913-20344-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