Skip to content

Commit

Permalink
OMAP2+: voltage: start towards a new voltagedomain layer
Browse files Browse the repository at this point in the history
Start cleaning up the voltage layer to have a voltage domain layer
that resembles the structure of the existing clock and power domain
layers.  To that end:

- move the 'struct voltagedomain' out of 'struct omap_vdd_info' to
  become the primary data structure.

- convert any functions taking a pointer to struct omap_vdd_info into
  functions taking a struct voltagedomain pointer.

- convert the register & initialize of voltage domains to look like
  that of powerdomains

- convert omap_voltage_domain_lookup() to voltdm_lookup(), modeled
  after the current powerdomain and clockdomain lookup functions.

- omap_voltage_late_init(): only configure VDD info when
  the vdd_info struct is non-NULL

Signed-off-by: Kevin Hilman <khilman@ti.com>
  • Loading branch information
Kevin Hilman committed Sep 15, 2011
1 parent c39263c commit 81a6048
Show file tree
Hide file tree
Showing 8 changed files with 207 additions and 172 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-omap2/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "io.h"

#include <plat/omap-pm.h>
#include "voltage.h"
#include "powerdomain.h"

#include "clockdomain.h"
Expand Down Expand Up @@ -349,10 +350,12 @@ void __init omap2_init_common_infrastructure(void)
omap243x_clockdomains_init();
omap2430_hwmod_init();
} else if (cpu_is_omap34xx()) {
omap3xxx_voltagedomains_init();
omap3xxx_powerdomains_init();
omap3xxx_clockdomains_init();
omap3xxx_hwmod_init();
} else if (cpu_is_omap44xx()) {
omap44xx_voltagedomains_init();
omap44xx_powerdomains_init();
omap44xx_clockdomains_init();
omap44xx_hwmod_init();
Expand Down
10 changes: 5 additions & 5 deletions arch/arm/mach-omap2/omap_twl.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ int __init omap4_twl_init(void)
if (!cpu_is_omap44xx())
return -ENODEV;

voltdm = omap_voltage_domain_lookup("mpu");
voltdm = voltdm_lookup("mpu");
omap_voltage_register_pmic(voltdm, &omap4_mpu_volt_info);

voltdm = omap_voltage_domain_lookup("iva");
voltdm = voltdm_lookup("iva");
omap_voltage_register_pmic(voltdm, &omap4_iva_volt_info);

voltdm = omap_voltage_domain_lookup("core");
voltdm = voltdm_lookup("core");
omap_voltage_register_pmic(voltdm, &omap4_core_volt_info);

return 0;
Expand Down Expand Up @@ -288,10 +288,10 @@ int __init omap3_twl_init(void)
if (!twl_sr_enable_autoinit)
omap3_twl_set_sr_bit(true);

voltdm = omap_voltage_domain_lookup("mpu");
voltdm = voltdm_lookup("mpu");
omap_voltage_register_pmic(voltdm, &omap3_mpu_volt_info);

voltdm = omap_voltage_domain_lookup("core");
voltdm = voltdm_lookup("core");
omap_voltage_register_pmic(voltdm, &omap3_core_volt_info);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
goto exit;
}

voltdm = omap_voltage_domain_lookup(vdd_name);
voltdm = voltdm_lookup(vdd_name);
if (IS_ERR(voltdm)) {
printk(KERN_ERR "%s: Unable to get vdd pointer for vdd_%s\n",
__func__, vdd_name);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/sr_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user)
sr_data->senn_mod = 0x1;
sr_data->senp_mod = 0x1;

sr_data->voltdm = omap_voltage_domain_lookup(oh->vdd_name);
sr_data->voltdm = voltdm_lookup(oh->vdd_name);
if (IS_ERR(sr_data->voltdm)) {
pr_err("%s: Unable to get voltage domain pointer for VDD %s\n",
__func__, oh->vdd_name);
Expand Down
Loading

0 comments on commit 81a6048

Please sign in to comment.