aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann2017-03-20 04:13:06 -0500
committerThierry Reding2017-04-04 08:43:51 -0500
commitbd737038d555468198495230f4233b9ba92e774c (patch)
treeddf59c149c0a3f28ffaefa4fa54effc96d0fddc3 /include
parent5e7d4c65294174d6f58fe36df3edd55cd3b859d6 (diff)
downloadkernel-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.h29
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 @@
26struct clk; 26struct clk;
27struct reset_control; 27struct reset_control;
28 28
29#ifdef CONFIG_PM_SLEEP
30enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
31void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
32void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
33#endif /* CONFIG_PM_SLEEP */
34
35#ifdef CONFIG_SMP 29#ifdef CONFIG_SMP
36bool tegra_pmc_cpu_is_powered(unsigned int cpuid); 30bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
37int tegra_pmc_cpu_power_on(unsigned int cpuid); 31int 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
148int tegra_powergate_is_powered(unsigned int id); 142int tegra_powergate_is_powered(unsigned int id);
149int tegra_powergate_power_on(unsigned int id); 143int tegra_powergate_power_on(unsigned int id);
150int tegra_powergate_power_off(unsigned int id); 144int 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 */
164int tegra_io_rail_power_on(unsigned int id); 158int tegra_io_rail_power_on(unsigned int id);
165int tegra_io_rail_power_off(unsigned int id); 159int tegra_io_rail_power_off(unsigned int id);
160
161enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
162void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
163void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
164
166#else 165#else
167static inline int tegra_powergate_is_powered(unsigned int id) 166static 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
224static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
225{
226 return TEGRA_SUSPEND_NONE;
227}
228
229static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
230{
231}
232
233static 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__ */