diff options
author | Kevin Hilman <khilman@ti.com> | 2011-09-21 12:24:53 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-21 12:36:21 -0400 |
commit | 2edc7ba5e8fdba327e16d3d0086e831c5fe6f577 (patch) | |
tree | 33980ce848dc8b3027c155b6e92ddd3d41efd115 /arch | |
parent | ee7fbba63e334481049a7939b8071160824447d3 (diff) |
ARM: OMAP: voltage: voltage layer present, even when CONFIG_PM=n
Even when CONFIG_PM=n, we try to scale the boot voltage to a sane,
known value using OPP table to find matching voltage based on boot
frequency. This should be done, even when CONFIG_PM=n to avoid
mis-configured bootloaders and/or boot voltage assumptions made by
boot loaders.
Also fixes various compile problems due to depenencies between voltage
domain and powerdomain code (also present when CONFIG_PM=n).
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/voltage.h | 14 |
2 files changed, 0 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 824718969e31..ef77a00dd5c4 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -89,7 +89,6 @@ obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \ | |||
89 | vp44xx_data.o | 89 | vp44xx_data.o |
90 | 90 | ||
91 | # OMAP voltage domains | 91 | # OMAP voltage domains |
92 | ifeq ($(CONFIG_PM),y) | ||
93 | voltagedomain-common := voltage.o vc.o vp.o | 92 | voltagedomain-common := voltage.o vc.o vp.o |
94 | obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) \ | 93 | obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) \ |
95 | voltagedomains2xxx_data.o | 94 | voltagedomains2xxx_data.o |
@@ -97,7 +96,6 @@ obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \ | |||
97 | voltagedomains3xxx_data.o | 96 | voltagedomains3xxx_data.o |
98 | obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ | 97 | obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ |
99 | voltagedomains44xx_data.o | 98 | voltagedomains44xx_data.o |
100 | endif | ||
101 | 99 | ||
102 | # OMAP powerdomain framework | 100 | # OMAP powerdomain framework |
103 | powerdomain-common += powerdomain.o powerdomain-common.o | 101 | powerdomain-common += powerdomain.o powerdomain-common.o |
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h index 4c0980941991..16a1b092cf36 100644 --- a/arch/arm/mach-omap2/voltage.h +++ b/arch/arm/mach-omap2/voltage.h | |||
@@ -148,25 +148,11 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm, | |||
148 | struct omap_volt_data **volt_data); | 148 | struct omap_volt_data **volt_data); |
149 | struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, | 149 | struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, |
150 | unsigned long volt); | 150 | unsigned long volt); |
151 | #ifdef CONFIG_PM | ||
152 | int omap_voltage_register_pmic(struct voltagedomain *voltdm, | 151 | int omap_voltage_register_pmic(struct voltagedomain *voltdm, |
153 | struct omap_voltdm_pmic *pmic); | 152 | struct omap_voltdm_pmic *pmic); |
154 | void omap_change_voltscale_method(struct voltagedomain *voltdm, | 153 | void omap_change_voltscale_method(struct voltagedomain *voltdm, |
155 | int voltscale_method); | 154 | int voltscale_method); |
156 | int omap_voltage_late_init(void); | 155 | int omap_voltage_late_init(void); |
157 | #else | ||
158 | static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm, | ||
159 | struct omap_voltdm_pmic *pmic) | ||
160 | { | ||
161 | return -EINVAL; | ||
162 | } | ||
163 | static inline void omap_change_voltscale_method(struct voltagedomain *voltdm, | ||
164 | int voltscale_method) {} | ||
165 | static inline int omap_voltage_late_init(void) | ||
166 | { | ||
167 | return -EINVAL; | ||
168 | } | ||
169 | #endif | ||
170 | 156 | ||
171 | extern void omap2xxx_voltagedomains_init(void); | 157 | extern void omap2xxx_voltagedomains_init(void); |
172 | extern void omap3xxx_voltagedomains_init(void); | 158 | extern void omap3xxx_voltagedomains_init(void); |