diff options
author | Arnd Bergmann | 2017-03-20 04:13:06 -0500 |
---|---|---|
committer | Thierry Reding | 2017-04-04 08:43:51 -0500 |
commit | bd737038d555468198495230f4233b9ba92e774c (patch) | |
tree | ddf59c149c0a3f28ffaefa4fa54effc96d0fddc3 /include | |
parent | 5e7d4c65294174d6f58fe36df3edd55cd3b859d6 (diff) | |
download | kernel-bd737038d555468198495230f4233b9ba92e774c.tar.gz kernel-bd737038d555468198495230f4233b9ba92e774c.tar.xz kernel-bd737038d555468198495230f4233b9ba92e774c.zip |
soc/tegra: Fix link errors with PMC disabled
With the new Tegra186 PMC driver merged, anything that relies on the previous
PMC driver fails to link when that is disabled:
arch/arm/mach-tegra/pm.o: In function `tegra_pm_set':
pm.c:(.text.tegra_pm_set+0x3c): undefined reference to `tegra_pmc_enter_suspend_mode'
arch/arm/mach-tegra/pm.o: In function `tegra_suspend_enter':
pm.c:(.text.tegra_suspend_enter+0x4): undefined reference to `tegra_pmc_get_suspend_mode'
arch/arm/mach-tegra/pm.o: In function `tegra_init_suspend':
pm.c:(.init.text+0x1c): undefined reference to `tegra_pmc_get_suspend_mode'
pm.c:(.init.text+0x74): undefined reference to `tegra_pmc_set_suspend_mode'
ERROR: tegra_powergate_sequence_power_up [drivers/ata/ahci_tegra.ko] undefined!
ERROR: tegra_powergate_power_off [drivers/ata/ahci_tegra.ko] undefined!
Making the definition depend on the presence of the driver makes it build
again, though that might not be the correct fix.
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 854014236290 ("soc/tegra: Implement Tegra186 PMC support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/soc/tegra/pmc.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h index 2f271d1b9cea..1c3982bc558f 100644 --- a/include/soc/tegra/pmc.h +++ b/include/soc/tegra/pmc.h | |||
@@ -26,12 +26,6 @@ | |||
26 | struct clk; | 26 | struct clk; |
27 | struct reset_control; | 27 | struct reset_control; |
28 | 28 | ||
29 | #ifdef CONFIG_PM_SLEEP | ||
30 | enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void); | ||
31 | void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode); | ||
32 | void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode); | ||
33 | #endif /* CONFIG_PM_SLEEP */ | ||
34 | |||
35 | #ifdef CONFIG_SMP | 29 | #ifdef CONFIG_SMP |
36 | bool tegra_pmc_cpu_is_powered(unsigned int cpuid); | 30 | bool tegra_pmc_cpu_is_powered(unsigned int cpuid); |
37 | int tegra_pmc_cpu_power_on(unsigned int cpuid); | 31 | int tegra_pmc_cpu_power_on(unsigned int cpuid); |
@@ -144,7 +138,7 @@ enum tegra_io_pad_voltage { | |||
144 | TEGRA_IO_PAD_3300000UV, | 138 | TEGRA_IO_PAD_3300000UV, |
145 | }; | 139 | }; |
146 | 140 | ||
147 | #ifdef CONFIG_ARCH_TEGRA | 141 | #ifdef CONFIG_SOC_TEGRA_PMC |
148 | int tegra_powergate_is_powered(unsigned int id); | 142 | int tegra_powergate_is_powered(unsigned int id); |
149 | int tegra_powergate_power_on(unsigned int id); | 143 | int tegra_powergate_power_on(unsigned int id); |
150 | int tegra_powergate_power_off(unsigned int id); | 144 | int tegra_powergate_power_off(unsigned int id); |
@@ -163,6 +157,11 @@ int tegra_io_pad_get_voltage(enum tegra_io_pad id); | |||
163 | /* deprecated, use tegra_io_pad_power_{enable,disable}() instead */ | 157 | /* deprecated, use tegra_io_pad_power_{enable,disable}() instead */ |
164 | int tegra_io_rail_power_on(unsigned int id); | 158 | int tegra_io_rail_power_on(unsigned int id); |
165 | int tegra_io_rail_power_off(unsigned int id); | 159 | int tegra_io_rail_power_off(unsigned int id); |
160 | |||
161 | enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void); | ||
162 | void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode); | ||
163 | void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode); | ||
164 | |||
166 | #else | 165 | #else |
167 | static inline int tegra_powergate_is_powered(unsigned int id) | 166 | static inline int tegra_powergate_is_powered(unsigned int id) |
168 | { | 167 | { |
@@ -221,6 +220,20 @@ static inline int tegra_io_rail_power_off(unsigned int id) | |||
221 | { | 220 | { |
222 | return -ENOSYS; | 221 | return -ENOSYS; |
223 | } | 222 | } |
224 | #endif /* CONFIG_ARCH_TEGRA */ | 223 | |
224 | static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void) | ||
225 | { | ||
226 | return TEGRA_SUSPEND_NONE; | ||
227 | } | ||
228 | |||
229 | static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode) | ||
230 | { | ||
231 | } | ||
232 | |||
233 | static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode) | ||
234 | { | ||
235 | } | ||
236 | |||
237 | #endif /* CONFIG_SOC_TEGRA_PMC */ | ||
225 | 238 | ||
226 | #endif /* __SOC_TEGRA_PMC_H__ */ | 239 | #endif /* __SOC_TEGRA_PMC_H__ */ |