diff mbox series

[v2,03/14] Kconfig: Convert CONFIG_SYS_SRAM_SIZE to Kconfig

Message ID 20200710101907.11214-3-ovidiu.panait@windriver.com
State Accepted
Commit 9f63f02755f4cbdb8ee39d8da605d2f643aae220
Headers show
Series [v2,01/14] Kconfig: Introduce CONFIG_SYS_HAS_SRAM | expand

Commit Message

Ovidiu Panait July 10, 2020, 10:18 a.m. UTC
This converts ad-hoc CONFIG_SYS_SRAM_SIZE to Kconfig.

Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com>
---

 Kconfig                       | 7 +++++++
 include/configs/devkit8000.h  | 1 -
 include/configs/pic32mzdask.h | 2 --
 include/configs/tricorder.h   | 1 -
 scripts/config_whitelist.txt  | 1 -
 5 files changed, 7 insertions(+), 5 deletions(-)

Comments

Simon Glass July 15, 2020, 1:05 a.m. UTC | #1
On Fri, 10 Jul 2020 at 04:23, Ovidiu Panait <ovidiu.panait at windriver.com> wrote:
>
> This converts ad-hoc CONFIG_SYS_SRAM_SIZE to Kconfig.
>
> Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com>
> ---
>
>  Kconfig                       | 7 +++++++
>  include/configs/devkit8000.h  | 1 -
>  include/configs/pic32mzdask.h | 2 --
>  include/configs/tricorder.h   | 1 -
>  scripts/config_whitelist.txt  | 1 -
>  5 files changed, 7 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>
diff mbox series

Patch

diff --git a/Kconfig b/Kconfig
index 9b51a2cd20..8bafdff932 100644
--- a/Kconfig
+++ b/Kconfig
@@ -366,6 +366,13 @@  config SYS_SRAM_BASE
 	default 0x80000000 if TARGET_PIC32MZDASK
 	default 0x0
 
+config SYS_SRAM_SIZE
+	hex
+	default 0x00080000 if TARGET_PIC32MZDASK
+	default 0x10000 if TARGET_DEVKIT8000
+	default 0x10000 if TARGET_TRICORDER
+	default 0x0
+
 endmenu		# General setup
 
 menu "Boot images"
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index f90c1c5a18..cdf7d7aa21 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -140,7 +140,6 @@ 
 
 /* SRAM config */
 #define CONFIG_SYS_SRAM_START              0x40200000
-#define CONFIG_SYS_SRAM_SIZE               0x10000
 
 /* Defines for SPL */
 
diff --git a/include/configs/pic32mzdask.h b/include/configs/pic32mzdask.h
index 25b898f2e6..d50edc7715 100644
--- a/include/configs/pic32mzdask.h
+++ b/include/configs/pic32mzdask.h
@@ -19,8 +19,6 @@ 
 /*----------------------------------------------------------------------
  * Memory Layout
  */
-#define CONFIG_SYS_SRAM_SIZE		0x00080000 /* 512K */
-
 /* Initial RAM for temporary stack, global data */
 #define CONFIG_SYS_INIT_RAM_SIZE	0x10000
 #define CONFIG_SYS_INIT_RAM_ADDR	\
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 83aa3cd468..d438a7e635 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -202,7 +202,6 @@ 
 
 /* SRAM config */
 #define CONFIG_SYS_SRAM_START		0x40200000
-#define CONFIG_SYS_SRAM_SIZE		0x10000
 
 /* Defines for SPL */
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 9e167989c4..7a2ff835f8 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -3798,7 +3798,6 @@  CONFIG_SYS_SPL_LEN
 CONFIG_SYS_SPL_MALLOC_SIZE
 CONFIG_SYS_SPL_MALLOC_START
 CONFIG_SYS_SPR
-CONFIG_SYS_SRAM_SIZE
 CONFIG_SYS_SRAM_START
 CONFIG_SYS_SRIO
 CONFIG_SYS_SRIO1_MEM_BASE