public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: Thara Gopinath <thara@ti.com>
Cc: linux-omap@vger.kernel.org, khilman@deeprootsystems.com,
	paul@pwsan.com, nm@ti.com, vishwanath.bs@ti.com, sawant@ti.com,
	b-cousson@ti.com
Subject: Re: [PATCH 3/3] OMAP3: PM: Adding OMAP3630 support in smartreflex driver
Date: Mon, 8 Mar 2010 20:18:47 +0200	[thread overview]
Message-ID: <20100308181846.GC6630@gandalf> (raw)
In-Reply-To: <1268068851-30022-4-git-send-email-thara@ti.com>

hi,

On Mon, Mar 08, 2010 at 10:50:51PM +0530, Thara Gopinath wrote:
> @@ -289,32 +311,66 @@ static void __init vp_reg_configure(int vp_id)
>  
>  		vp_reg[vp_id].vp_offs = omap3_vp_offs[vp_id];
>  		if (vp_id == VP1) {
> -			/*
> -			 * OMAP3430 has error gain varying btw higher and
> -			 * lower opp's
> -			 */
> -			vp_reg[vp_id].vp_errorgain = (((get_vdd1_opp() > 2) ?
> -					(OMAP3_VP_CONFIG_ERRORGAIN_HIGHOPP) :
> -					(OMAP3_VP_CONFIG_ERRORGAIN_LOWOPP)) <<
> +			u8 vlimitto_vddmin, vlimitto_vddmax;
> +
> +			if (cpu_is_omap3630()) {
> +				vlimitto_vddmin = OMAP3630_VP1_VLIMITTO_VDDMIN;
> +				vlimitto_vddmax = OMAP3630_VP1_VLIMITTO_VDDMAX;
> +				/*
> +				 * OMAP3630 has error gain varying btw
> +				 * all opp's
> +				 */
> +				vp_reg[vp_id].vp_errorgain =
> +					(omap_errorgain[get_vdd1_opp() - 1] <<
> +					OMAP3430_ERRORGAIN_SHIFT);

this error gain hunk repeats itself over and over again. How about
adding an inline function for handling that ? Also, why not using
SR version you added instead of cpu_is_xxx() check ?

-- 
balbi

  reply	other threads:[~2010-03-08 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 17:20 [PATCH 0/3] OMAP3: PM: OMAP3630 support for smartreflex driver Thara Gopinath
2010-03-08 17:20 ` [PATCH 1/3] OMAP3: PM: Bug fix in Smartreflex driver Thara Gopinath
2010-03-08 17:20   ` [PATCH 2/3] OMAP3: PM: Smartreflex IP update changes for OMAP3630 Thara Gopinath
2010-03-08 17:20     ` [PATCH 3/3] OMAP3: PM: Adding OMAP3630 support in smartreflex driver Thara Gopinath
2010-03-08 18:18       ` Felipe Balbi [this message]
2010-03-09  8:55         ` Gopinath, Thara
2010-03-08 17:46     ` [PATCH 2/3] OMAP3: PM: Smartreflex IP update changes for OMAP3630 Kevin Hilman
2010-03-22  7:05       ` Gopinath, Thara
2010-03-08 18:12     ` Felipe Balbi
2010-03-08 17:38   ` [PATCH 1/3] OMAP3: PM: Bug fix in Smartreflex driver Kevin Hilman
2010-03-08 18:05   ` Felipe Balbi
2010-03-08 17:36 ` [PATCH 0/3] OMAP3: PM: OMAP3630 support for smartreflex driver Kevin Hilman
2010-03-09  8:59   ` Gopinath, Thara
2010-03-09 19:04     ` 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=20100308181846.GC6630@gandalf \
    --to=me@felipebalbi.com \
    --cc=b-cousson@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=sawant@ti.com \
    --cc=thara@ti.com \
    --cc=vishwanath.bs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox