diff options
author | Kevin Hilman <khilman@ti.com> | 2011-04-05 19:55:22 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-15 15:09:21 -0400 |
commit | 7590f608aacba64c42edd5a8d9560264b049f403 (patch) | |
tree | 86f3fa5543538fb82bc73192ea5b7ff7d1194142 | |
parent | 5e5651be29d8bd08d0cc2bc617c43acff95e2229 (diff) |
OMAP3+: voltage: move/rename curr_volt from vdd_info into struct voltagedomain
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>
-rw-r--r-- | arch/arm/mach-omap2/vc.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/voltage.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/voltage.h | 4 |
3 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index f8bdd5183e2f..d9e69944f0c9 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c | |||
@@ -128,7 +128,7 @@ int omap_vc_pre_scale(struct voltagedomain *voltdm, | |||
128 | } | 128 | } |
129 | 129 | ||
130 | *target_vsel = voltdm->pmic->uv_to_vsel(target_volt); | 130 | *target_vsel = voltdm->pmic->uv_to_vsel(target_volt); |
131 | *current_vsel = voltdm->pmic->uv_to_vsel(vdd->curr_volt); | 131 | *current_vsel = voltdm->pmic->uv_to_vsel(voltdm->nominal_volt); |
132 | 132 | ||
133 | /* Setting the ON voltage to the new target voltage */ | 133 | /* Setting the ON voltage to the new target voltage */ |
134 | vc_cmdval = voltdm->read(vc->cmdval_reg); | 134 | vc_cmdval = voltdm->read(vc->cmdval_reg); |
@@ -145,7 +145,6 @@ void omap_vc_post_scale(struct voltagedomain *voltdm, | |||
145 | unsigned long target_volt, | 145 | unsigned long target_volt, |
146 | u8 target_vsel, u8 current_vsel) | 146 | u8 target_vsel, u8 current_vsel) |
147 | { | 147 | { |
148 | struct omap_vdd_info *vdd = voltdm->vdd; | ||
149 | u32 smps_steps = 0, smps_delay = 0; | 148 | u32 smps_steps = 0, smps_delay = 0; |
150 | 149 | ||
151 | smps_steps = abs(target_vsel - current_vsel); | 150 | smps_steps = abs(target_vsel - current_vsel); |
@@ -154,7 +153,7 @@ void omap_vc_post_scale(struct voltagedomain *voltdm, | |||
154 | voltdm->pmic->slew_rate) + 2; | 153 | voltdm->pmic->slew_rate) + 2; |
155 | udelay(smps_delay); | 154 | udelay(smps_delay); |
156 | 155 | ||
157 | vdd->curr_volt = target_volt; | 156 | voltdm->nominal_volt = target_volt; |
158 | } | 157 | } |
159 | 158 | ||
160 | /* vc_bypass_scale - VC bypass method of voltage scaling */ | 159 | /* vc_bypass_scale - VC bypass method of voltage scaling */ |
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index 4afb36883b25..1b39e68db355 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c | |||
@@ -81,16 +81,12 @@ ovdc_out: | |||
81 | */ | 81 | */ |
82 | unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm) | 82 | unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm) |
83 | { | 83 | { |
84 | struct omap_vdd_info *vdd; | ||
85 | |||
86 | if (!voltdm || IS_ERR(voltdm)) { | 84 | if (!voltdm || IS_ERR(voltdm)) { |
87 | pr_warning("%s: VDD specified does not exist!\n", __func__); | 85 | pr_warning("%s: VDD specified does not exist!\n", __func__); |
88 | return 0; | 86 | return 0; |
89 | } | 87 | } |
90 | 88 | ||
91 | vdd = voltdm->vdd; | 89 | return voltdm->nominal_volt; |
92 | |||
93 | return vdd->curr_volt; | ||
94 | } | 90 | } |
95 | 91 | ||
96 | /** | 92 | /** |
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h index 7f8b00aff394..0bd71a2910ab 100644 --- a/arch/arm/mach-omap2/voltage.h +++ b/arch/arm/mach-omap2/voltage.h | |||
@@ -62,6 +62,7 @@ struct omap_vfsm_instance { | |||
62 | * @sys_clk: system clock name/frequency, used for various timing calculations | 62 | * @sys_clk: system clock name/frequency, used for various timing calculations |
63 | * @vdd: to be removed | 63 | * @vdd: to be removed |
64 | * @scale: function used to scale the voltage of the voltagedomain | 64 | * @scale: function used to scale the voltage of the voltagedomain |
65 | * @nominal_volt: current nominal voltage for this voltage domain | ||
65 | */ | 66 | */ |
66 | struct voltagedomain { | 67 | struct voltagedomain { |
67 | char *name; | 68 | char *name; |
@@ -85,6 +86,7 @@ struct voltagedomain { | |||
85 | 86 | ||
86 | int (*scale) (struct voltagedomain *voltdm, | 87 | int (*scale) (struct voltagedomain *voltdm, |
87 | unsigned long target_volt); | 88 | unsigned long target_volt); |
89 | u32 nominal_volt; | ||
88 | 90 | ||
89 | struct omap_vdd_info *vdd; | 91 | struct omap_vdd_info *vdd; |
90 | }; | 92 | }; |
@@ -148,11 +150,9 @@ struct omap_voltdm_pmic { | |||
148 | * | 150 | * |
149 | * @volt_data : voltage table having the distinct voltages supported | 151 | * @volt_data : voltage table having the distinct voltages supported |
150 | * by the domain and other associated per voltage data. | 152 | * by the domain and other associated per voltage data. |
151 | * @curr_volt : current voltage for this vdd. | ||
152 | */ | 153 | */ |
153 | struct omap_vdd_info { | 154 | struct omap_vdd_info { |
154 | struct omap_volt_data *volt_data; | 155 | struct omap_volt_data *volt_data; |
155 | u32 curr_volt; | ||
156 | }; | 156 | }; |
157 | 157 | ||
158 | void omap_voltage_get_volttable(struct voltagedomain *voltdm, | 158 | void omap_voltage_get_volttable(struct voltagedomain *voltdm, |