ARM: tegra: add PRAM Kconfig option
authorSvyatoslav Ryhel <clamor95@gmail.com>
Tue, 15 Apr 2025 08:54:55 +0000 (11:54 +0300)
committerSvyatoslav Ryhel <clamor95@gmail.com>
Thu, 8 May 2025 05:31:12 +0000 (08:31 +0300)
Wrap CFG_PRAM with Kconfig option.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
arch/arm/mach-tegra/Kconfig
include/configs/tegra.h

index 4690dcb..67bd239 100644 (file)
@@ -198,6 +198,20 @@ source "arch/arm/mach-tegra/tegra124/Kconfig"
 source "arch/arm/mach-tegra/tegra210/Kconfig"
 source "arch/arm/mach-tegra/tegra186/Kconfig"
 
+config TEGRA_PRAM
+       select TEGRA_SUPPORT_NON_SECURE if TEGRA114 || TEGRA124
+       bool "Support reservation of the protected RAM"
+       help
+         This option indicates the presence of a region of protected RAM.
+
+config TEGRA_PRAM_SIZE
+       hex "Size of pRAM region"
+       depends on TEGRA_PRAM
+       default 0x1000
+       help
+         Size in kB of carevout which will be reserved as protected RAM starting
+         from the top of the RAM.
+
 config TEGRA_SPI
        def_bool y
        depends on TEGRA20_SFLASH || TEGRA20_SLINK || TEGRA114_SPI
index 77bc389..5db3129 100644 (file)
 #include "tegra210-common.h"
 #endif
 
+#ifdef CONFIG_TEGRA_PRAM
+  #define CFG_PRAM CONFIG_TEGRA_PRAM_SIZE
+#endif
+
 #include "tegra-common-post.h"
 
 #endif /* __CONFIG_H */