aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomain.c
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2013-06-17 09:16:22 -0400
committerKevin Hilman <khilman@linaro.org>2013-06-17 10:25:14 -0400
commitcd8abed1da91a3250aa4b3857479613a2b446f84 (patch)
tree68e04d74a2d89be8145016a2e103cf4f87b6f89d /arch/arm/mach-omap2/powerdomain.c
parent7d132055814ef17a6c7b69f342244c410a5e000f (diff)
ARM: OMAP2+: Powerdomain: Remove the need to always have a voltdm associated to a pwrdm
The powerdomain framework currently expects all powerdomains to be associated with a corresponding voltagedomain. For some SoCs' (like the already existing AM33xx family, or for the upcoming AM437x and DRA7 SoCs') which do not have a Voltage controller/Voltage Processor (neither the SR I2C bus to communicate with the PMIC) there is no need for a Powerdomain to have a voltage domain association since there is no auto-scaling of voltages possible using the voltage FSM. Extend the arch operations to add an api which the powerdomain core can then use to identify if a voltdm lookup and association for a powerdomain is really needed. Acked-by: Nishanth Menon <nm@ti.com> Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Afzal Mohammed <afzal@ti.com> # am335x evm Signed-off-by: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.c')
-rw-r--r--arch/arm/mach-omap2/powerdomain.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 86babd740d41..e233dfcbc186 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -102,6 +102,10 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
102 if (_pwrdm_lookup(pwrdm->name)) 102 if (_pwrdm_lookup(pwrdm->name))
103 return -EEXIST; 103 return -EEXIST;
104 104
105 if (arch_pwrdm && arch_pwrdm->pwrdm_has_voltdm)
106 if (!arch_pwrdm->pwrdm_has_voltdm())
107 goto skip_voltdm;
108
105 voltdm = voltdm_lookup(pwrdm->voltdm.name); 109 voltdm = voltdm_lookup(pwrdm->voltdm.name);
106 if (!voltdm) { 110 if (!voltdm) {
107 pr_err("powerdomain: %s: voltagedomain %s does not exist\n", 111 pr_err("powerdomain: %s: voltagedomain %s does not exist\n",
@@ -111,6 +115,7 @@ static int _pwrdm_register(struct powerdomain *pwrdm)
111 pwrdm->voltdm.ptr = voltdm; 115 pwrdm->voltdm.ptr = voltdm;
112 INIT_LIST_HEAD(&pwrdm->voltdm_node); 116 INIT_LIST_HEAD(&pwrdm->voltdm_node);
113 voltdm_add_pwrdm(voltdm, pwrdm); 117 voltdm_add_pwrdm(voltdm, pwrdm);
118skip_voltdm:
114 spin_lock_init(&pwrdm->_lock); 119 spin_lock_init(&pwrdm->_lock);
115 120
116 list_add(&pwrdm->node, &pwrdm_list); 121 list_add(&pwrdm->node, &pwrdm_list);