diff mbox series

[v5,12/14] ARM: tegra: Create simple platform device for cpuidle driver

Message ID 20190929175952.22690-13-digetx@gmail.com
State Changes Requested
Headers show
Series Consolidate and improve NVIDIA Tegra CPUIDLE driver(s) | expand

Commit Message

Dmitry Osipenko Sept. 29, 2019, 5:59 p.m. UTC
The new CPUIDLE driver now is a proper platform driver, hence it needs
a platform device in order to be functional. Register the platform device,
like we do that for the CPUFreq driver. Note that on some Tegra114(124)
devices PSCI may be used for the CPU hotplugging and CPUIDLE driver
doesn't support that case, thus CPUIDLE device won't be registered if
PCSI presents.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
 arch/arm/mach-tegra/tegra.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series


diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c
index d9237769a37c..f1ce2857a251 100644
--- a/arch/arm/mach-tegra/tegra.c
+++ b/arch/arm/mach-tegra/tegra.c
@@ -36,6 +36,7 @@ 
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/mach-types.h>
+#include <asm/psci.h>
 #include <asm/setup.h>
 #include "board.h"
@@ -92,6 +93,9 @@  static void __init tegra_dt_init_late(void)
 		platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0);
+	if (IS_ENABLED(CONFIG_ARM_TEGRA_CPUIDLE) && !psci_smp_available())
+		platform_device_register_simple("tegra-cpuidle", -1, NULL, 0);
 static const char * const tegra_dt_board_compat[] = {