Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272754
b: refs/heads/master
c: 7590f60
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Hilman committed Sep 15, 2011
1 parent ca02390 commit 3b625aa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e5651be29d8bd08d0cc2bc617c43acff95e2229
refs/heads/master: 7590f608aacba64c42edd5a8d9560264b049f403
5 changes: 2 additions & 3 deletions trunk/arch/arm/mach-omap2/vc.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int omap_vc_pre_scale(struct voltagedomain *voltdm,
}

*target_vsel = voltdm->pmic->uv_to_vsel(target_volt);
*current_vsel = voltdm->pmic->uv_to_vsel(vdd->curr_volt);
*current_vsel = voltdm->pmic->uv_to_vsel(voltdm->nominal_volt);

/* Setting the ON voltage to the new target voltage */
vc_cmdval = voltdm->read(vc->cmdval_reg);
Expand All @@ -145,7 +145,6 @@ void omap_vc_post_scale(struct voltagedomain *voltdm,
unsigned long target_volt,
u8 target_vsel, u8 current_vsel)
{
struct omap_vdd_info *vdd = voltdm->vdd;
u32 smps_steps = 0, smps_delay = 0;

smps_steps = abs(target_vsel - current_vsel);
Expand All @@ -154,7 +153,7 @@ void omap_vc_post_scale(struct voltagedomain *voltdm,
voltdm->pmic->slew_rate) + 2;
udelay(smps_delay);

vdd->curr_volt = target_volt;
voltdm->nominal_volt = target_volt;
}

/* vc_bypass_scale - VC bypass method of voltage scaling */
Expand Down
6 changes: 1 addition & 5 deletions trunk/arch/arm/mach-omap2/voltage.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,12 @@ static int __init omap_vdd_data_configure(struct voltagedomain *voltdm)
*/
unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm)
{
struct omap_vdd_info *vdd;

if (!voltdm || IS_ERR(voltdm)) {
pr_warning("%s: VDD specified does not exist!\n", __func__);
return 0;
}

vdd = voltdm->vdd;

return vdd->curr_volt;
return voltdm->nominal_volt;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-omap2/voltage.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ struct omap_vfsm_instance {
* @sys_clk: system clock name/frequency, used for various timing calculations
* @vdd: to be removed
* @scale: function used to scale the voltage of the voltagedomain
* @nominal_volt: current nominal voltage for this voltage domain
*/
struct voltagedomain {
char *name;
Expand All @@ -85,6 +86,7 @@ struct voltagedomain {

int (*scale) (struct voltagedomain *voltdm,
unsigned long target_volt);
u32 nominal_volt;

struct omap_vdd_info *vdd;
};
Expand Down Expand Up @@ -148,11 +150,9 @@ struct omap_voltdm_pmic {
*
* @volt_data : voltage table having the distinct voltages supported
* by the domain and other associated per voltage data.
* @curr_volt : current voltage for this vdd.
*/
struct omap_vdd_info {
struct omap_volt_data *volt_data;
u32 curr_volt;
};

void omap_voltage_get_volttable(struct voltagedomain *voltdm,
Expand Down

0 comments on commit 3b625aa

Please sign in to comment.