All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [pm_wip/voltdm_nm][PATCH v2 2/3] OMAP4: PM: VC: introduce concept of default channel
Date: Fri, 03 Jun 2011 10:27:31 -0700	[thread overview]
Message-ID: <878vtig70c.fsf@ti.com> (raw)
In-Reply-To: <87pqmvn6gk.fsf@ti.com> (Kevin Hilman's message of "Thu, 02 Jun 2011 16:45:15 -0700")

Hi Nishanth,

Kevin Hilman <khilman@ti.com> writes:

[...]

>
> So rather than take this patch, I'm just going to fold the following
> diff into "OMAP3+: VC: abstract out channel configuration" in voltdm_b.
> I'll also update the changelog noting that the TRM is wrong here in that
> it describes CORE as the default channel when it's in fact MPU.
>

FYI...

I modified this slightly in the current voltdm_* branch in that I'm now
using a 'u8 flags' in the VC struct intead of a bool for this since  I expect
to have some other reasons to use various flags.

Kevin

>
> diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
> index fba352d..fa48944 100644
> --- a/arch/arm/mach-omap2/vc.c
> +++ b/arch/arm/mach-omap2/vc.c
> @@ -33,21 +33,20 @@
>   * - command configuration address (RAC) and enable bit (RACEN)
>   * - command values for ON, ONLP, RET and OFF (CMD)
>   *
> - * This function currently only allows flexible configuration of
> - * the non-default channel (e.g. non-zero channels.)  Starting with
> - * OMAP4, only the non-zero channels can be configured.  Channel zero
> - * always uses the channel zero register values.  Therefore, the
> - * same limitation is imposed on OMAP3 for consistency.
> + * This function currently only allows flexible configuration of the
> + * non-default channel.  Starting with OMAP4, there are more than 2
> + * channels, with one defined as the default (on OMAP4, it's MPU.)
> + * Only the non-default channel can be configured.
>   */
>  static int omap_vc_config_channel(struct voltagedomain *voltdm)
>  {
>  	struct omap_vc_channel *vc = voltdm->vc;
>  
>  	/*
> -	 * For channel zero, the only configurable bit is RACEN.
> +	 * For default channel, the only configurable bit is RACEN.
>  	 * All others must stay at zero (see function comment above.)
>  	 */
> -	if (!vc->cfg_channel_sa_shift)
> +	if (vc->is_default_channel)
>  		vc->cfg_channel &= CFG_CHANNEL_RACEN;
>  
>  	voltdm->rmw(CFG_CHANNEL_MASK << vc->cfg_channel_sa_shift,
> diff --git a/arch/arm/mach-omap2/vc.h b/arch/arm/mach-omap2/vc.h
> index f0fb61f..c216b57 100644
> --- a/arch/arm/mach-omap2/vc.h
> +++ b/arch/arm/mach-omap2/vc.h
> @@ -84,6 +84,8 @@ struct omap_vc_channel {
>  	u32 smps_cmdra_mask;
>  	u8 cmdval_reg;
>  	u8 cfg_channel_sa_shift;
> +
> +	bool is_default_channel;
>  };
>  
>  extern struct omap_vc_channel omap3_vc_mpu;
> diff --git a/arch/arm/mach-omap2/vc44xx_data.c b/arch/arm/mach-omap2/vc44xx_data.c
> index fe4f4e5..5844b20 100644
> --- a/arch/arm/mach-omap2/vc44xx_data.c
> +++ b/arch/arm/mach-omap2/vc44xx_data.c
> @@ -58,6 +58,7 @@ struct omap_vc_channel omap4_vc_mpu = {
>  	.smps_volra_mask = OMAP4430_VOLRA_VDD_MPU_L_MASK,
>  	.smps_cmdra_mask = OMAP4430_CMDRA_VDD_MPU_L_MASK,
>  	.cfg_channel_sa_shift = OMAP4430_SA_VDD_MPU_L_SHIFT,
> +	.is_default_channel = true,
>  };
>  
>  struct omap_vc_channel omap4_vc_iva = {

  parent reply	other threads:[~2011-06-03 17:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 23:19 [pm_wip/voltdm_nm][PATCH v2 0/4] OMAP4: PM: Voltage cleanups Nishanth Menon
2011-05-29 23:19 ` [pm_wip/voltdm_nm][PATCH v2 1/3] OMAP4: PM: VC: fix channel bit offset for MPU Nishanth Menon
2011-06-03 23:42   ` Kevin Hilman
2011-05-29 23:19 ` [pm_wip/voltdm_nm][PATCH v2 2/3] OMAP4: PM: VC: introduce concept of default channel Nishanth Menon
2011-06-02 23:45   ` Kevin Hilman
2011-06-02 23:53     ` Menon, Nishanth
2011-06-03  0:10       ` Kevin Hilman
2011-06-03  0:15         ` Menon, Nishanth
2011-06-03 17:27     ` Kevin Hilman [this message]
2011-05-29 23:19 ` [pm_wip/voltdm_nm][PATCH v2 3/3] OMAP4: PM: VC: make omap_vc_i2c_init static Nishanth Menon
2011-06-02 23:47   ` 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=878vtig70c.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@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 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.