[PATCH 29/38] Convert CONFIG_TEGRA_CLOCK_SCALING et al to Kconfig

Tom Rini
2022-11-19T23:51:26Z

This converts the following to Kconfig:
CONFIG_TEGRA_CLOCK_SCALING
CONFIG_TEGRA_LP0
CONFIG_TEGRA_PMU

Signed-off-by: Tom Rini <trini@konsulko.com>
---
arch/arm/mach-tegra/tegra20/Kconfig | 12 ++++++++++++
arch/arm/mach-tegra/tegra20/warmboot.c | 4 ----
include/configs/seaboard.h | 5 -----
3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig
index 5c4d35b5673d..345563fc789e 100644
--- a/arch/arm/mach-tegra/tegra20/Kconfig
+++ b/arch/arm/mach-tegra/tegra20/Kconfig
@@ -1,5 +1,15 @@
if TEGRA20

+config TEGRA_LP0
+ bool
+ select TEGRA_CLOCK_SCALING
+
+config TEGRA_PMU
+ bool
+
+config TEGRA_CLOCK_SCALING
+ bool
+
choice
prompt "Tegra20 board select"
optional
@@ -23,6 +33,8 @@ config TARGET_PLUTUX
config TARGET_SEABOARD
bool "NVIDIA Seaboard"
select BOARD_LATE_INIT
+ select TEGRA_LP0
+ select TEGRA_PMU

config TARGET_TEC
bool "Avionic Design Tamonten Evaluation Carrier"
diff --git a/arch/arm/mach-tegra/tegra20/warmboot.c b/arch/arm/mach-tegra/tegra20/warmboot.c
index 3d3758f6e6f4..5e3a9ebaceb3 100644
--- a/arch/arm/mach-tegra/tegra20/warmboot.c
+++ b/arch/arm/mach-tegra/tegra20/warmboot.c
@@ -23,10 +23,6 @@

DECLARE_GLOBAL_DATA_PTR;

-#ifndef CONFIG_TEGRA_CLOCK_SCALING
-#error "You must enable CONFIG_TEGRA_CLOCK_SCALING to use CONFIG_TEGRA_LP0"
-#endif
-
/*
* This is the place in SRAM where the SDRAM parameters are stored. There
* are 4 blocks, one for each RAM code
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h
index 73b738bd0993..f272fe9bf8f1 100644
--- a/include/configs/seaboard.h
+++ b/include/configs/seaboard.h
@@ -9,11 +9,6 @@

#include <linux/sizes.h>

-/* LP0 suspend / resume */
-#define CONFIG_TEGRA_LP0
-#define CONFIG_TEGRA_PMU
-#define CONFIG_TEGRA_CLOCK_SCALING
-
#include "tegra20-common.h"

/* High-level configuration options */
--
2.25.1