aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/voltagedomains44xx_data.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-03-16 14:25:45 -0700
committerKevin Hilman <khilman@ti.com>2011-09-15 11:39:09 -0700
commit81a604823797ddb3aaf2a78cc1c6a1fa8f4d200c (patch)
tree68e8c9f006b9e1b3349fa1d28bba02501b15c872 /arch/arm/mach-omap2/voltagedomains44xx_data.c
parentOMAP2+: voltage: move prm_irqst_reg from VP into voltage domain (diff)
downloadlinux-dev-81a604823797ddb3aaf2a78cc1c6a1fa8f4d200c.tar.xz
linux-dev-81a604823797ddb3aaf2a78cc1c6a1fa8f4d200c.zip
OMAP2+: voltage: start towards a new voltagedomain layer
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>
Diffstat (limited to 'arch/arm/mach-omap2/voltagedomains44xx_data.c')
-rw-r--r--arch/arm/mach-omap2/voltagedomains44xx_data.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c
index 64dc265aa2ad..245fdf9cb4a5 100644
--- a/arch/arm/mach-omap2/voltagedomains44xx_data.c
+++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c
@@ -42,9 +42,6 @@ static struct omap_vdd_info omap4_vdd_mpu_info = {
.vp_data = &omap4_vp_mpu_data,
.vc_data = &omap4_vc_mpu_data,
.vfsm = &omap4_vdd_mpu_vfsm_data,
- .voltdm = {
- .name = "mpu",
- },
};
static const struct omap_vfsm_instance_data omap4_vdd_iva_vfsm_data = {
@@ -57,9 +54,6 @@ static struct omap_vdd_info omap4_vdd_iva_info = {
.vp_data = &omap4_vp_iva_data,
.vc_data = &omap4_vc_iva_data,
.vfsm = &omap4_vdd_iva_vfsm_data,
- .voltdm = {
- .name = "iva",
- },
};
static const struct omap_vfsm_instance_data omap4_vdd_core_vfsm_data = {
@@ -72,24 +66,32 @@ static struct omap_vdd_info omap4_vdd_core_info = {
.vp_data = &omap4_vp_core_data,
.vc_data = &omap4_vc_core_data,
.vfsm = &omap4_vdd_core_vfsm_data,
- .voltdm = {
- .name = "core",
- },
};
-/* OMAP4 VDD structures */
-static struct omap_vdd_info *omap4_vdd_info[] = {
- &omap4_vdd_mpu_info,
- &omap4_vdd_iva_info,
- &omap4_vdd_core_info,
+static struct voltagedomain omap4_voltdm_mpu = {
+ .name = "mpu",
+ .vdd = &omap4_vdd_mpu_info,
};
-/* OMAP4 specific voltage init functions */
-static int __init omap44xx_voltage_early_init(void)
-{
- if (!cpu_is_omap44xx())
- return 0;
+static struct voltagedomain omap4_voltdm_iva = {
+ .name = "iva",
+ .vdd = &omap4_vdd_iva_info,
+};
+
+static struct voltagedomain omap4_voltdm_core = {
+ .name = "core",
+ .vdd = &omap4_vdd_core_info,
+};
+static struct voltagedomain *voltagedomains_omap4[] __initdata = {
+ &omap4_voltdm_mpu,
+ &omap4_voltdm_iva,
+ &omap4_voltdm_core,
+ NULL,
+};
+
+void __init omap44xx_voltagedomains_init(void)
+{
/*
* XXX Will depend on the process, validation, and binning
* for the currently-running IC
@@ -98,7 +100,5 @@ static int __init omap44xx_voltage_early_init(void)
omap4_vdd_iva_info.volt_data = omap44xx_vdd_iva_volt_data;
omap4_vdd_core_info.volt_data = omap44xx_vdd_core_volt_data;
- return omap_voltage_early_init(omap4_vdd_info,
- ARRAY_SIZE(omap4_vdd_info));
+ voltdm_init(voltagedomains_omap4);
};
-core_initcall(omap44xx_voltage_early_init);