ARM: tegra: Compile sleep-tegra20/30.S unconditionally
authorDmitry Osipenko <digetx@gmail.com>
Mon, 24 Feb 2020 22:40:41 +0000 (01:40 +0300)
committerThierry Reding <treding@nvidia.com>
Thu, 12 Mar 2020 09:53:04 +0000 (10:53 +0100)
The sleep-tegra*.S provides functionality required for suspend/resume
and CPU hotplugging. The new unified CPUIDLE driver will support multiple
hardware generations starting from Terga20 and ending with Tegra124, the
driver will utilize functions that are provided by the assembly and thus
it is cleaner to compile that code without any build-dependencies in order
to avoid churning with #ifdef's.

Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Jasper Korten <jja2000@gmail.com>
Tested-by: David Heidelberg <david@ixit.cz>
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/sleep.h

index 6c1dff2eccc290e34c37c365512e5f0dbed9043b..965862608ff68e28f67061137de44e15670e119a 100644 (file)
@@ -8,13 +8,13 @@ obj-y                                 += reset.o
 obj-y                                  += reset-handler.o
 obj-y                                  += sleep.o
 obj-y                                  += tegra.o
+obj-y                                  += sleep-tegra20.o
+obj-y                                  += sleep-tegra30.o
 obj-$(CONFIG_CPU_IDLE)                 += cpuidle.o
-obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += sleep-tegra20.o
 obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += pm-tegra20.o
 ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += cpuidle-tegra20.o
 endif
-obj-$(CONFIG_ARCH_TEGRA_3x_SOC)                += sleep-tegra30.o
 obj-$(CONFIG_ARCH_TEGRA_3x_SOC)                += pm-tegra30.o
 ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_ARCH_TEGRA_3x_SOC)                += cpuidle-tegra30.o
@@ -22,12 +22,10 @@ endif
 obj-$(CONFIG_SMP)                      += platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)               += hotplug.o
 
-obj-$(CONFIG_ARCH_TEGRA_114_SOC)       += sleep-tegra30.o
 obj-$(CONFIG_ARCH_TEGRA_114_SOC)       += pm-tegra30.o
 ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_ARCH_TEGRA_114_SOC)       += cpuidle-tegra114.o
 endif
-obj-$(CONFIG_ARCH_TEGRA_124_SOC)       += sleep-tegra30.o
 obj-$(CONFIG_ARCH_TEGRA_124_SOC)       += pm-tegra30.o
 ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_ARCH_TEGRA_124_SOC)       += cpuidle-tegra114.o
index 78ef32a907c8dec76c5279532c8853f75ff1a80f..63e2205cbc825f7e30c15190ff023b5f4bed3733 100644 (file)
@@ -120,10 +120,8 @@ void tegra_resume(void);
 int tegra_sleep_cpu_finish(unsigned long);
 void tegra_disable_clean_inv_dcache(u32 flag);
 
-#ifdef CONFIG_HOTPLUG_CPU
 void tegra20_hotplug_shutdown(void);
 void tegra30_hotplug_shutdown(void);
-#endif
 
 void tegra20_cpu_shutdown(int cpu);
 int tegra20_cpu_is_resettable_soon(void);