diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.h | 2 |
2 files changed, 7 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); |
118 | skip_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); |
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h index 140c36074fed..9701ad5778b9 100644 --- a/arch/arm/mach-omap2/powerdomain.h +++ b/arch/arm/mach-omap2/powerdomain.h | |||
@@ -166,6 +166,7 @@ struct powerdomain { | |||
166 | * @pwrdm_disable_hdwr_sar: Disable Hardware Save-Restore feature for a pd | 166 | * @pwrdm_disable_hdwr_sar: Disable Hardware Save-Restore feature for a pd |
167 | * @pwrdm_set_lowpwrstchange: Enable pd transitions from a shallow to deep sleep | 167 | * @pwrdm_set_lowpwrstchange: Enable pd transitions from a shallow to deep sleep |
168 | * @pwrdm_wait_transition: Wait for a pd state transition to complete | 168 | * @pwrdm_wait_transition: Wait for a pd state transition to complete |
169 | * @pwrdm_has_voltdm: Check if a voltdm association is needed | ||
169 | * | 170 | * |
170 | * Regarding @pwrdm_set_lowpwrstchange: On the OMAP2 and 3-family | 171 | * Regarding @pwrdm_set_lowpwrstchange: On the OMAP2 and 3-family |
171 | * chips, a powerdomain's power state is not allowed to directly | 172 | * chips, a powerdomain's power state is not allowed to directly |
@@ -196,6 +197,7 @@ struct pwrdm_ops { | |||
196 | int (*pwrdm_disable_hdwr_sar)(struct powerdomain *pwrdm); | 197 | int (*pwrdm_disable_hdwr_sar)(struct powerdomain *pwrdm); |
197 | int (*pwrdm_set_lowpwrstchange)(struct powerdomain *pwrdm); | 198 | int (*pwrdm_set_lowpwrstchange)(struct powerdomain *pwrdm); |
198 | int (*pwrdm_wait_transition)(struct powerdomain *pwrdm); | 199 | int (*pwrdm_wait_transition)(struct powerdomain *pwrdm); |
200 | int (*pwrdm_has_voltdm)(void); | ||
199 | }; | 201 | }; |
200 | 202 | ||
201 | int pwrdm_register_platform_funcs(struct pwrdm_ops *custom_funcs); | 203 | int pwrdm_register_platform_funcs(struct pwrdm_ops *custom_funcs); |