From: Kevin Hilman <khilman@deeprootsystems.com>
To: sawsd wang <sawsdwang@gmail.com>
Cc: linux-omap@vger.kernel.org, Chunqiu Wang <cqwang@motorola.com>
Subject: Re: [PATCH 1/2] Support OMAP3 VC adaptation with different Power IC
Date: Fri, 26 Jun 2009 07:57:13 -0700 [thread overview]
Message-ID: <8763ejhwl2.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1950ceae0906251655r2ef9514o2bb2bd92b83be0f2@mail.gmail.com> (sawsd wang's message of "Fri\, 26 Jun 2009 07\:55\:50 +0800")
sawsd wang <sawsdwang@gmail.com> writes:
> From c1aba8ba7af3ddd16346d95795bda71e65baa4d0 Mon Sep 17 00:00:00 2001
> From: Chunqiu Wang <cqwang@motorola.com>
> Date: Wed, 24 Jun 2009 06:48:52 +0800
> Subject: [PATCH] Support OMAP3 VC adaptation with different Power IC
>
> Current OMAP SmartReflex driver only supports TI Triton
> Power IC, add a callback to make it possible to use
> different PowerIC and use different settings to
> configure OMAP3 Voltage Controller for DVFS
>
> Board file can setup a new function to have different settings
> on SR to configure their Power IC for voltage scaling
>
> Signed-off-by: Chunqiu Wang <cqwang@motorola.com>
Patch is still line-wrapped in at least one place, and patch 2/2 is
wrapped in several.
Based on format and the headers, it doesn't look to me like you're
using git-send-email. Really, git-send-email will make your life much
simpler.
Feel free to send me some test patches off-list so we can figure
out your mailer problems.
Kevin
> ---
> arch/arm/mach-omap2/smartreflex.c | 13 +++++++++++++
> arch/arm/mach-omap2/smartreflex.h | 4 ++++
> arch/arm/plat-omap/Kconfig | 2 +-
> 3 files changed, 18 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c
> b/arch/arm/mach-omap2/smartreflex.c
> index 9d462e3..bacf602 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -52,6 +52,8 @@ struct omap_sr {
>
> #define SR_REGADDR(offs) (sr->srbase_addr + offset)
>
> +static omap3_voltagescale_vcbypass_t omap3_volscale_vcbypass_fun;
> +
> static inline void sr_write_reg(struct omap_sr *sr, unsigned offset, u32 value)
> {
> __raw_writel(value, SR_REGADDR(offset));
> @@ -767,6 +769,11 @@ void disable_smartreflex(int srid)
> }
> }
>
> +void omap3_voltagescale_vcbypass_setup(omap3_voltagescale_vcbypass_t fun)
> +{
> + omap3_volscale_vcbypass_fun = fun;
> +}
> +
> /* Voltage Scaling using SR VCBYPASS */
> int sr_voltagescale_vcbypass(u32 target_opp, u32 current_opp,
> u8 target_vsel, u8 current_vsel)
> @@ -779,6 +786,10 @@ int sr_voltagescale_vcbypass(u32 target_opp, u32
> current_opp,
> u32 t2_smps_steps = 0;
> u32 t2_smps_delay = 0;
>
> + if (omap3_volscale_vcbypass_fun)
> + return omap3_volscale_vcbypass_fun(target_opp, current_opp,
> + target_vsel, current_vsel);
> +
> vdd = get_vdd(target_opp);
> target_opp_no = get_opp_no(target_opp);
> current_opp_no = get_opp_no(current_opp);
> @@ -940,6 +951,7 @@ static int __init omap3_sr_init(void)
> return -ENODEV;
> }
>
> +#ifdef CONFIG_TWL4030_CORE
> /* Enable SR on T2 */
> ret = twl4030_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &RdReg,
> R_DCDC_GLOBAL_CFG);
> @@ -947,6 +959,7 @@ static int __init omap3_sr_init(void)
> RdReg |= DCDC_GLOBAL_CFG_ENABLE_SRFLX;
> ret |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, RdReg,
> R_DCDC_GLOBAL_CFG);
> +#endif
>
> if (cpu_is_omap34xx()) {
> sr1.clk = clk_get(NULL, "sr1_fck");
> diff --git a/arch/arm/mach-omap2/smartreflex.h
> b/arch/arm/mach-omap2/smartreflex.h
> index 2a0e823..c4aca9d 100644
> --- a/arch/arm/mach-omap2/smartreflex.h
> +++ b/arch/arm/mach-omap2/smartreflex.h
> @@ -248,9 +248,13 @@ void disable_smartreflex(int srid);
> int sr_voltagescale_vcbypass(u32 t_opp, u32 c_opp, u8 t_vsel, u8 c_vsel);
> void sr_start_vddautocomap(int srid, u32 target_opp_no);
> int sr_stop_vddautocomap(int srid);
> +typedef int (*omap3_voltagescale_vcbypass_t)(u32 t_opp, u32 c_opp,
> + u8 t_vsel, u8 c_vsel);
> +void omap3_voltagescale_vcbypass_setup(omap3_voltagescale_vcbypass_t fun);
> #else
> static inline void enable_smartreflex(int srid) {}
> static inline void disable_smartreflex(int srid) {}
> +#define omap3_voltagescale_vcbypass_setup(fun) do {} while (0);
> #endif
>
> #endif
> diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> index c8ba1e2..8d2c607 100644
> --- a/arch/arm/plat-omap/Kconfig
> +++ b/arch/arm/plat-omap/Kconfig
> @@ -68,7 +68,7 @@ config OMAP_DEBUG_CLOCKDOMAIN
>
> config OMAP_SMARTREFLEX
> bool "SmartReflex support"
> - depends on ARCH_OMAP34XX && TWL4030_CORE && PM
> + depends on ARCH_OMAP34XX && PM
> help
> Say Y if you want to enable SmartReflex.
>
> --
> 1.5.4.3
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-06-26 14:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 23:55 [PATCH 1/2] Support OMAP3 VC adaptation with different Power IC sawsd wang
2009-06-26 14:57 ` Kevin Hilman [this message]
2009-09-30 18:57 ` Kevin Hilman
-- strict thread matches above, loose matches on Subject: below --
2009-06-24 0:15 Wang Sawsd-A24013
2009-06-24 0:19 ` Kevin Hilman
2009-06-24 16:10 ` Wang Sawsd-A24013
2009-06-25 17:38 ` Kevin Hilman
2009-06-25 20:10 ` Wang Sawsd-A24013
2009-06-25 1:25 ` Mike Chan
2009-06-25 16:00 ` Wang Sawsd-A24013
2009-06-25 19:25 ` Mike Chan
2009-06-25 20:12 ` Wang Sawsd-A24013
2009-06-25 21:18 ` Mike Chan
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=8763ejhwl2.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=cqwang@motorola.com \
--cc=linux-omap@vger.kernel.org \
--cc=sawsdwang@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox