All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Pihet <jean.pihet@newoldbits.com>
To: Kevin Hilman <khilman@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 09/12] OMAP: VP: Explicitly mask VPVOLTAGE field
Date: Wed, 7 Sep 2011 14:31:32 +0200	[thread overview]
Message-ID: <CAORVsuVmNa_15X4okj0mgCx=MHNPo+8zxNO03j7aKSS+t7yD-Q@mail.gmail.com> (raw)
In-Reply-To: <1314640692-3386-10-git-send-email-khilman@ti.com>

Kevin,

On Mon, Aug 29, 2011 at 7:58 PM, Kevin Hilman <khilman@ti.com> wrote:
> From: Todd Poynor <toddpoynor@google.com>
>
> Reading the VPVOLTAGE field of PRM_VP_*_VOLTAGE registers currently
> relies on a u32 -> u8 conversion to mask off the FORCEUPDATEWAIT field
> in the upper bits.  Make this explicit using the mask symbol
> already defined, added as a new field in struct omap_vp_common.
>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
>  arch/arm/mach-omap2/vp.c          |    3 ++-
>  arch/arm/mach-omap2/vp.h          |    2 ++
>  arch/arm/mach-omap2/vp3xxx_data.c |    2 ++
>  arch/arm/mach-omap2/vp44xx_data.c |    1 +
>  4 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
> index e7d38f6..3807620 100644
> --- a/arch/arm/mach-omap2/vp.c
> +++ b/arch/arm/mach-omap2/vp.c
> @@ -227,7 +227,8 @@ unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm)
>                return 0;
>        }
>
> -       curr_vsel = voltdm->read(vp->voltage);
> +       curr_vsel = (voltdm->read(vp->voltage) & vp->common->vpvoltage_mask)
> +               >> __ffs(vp->common->vpvoltage_mask);
>From the commit description it is not clear how the behavior of
voltdm->read is changed. Is this part of another patch from this set?

>
>        if (!voltdm->pmic || !voltdm->pmic->vsel_to_uv) {
>                pr_warning("%s: PMIC function to convert vsel to voltage"
> diff --git a/arch/arm/mach-omap2/vp.h b/arch/arm/mach-omap2/vp.h
> index 0d63267..f78752b 100644
> --- a/arch/arm/mach-omap2/vp.h
> +++ b/arch/arm/mach-omap2/vp.h
> @@ -63,6 +63,7 @@ struct omap_vp_ops {
>  * @vlimitto_vddmin_shift: VDDMIN field shift in PRM_VP*_VLIMITTO reg
>  * @vlimitto_vddmax_shift: VDDMAX field shift in PRM_VP*_VLIMITTO reg
>  * @vlimitto_timeout_shift: TIMEOUT field shift in PRM_VP*_VLIMITTO reg
> + * @vpvoltage_mask: VPVOLTAGE field mask in PRM_VP*_VOLTAGE reg
>  */
>  struct omap_vp_common {
>        u32 vpconfig_erroroffset_mask;
> @@ -79,6 +80,7 @@ struct omap_vp_common {
>        u8 vlimitto_vddmin_shift;
>        u8 vlimitto_vddmax_shift;
>        u8 vlimitto_timeout_shift;
> +       u8 vpvoltage_mask;
>
>        const struct omap_vp_ops *ops;
>  };
> diff --git a/arch/arm/mach-omap2/vp3xxx_data.c b/arch/arm/mach-omap2/vp3xxx_data.c
> index d429c44..260c554 100644
> --- a/arch/arm/mach-omap2/vp3xxx_data.c
> +++ b/arch/arm/mach-omap2/vp3xxx_data.c
> @@ -51,6 +51,8 @@ static const struct omap_vp_common omap3_vp_common = {
>        .vlimitto_vddmin_shift = OMAP3430_VDDMIN_SHIFT,
>        .vlimitto_vddmax_shift = OMAP3430_VDDMAX_SHIFT,
>        .vlimitto_timeout_shift = OMAP3430_TIMEOUT_SHIFT,
> +       .vpvoltage_mask = OMAP3430_VPVOLTAGE_MASK,
> +
Stray empty line...

>        .ops = &omap3_vp_ops,
>  };
>
> diff --git a/arch/arm/mach-omap2/vp44xx_data.c b/arch/arm/mach-omap2/vp44xx_data.c
> index 0daf2a4..b4e7704 100644
> --- a/arch/arm/mach-omap2/vp44xx_data.c
> +++ b/arch/arm/mach-omap2/vp44xx_data.c
> @@ -51,6 +51,7 @@ static const struct omap_vp_common omap4_vp_common = {
>        .vlimitto_vddmin_shift = OMAP4430_VDDMIN_SHIFT,
>        .vlimitto_vddmax_shift = OMAP4430_VDDMAX_SHIFT,
>        .vlimitto_timeout_shift = OMAP4430_TIMEOUT_SHIFT,
> +       .vpvoltage_mask = OMAP4430_VPVOLTAGE_MASK,
>        .ops = &omap4_vp_ops,
>  };
>
> --
> 1.7.6
>
> --
> 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
>

Regards,
Jean

WARNING: multiple messages have this Message-ID (diff)
From: jean.pihet@newoldbits.com (Jean Pihet)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/12] OMAP: VP: Explicitly mask VPVOLTAGE field
Date: Wed, 7 Sep 2011 14:31:32 +0200	[thread overview]
Message-ID: <CAORVsuVmNa_15X4okj0mgCx=MHNPo+8zxNO03j7aKSS+t7yD-Q@mail.gmail.com> (raw)
In-Reply-To: <1314640692-3386-10-git-send-email-khilman@ti.com>

Kevin,

On Mon, Aug 29, 2011 at 7:58 PM, Kevin Hilman <khilman@ti.com> wrote:
> From: Todd Poynor <toddpoynor@google.com>
>
> Reading the VPVOLTAGE field of PRM_VP_*_VOLTAGE registers currently
> relies on a u32 -> u8 conversion to mask off the FORCEUPDATEWAIT field
> in the upper bits. ?Make this explicit using the mask symbol
> already defined, added as a new field in struct omap_vp_common.
>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> Signed-off-by: Kevin Hilman <khilman@ti.com>
> ---
> ?arch/arm/mach-omap2/vp.c ? ? ? ? ?| ? ?3 ++-
> ?arch/arm/mach-omap2/vp.h ? ? ? ? ?| ? ?2 ++
> ?arch/arm/mach-omap2/vp3xxx_data.c | ? ?2 ++
> ?arch/arm/mach-omap2/vp44xx_data.c | ? ?1 +
> ?4 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
> index e7d38f6..3807620 100644
> --- a/arch/arm/mach-omap2/vp.c
> +++ b/arch/arm/mach-omap2/vp.c
> @@ -227,7 +227,8 @@ unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm)
> ? ? ? ? ? ? ? ?return 0;
> ? ? ? ?}
>
> - ? ? ? curr_vsel = voltdm->read(vp->voltage);
> + ? ? ? curr_vsel = (voltdm->read(vp->voltage) & vp->common->vpvoltage_mask)
> + ? ? ? ? ? ? ? >> __ffs(vp->common->vpvoltage_mask);

  reply	other threads:[~2011-09-07 12:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 17:58 [PATCH 00/12] OMAP: voltage cleanup part C: VP cleanup Kevin Hilman
2011-08-29 17:58 ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 01/12] OMAP3+: VP: cleanup: move VP instance into voltdm, misc. renames Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 02/12] OMAP3+: voltage: remove unneeded debugfs interface Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 03/12] OMAP3+: VP: struct omap_vp_common: replace shift with __ffs(mask) Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 04/12] OMAP3+: VP: move SoC-specific sys clock rate retreival late init Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 05/12] OMAP3+: VP: move timing calculation/config into VP init Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 06/12] OMAP3+: VP: create VP helper function for updating error gain Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 07/12] OMAP3+: VP: remove omap_vp_runtime_data Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 08/12] OMAP3+: VP: move voltage scale function pointer into struct voltagedomain Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 09/12] OMAP: VP: Explicitly mask VPVOLTAGE field Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-09-07 12:31   ` Jean Pihet [this message]
2011-09-07 12:31     ` Jean Pihet
2011-08-29 17:58 ` [PATCH 10/12] OMAP3+: VP: update_errorgain(): return error if VP Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 11/12] OMAP3+: VP: remove unused omap_vp_get_curr_volt() Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-08-29 17:58 ` [PATCH 12/12] OMAP3+: VP: combine setting init voltage into common function Kevin Hilman
2011-08-29 17:58   ` Kevin Hilman
2011-09-07 19:11 ` [PATCH 00/12] OMAP: voltage cleanup part C: VP cleanup Jean Pihet
2011-09-07 19:11   ` Jean Pihet

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='CAORVsuVmNa_15X4okj0mgCx=MHNPo+8zxNO03j7aKSS+t7yD-Q@mail.gmail.com' \
    --to=jean.pihet@newoldbits.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --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 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.