From: Kevin Hilman <khilman@deeprootsystems.com>
To: Thara Gopinath <thara@ti.com>
Cc: linux-omap@vger.kernel.org, paul@pwsan.com, b-cousson@ti.com,
vishwanath.bs@ti.com, sawant@ti.com, dderrick@ti.com
Subject: Re: [PATCHv2 2/8] OMAP3: PM: Adding voltage driver support for OMAP3
Date: Mon, 30 Aug 2010 16:21:44 -0700 [thread overview]
Message-ID: <87sk1vwut3.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1281707231-3026-3-git-send-email-thara@ti.com> (Thara Gopinath's message of "Fri, 13 Aug 2010 19:17:05 +0530")
Thara Gopinath <thara@ti.com> writes:
> +/*
> + * vc_bypass_scale_voltage - VC bypass method of voltage scaling
> + */
> +static int vc_bypass_scale_voltage(struct omap_vdd_info *vdd,
> + unsigned long target_volt)
> +{
> + struct omap_volt_data *volt_data;
> + u32 vc_bypass_value, vc_cmdval, vc_valid, vc_bypass_val_reg_offs;
> + u32 vp_errgain_val, vc_cmd_on_mask;
> + u32 loop_cnt = 0, retries_cnt = 0;
> + u32 smps_steps = 0, smps_delay = 0;
> + u8 vc_data_shift, vc_slaveaddr_shift, vc_regaddr_shift;
> + u8 vc_cmd_on_shift;
> + u8 target_vsel, current_vsel, sr_i2c_slave_addr;
> +
> + if (cpu_is_omap34xx()) {
> + vc_cmd_on_shift = OMAP3430_VC_CMD_ON_SHIFT;
> + vc_cmd_on_mask = OMAP3430_VC_CMD_ON_MASK;
> + vc_data_shift = OMAP3430_DATA_SHIFT;
> + vc_slaveaddr_shift = OMAP3430_SLAVEADDR_SHIFT;
> + vc_regaddr_shift = OMAP3430_REGADDR_SHIFT;
> + vc_valid = OMAP3430_VALID_MASK;
> + vc_bypass_val_reg_offs = OMAP3_PRM_VC_BYPASS_VAL_OFFSET;
> + sr_i2c_slave_addr = OMAP3_SRI2C_SLAVE_ADDR;
> + }
cpu_is_* should not be used every time this path is taken. Rather, all
the SoC conditional values should be initialized once at init time.
[...]
> +/* VP force update method of voltage scaling */
> +static int vp_forceupdate_scale_voltage(struct omap_vdd_info *vdd,
> + unsigned long target_volt)
> +{
> + struct omap_volt_data *volt_data;
> + u32 vc_cmd_on_mask, vc_cmdval, vpconfig;
> + u32 smps_steps = 0, smps_delay = 0;
> + int timeout = 0;
> + u8 target_vsel, current_vsel;
> + u8 vc_cmd_on_shift;
> + u8 prm_irqst_reg_offs, ocp_mod;
> +
> + if (cpu_is_omap34xx()) {
> + vc_cmd_on_shift = OMAP3430_VC_CMD_ON_SHIFT;
> + vc_cmd_on_mask = OMAP3430_VC_CMD_ON_MASK;
> + prm_irqst_reg_offs = OMAP3_PRM_IRQSTATUS_MPU_OFFSET;
> + ocp_mod = OCP_MOD;
> + }
ditto.
Same goes for the OMAP4 patches which add to this.
Kevin
next prev parent reply other threads:[~2010-08-30 23:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 13:47 [PATCHv2 0/8] OMAP3: Adding Smartreflex and Voltage driver support Thara Gopinath
2010-08-13 13:47 ` [PATCHv2 1/8] OMAP: PM: Allowing an early init of pm debugfs driver Thara Gopinath
2010-08-24 22:16 ` Kevin Hilman
2010-08-24 22:21 ` Kevin Hilman
2010-09-14 14:56 ` Gopinath, Thara
2010-08-13 13:47 ` [PATCHv2 2/8] OMAP3: PM: Adding voltage driver support for OMAP3 Thara Gopinath
2010-08-25 0:01 ` Kevin Hilman
2010-09-14 15:32 ` Gopinath, Thara
2010-08-30 23:06 ` Kevin Hilman
2010-08-30 23:21 ` Kevin Hilman [this message]
2010-08-13 13:47 ` [PATCHv2 3/8] OMAP3: PM: Adding smartreflex driver support Thara Gopinath
2010-08-25 22:21 ` Kevin Hilman
2010-09-14 15:58 ` Gopinath, Thara
2010-09-14 17:04 ` Kevin Hilman
2010-08-13 13:47 ` [PATCHv2 4/8] OMAP3: PM: Adding smartreflex device file Thara Gopinath
2010-08-25 22:26 ` Kevin Hilman
2010-09-14 15:36 ` Gopinath, Thara
2010-09-14 16:03 ` Kevin Hilman
2010-09-15 6:12 ` Gopinath, Thara
2010-08-13 13:47 ` [PATCHv2 5/8] OMAP3: PM: Adding smartreflex hwmod data Thara Gopinath
2010-08-25 22:29 ` Kevin Hilman
2010-08-13 13:47 ` [PATCHv2 6/8] OMAP3: PM: Adding smartreflex class3 driver Thara Gopinath
2010-08-25 22:31 ` Kevin Hilman
2010-09-14 15:58 ` Gopinath, Thara
2010-08-13 13:47 ` [PATCHv2 7/8] OMAP3: PM: Adding T2 enabling of smartreflex support Thara Gopinath
2010-08-13 13:47 ` [PATCHv2 8/8] OMAP3: PM: Adding debug support to Voltage and Smartreflex drivers Thara Gopinath
2010-08-24 23:53 ` Kevin Hilman
2010-09-14 14:58 ` Gopinath, Thara
2010-09-14 16:05 ` 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=87sk1vwut3.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=b-cousson@ti.com \
--cc=dderrick@ti.com \
--cc=linux-omap@vger.kernel.org \
--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 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.