diff options
author | Tony Lindgren <tony@atomide.com> | 2013-06-18 04:08:39 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-06-18 04:08:39 -0400 |
commit | 8bfdfc87dc3d00eb2f33e972b4177c36ca0e3d54 (patch) | |
tree | a0c4bbe9983e598ed4c6acab8157dfa30b5204f5 | |
parent | 7d132055814ef17a6c7b69f342244c410a5e000f (diff) | |
parent | 63b0420c85096d4bb1a3ba365dbf6b970a58b8f7 (diff) |
Merge tag 'omap-pm-v3.11/voltdm' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-v3.11/pm-voltdomain
OMAP: PM: remove requirement for voltage domain data; remove dummy data
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm33xx.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/voltage.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/voltagedomains33xx_data.c | 43 |
7 files changed, 14 insertions, 46 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 55a9d6777683..a4f1d2a78d98 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -125,7 +125,6 @@ obj-$(CONFIG_ARCH_OMAP3) += voltagedomains3xxx_data.o | |||
125 | obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) | 125 | obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) |
126 | obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o | 126 | obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o |
127 | obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common) | 127 | obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common) |
128 | obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o | ||
129 | obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common) | 128 | obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common) |
130 | 129 | ||
131 | # OMAP powerdomain framework | 130 | # OMAP powerdomain framework |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 09abf99e9e57..50b93df45846 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -577,7 +577,6 @@ void __init am33xx_init_early(void) | |||
577 | omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL); | 577 | omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL); |
578 | omap3xxx_check_revision(); | 578 | omap3xxx_check_revision(); |
579 | ti81xx_check_features(); | 579 | ti81xx_check_features(); |
580 | am33xx_voltagedomains_init(); | ||
581 | am33xx_powerdomains_init(); | 580 | am33xx_powerdomains_init(); |
582 | am33xx_clockdomains_init(); | 581 | am33xx_clockdomains_init(); |
583 | am33xx_hwmod_init(); | 582 | am33xx_hwmod_init(); |
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); |
diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c index 44c0d7216aa7..720440737744 100644 --- a/arch/arm/mach-omap2/prm33xx.c +++ b/arch/arm/mach-omap2/prm33xx.c | |||
@@ -320,6 +320,12 @@ static int am33xx_pwrdm_wait_transition(struct powerdomain *pwrdm) | |||
320 | return 0; | 320 | return 0; |
321 | } | 321 | } |
322 | 322 | ||
323 | static int am33xx_check_vcvp(void) | ||
324 | { | ||
325 | /* No VC/VP on am33xx devices */ | ||
326 | return 0; | ||
327 | } | ||
328 | |||
323 | struct pwrdm_ops am33xx_pwrdm_operations = { | 329 | struct pwrdm_ops am33xx_pwrdm_operations = { |
324 | .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, | 330 | .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, |
325 | .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst, | 331 | .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst, |
@@ -335,4 +341,5 @@ struct pwrdm_ops am33xx_pwrdm_operations = { | |||
335 | .pwrdm_set_mem_onst = am33xx_pwrdm_set_mem_onst, | 341 | .pwrdm_set_mem_onst = am33xx_pwrdm_set_mem_onst, |
336 | .pwrdm_set_mem_retst = am33xx_pwrdm_set_mem_retst, | 342 | .pwrdm_set_mem_retst = am33xx_pwrdm_set_mem_retst, |
337 | .pwrdm_wait_transition = am33xx_pwrdm_wait_transition, | 343 | .pwrdm_wait_transition = am33xx_pwrdm_wait_transition, |
344 | .pwrdm_has_voltdm = am33xx_check_vcvp, | ||
338 | }; | 345 | }; |
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h index a0ce4f10ff13..9bf796df1b9e 100644 --- a/arch/arm/mach-omap2/voltage.h +++ b/arch/arm/mach-omap2/voltage.h | |||
@@ -169,7 +169,6 @@ int omap_voltage_late_init(void); | |||
169 | 169 | ||
170 | extern void omap2xxx_voltagedomains_init(void); | 170 | extern void omap2xxx_voltagedomains_init(void); |
171 | extern void omap3xxx_voltagedomains_init(void); | 171 | extern void omap3xxx_voltagedomains_init(void); |
172 | extern void am33xx_voltagedomains_init(void); | ||
173 | extern void omap44xx_voltagedomains_init(void); | 172 | extern void omap44xx_voltagedomains_init(void); |
174 | 173 | ||
175 | struct voltagedomain *voltdm_lookup(const char *name); | 174 | struct voltagedomain *voltdm_lookup(const char *name); |
diff --git a/arch/arm/mach-omap2/voltagedomains33xx_data.c b/arch/arm/mach-omap2/voltagedomains33xx_data.c deleted file mode 100644 index 965458dc0cb9..000000000000 --- a/arch/arm/mach-omap2/voltagedomains33xx_data.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * AM33XX voltage domain data | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License as | ||
8 | * published by the Free Software Foundation version 2. | ||
9 | * | ||
10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
11 | * kind, whether express or implied; without even the implied warranty | ||
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/init.h> | ||
18 | |||
19 | #include "voltage.h" | ||
20 | |||
21 | static struct voltagedomain am33xx_voltdm_mpu = { | ||
22 | .name = "mpu", | ||
23 | }; | ||
24 | |||
25 | static struct voltagedomain am33xx_voltdm_core = { | ||
26 | .name = "core", | ||
27 | }; | ||
28 | |||
29 | static struct voltagedomain am33xx_voltdm_rtc = { | ||
30 | .name = "rtc", | ||
31 | }; | ||
32 | |||
33 | static struct voltagedomain *voltagedomains_am33xx[] __initdata = { | ||
34 | &am33xx_voltdm_mpu, | ||
35 | &am33xx_voltdm_core, | ||
36 | &am33xx_voltdm_rtc, | ||
37 | NULL, | ||
38 | }; | ||
39 | |||
40 | void __init am33xx_voltagedomains_init(void) | ||
41 | { | ||
42 | voltdm_init(voltagedomains_am33xx); | ||
43 | } | ||