OMAP3+: voltage: move/rename curr_volt from vdd_info into struct voltagedomain
authorKevin Hilman <khilman@ti.com>
Tue, 5 Apr 2011 23:55:22 +0000 (16:55 -0700)
committerKevin Hilman <khilman@ti.com>
Thu, 15 Sep 2011 19:09:21 +0000 (12:09 -0700)
Track current nominal voltage as part of struct voltagedomain instead
of omap_vdd_info, which will soon be removed.

Also renames field from curr_volt to nominal_volt.

No functional changes.

Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/vc.c
arch/arm/mach-omap2/voltage.c
arch/arm/mach-omap2/voltage.h

index f8bdd5183e2fe732cb317e557b3ee2ef5a039a1f..d9e69944f0c9919d3a3839f387fb4ae97c70c2de 100644 (file)
@@ -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);
@@ -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);
@@ -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 */
index 4afb36883b25564748f19a612047fba7c140850e..1b39e68db3554ebc32f68b4ce14bfea2e8fe9769 100644 (file)
@@ -81,16 +81,12 @@ ovdc_out:
  */
 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;
 }
 
 /**
index 7f8b00aff394c99e6e94c5a49fd84ebee113a17c..0bd71a2910ab9f1aca6e8dda36a9867cf5914d90 100644 (file)
@@ -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;
@@ -85,6 +86,7 @@ struct voltagedomain {
 
        int (*scale) (struct voltagedomain *voltdm,
                      unsigned long target_volt);
+       u32 nominal_volt;
 
        struct omap_vdd_info *vdd;
 };
@@ -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,