summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/voltage.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-07-14 11:29:06 -0700
committerKevin Hilman <khilman@ti.com>2011-09-15 12:09:21 -0700
commite32778804930ed3141ffc55242d88e086d71ac24 (patch)
treebc013f2cd1b985fd8026d8a13d9a312ceaf26c19 /arch/arm/mach-omap2/voltage.c
parent7590f608aacba64c42edd5a8d9560264b049f403 (diff)
OMAP3+: voltdm: final removal of omap_vdd_info
Remove last remaining member (volt_data) from omap_vdd_info into struct voltagedomain and removal remaining usage and reference to omap_vdd_info. Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/voltage.c')
-rw-r--r--arch/arm/mach-omap2/voltage.c54
1 files changed, 9 insertions, 45 deletions
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 1b39e68db355..2ba276f18159 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -43,34 +43,6 @@
static LIST_HEAD(voltdm_list);
-static int __init _config_common_vdd_data(struct voltagedomain *voltdm)
-{
- /* Generic voltage parameters */
- voltdm->scale = omap_vp_forceupdate_scale;
-
- return 0;
-}
-
-static int __init omap_vdd_data_configure(struct voltagedomain *voltdm)
-{
- int ret = -EINVAL;
-
- if (!voltdm->pmic) {
- pr_err("%s: PMIC info requried to configure vdd_%s not"
- "populated.Hence cannot initialize vdd_%s\n",
- __func__, voltdm->name, voltdm->name);
- goto ovdc_out;
- }
-
- if (IS_ERR_VALUE(_config_common_vdd_data(voltdm)))
- goto ovdc_out;
-
- ret = 0;
-
-ovdc_out:
- return ret;
-}
-
/* Public functions */
/**
* omap_voltage_get_nom_volt() - Gets the current non-auto-compensated voltage
@@ -155,18 +127,14 @@ void voltdm_reset(struct voltagedomain *voltdm)
*
*/
void omap_voltage_get_volttable(struct voltagedomain *voltdm,
- struct omap_volt_data **volt_data)
+ struct omap_volt_data **volt_data)
{
- struct omap_vdd_info *vdd;
-
if (!voltdm || IS_ERR(voltdm)) {
pr_warning("%s: VDD specified does not exist!\n", __func__);
return;
}
- vdd = voltdm->vdd;
-
- *volt_data = vdd->volt_data;
+ *volt_data = voltdm->volt_data;
}
/**
@@ -185,9 +153,8 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm,
* domain or if there is no matching entry.
*/
struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
- unsigned long volt)
+ unsigned long volt)
{
- struct omap_vdd_info *vdd;
int i;
if (!voltdm || IS_ERR(voltdm)) {
@@ -195,17 +162,15 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
return ERR_PTR(-EINVAL);
}
- vdd = voltdm->vdd;
-
- if (!vdd->volt_data) {
+ if (!voltdm->volt_data) {
pr_warning("%s: voltage table does not exist for vdd_%s\n",
__func__, voltdm->name);
return ERR_PTR(-ENODATA);
}
- for (i = 0; vdd->volt_data[i].volt_nominal != 0; i++) {
- if (vdd->volt_data[i].volt_nominal == volt)
- return &vdd->volt_data[i];
+ for (i = 0; voltdm->volt_data[i].volt_nominal != 0; i++) {
+ if (voltdm->volt_data[i].volt_nominal == volt)
+ return &voltdm->volt_data[i];
}
pr_notice("%s: Unable to match the current voltage with the voltage"
@@ -304,9 +269,8 @@ int __init omap_voltage_late_init(void)
omap_vc_init_channel(voltdm);
}
- if (voltdm->vdd) {
- if (omap_vdd_data_configure(voltdm))
- continue;
+ if (voltdm->vp) {
+ voltdm->scale = omap_vp_forceupdate_scale;
omap_vp_init(voltdm);
}
}