All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig
Date: Tue,  9 Dec 2014 06:21:29 -0700	[thread overview]
Message-ID: <1418131289-829-2-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1418131289-829-1-git-send-email-sjg@chromium.org>

Move this option to Kconfig and update all boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 Kconfig                                 | 9 +++++++++
 arch/arm/cpu/armv7/tegra-common/Kconfig | 3 +++
 arch/arm/cpu/armv7/uniphier/Kconfig     | 3 +++
 arch/x86/Kconfig                        | 3 +++
 include/configs/cm_fx6.h                | 3 ---
 include/configs/exynos-common.h         | 1 -
 include/configs/mx6sabre_common.h       | 1 -
 include/configs/rpi.h                   | 1 -
 include/configs/s5p_goni.h              | 1 -
 include/configs/sandbox.h               | 1 -
 include/configs/smdkc100.h              | 3 ---
 include/configs/snapper9260.h           | 1 -
 include/configs/sunxi-common.h          | 1 -
 include/configs/tegra-common.h          | 1 -
 include/configs/ti_am335x_common.h      | 1 -
 include/configs/ti_omap3_common.h       | 1 -
 include/configs/uniphier-common.h       | 2 --
 include/configs/x86-common.h            | 1 -
 18 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/Kconfig b/Kconfig
index d4ca152..9208d40 100644
--- a/Kconfig
+++ b/Kconfig
@@ -56,6 +56,15 @@ config CC_OPTIMIZE_FOR_SIZE
 
 	  This option is enabled by default for U-Boot.
 
+config SYS_MALLOC_F_LEN
+	hex "Size of malloc() pool before relocation"
+	default 0x400
+	help
+	  Before relocation memory is very limited on many platforms. Still,
+	  we can provide a small malloc() pool if needed. Driver model in
+	  particular needs this to operate, so that it can allocate the
+	  initial serial device and any others that are needed.
+
 endmenu		# General setup
 
 menuconfig EXPERT
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index 898e86d..9c98d19 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -17,6 +17,9 @@ config TEGRA124
 
 endchoice
 
+config SYS_MALLOC_F_LEN
+	default 0x1800
+
 config USE_PRIVATE_LIBGCC
 	default y if SPL_BUILD
 
diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig b/arch/arm/cpu/armv7/uniphier/Kconfig
index 36b7f11..d68a262 100644
--- a/arch/arm/cpu/armv7/uniphier/Kconfig
+++ b/arch/arm/cpu/armv7/uniphier/Kconfig
@@ -23,6 +23,9 @@ config MACH_PH1_SLD8
 
 endchoice
 
+config SYS_MALLOC_F_LEN
+	default 0x2000
+
 config CMD_PINMON
 	bool "Enable boot mode pins monitor command"
 	depends on !SPL_BUILD
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index b523f25..969634f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -43,6 +43,9 @@ config DM_GPIO
 config DM_SERIAL
 	default y
 
+config SYS_MALLOC_F_LEN
+	default 0x800
+
 config RAMBASE
 	hex
 	default 0x100000
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 0a4d93f..94ef7ab 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -21,10 +21,7 @@
 #define CONFIG_MACH_TYPE		4273
 
 #ifndef CONFIG_SPL_BUILD
-
 #define CONFIG_CMD_GPIO
-
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #endif
 
 /* Display information on boot */
diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h
index 2c4f35a..59676ae 100644
--- a/include/configs/exynos-common.h
+++ b/include/configs/exynos-common.h
@@ -36,7 +36,6 @@
 #define CONFIG_ENV_OVERWRITE
 
 /* Size of malloc() pool before and after relocation */
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 << 20))
 
 /* select serial console configuration */
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index 379a25d..d174f97 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -25,7 +25,6 @@
 #define CONFIG_INITRD_TAG
 #define CONFIG_REVISION_TAG
 
-#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #define CONFIG_IMX6_THERMAL
 
 #define CONFIG_SYS_GENERIC_BOARD
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index ea19ad8..7ad8d08 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -46,7 +46,6 @@
 					 CONFIG_SYS_SDRAM_SIZE - \
 					 GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_MALLOC_LEN		SZ_4M
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #define CONFIG_SYS_MEMTEST_START	0x00100000
 #define CONFIG_SYS_MEMTEST_END		0x00200000
 #define CONFIG_LOADADDR			0x00200000
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 26167a4..8fadc68 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -40,7 +40,6 @@
 #define CONFIG_CMDLINE_EDITING
 
 /* Size of malloc() pool before and after relocation */
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 << 20))
 
 /*
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 3f4d588..977b1ab 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -63,7 +63,6 @@
 /*
  * Size of malloc() pool, before and after relocation
  */
-#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #define CONFIG_MALLOC_F_ADDR		0x0010000
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)	/* 32MB  */
 
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index a7eb33e..080fc3a 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -48,9 +48,6 @@
  */
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (1 << 20))
 
-/* Small malloc pool before relocation */
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
-
 /*
  * select serial console configuration
  */
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 504e456..4836ca3 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -21,7 +21,6 @@
 #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000 /* External Crystal, in Hz */
 #define CONFIG_SYS_AT91_SLOW_CLOCK	32768
 #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
 
 /* CPU */
 #define CONFIG_ARCH_CPU_INIT
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 5e9223a..b92d853 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -29,7 +29,6 @@
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM)
 # define CONFIG_DW_SERIAL
-# define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
 
 /*
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 08f0b2a..945ccd1 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -37,7 +37,6 @@
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN		(4 << 20)	/* 4MB  */
-#define CONFIG_SYS_MALLOC_F_LEN	(4 << 10)
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_MALLOC_SIMPLE
 #endif
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index 4ce9d49..20a55f4 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -21,7 +21,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 # define CONFIG_OMAP_SERIAL
-# define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
 
 #include <asm/arch/omap.h>
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 77211de..840e108 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -20,7 +20,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 # define CONFIG_OMAP_SERIAL
-# define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
 #endif
 
 /* The chip has SDRC controller */
diff --git a/include/configs/uniphier-common.h b/include/configs/uniphier-common.h
index 2140fcc..76ab4f6 100644
--- a/include/configs/uniphier-common.h
+++ b/include/configs/uniphier-common.h
@@ -43,8 +43,6 @@ are defined. Select only one of them."
 #define CONFIG_SMC911X_BASE		CONFIG_SUPPORT_CARD_ETHER_BASE
 #define CONFIG_SMC911X_32_BIT
 
-#define CONFIG_SYS_MALLOC_F_LEN  0x2000
-
 /*-----------------------------------------------------------------------
  * MMU and Cache Setting
  *----------------------------------------------------------------------*/
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index 30f0d57..48cf2fc 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -187,7 +187,6 @@
 #define CONFIG_SYS_STACK_SIZE			(32 * 1024)
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MALLOC_LEN			0x200000
-#define CONFIG_SYS_MALLOC_F_LEN			(2 << 10)
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
-- 
2.2.0.rc0.207.ga3a616c

  reply	other threads:[~2014-12-09 13:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 13:21 [U-Boot] [PATCH 1/2] RFC: dm: Kconfig: Move all driver model CONFIGs to Kconfig Simon Glass
2014-12-09 13:21 ` Simon Glass [this message]
2014-12-11 17:53   ` [U-Boot] [PATCH 2/2] Kconfig: Move CONFIG_SYS_MALLOC_F_LEN " Masahiro YAMADA
2014-12-11 18:44     ` Simon Glass
2014-12-11 17:37 ` [U-Boot] [PATCH 1/2] RFC: dm: Kconfig: Move all driver model CONFIGs " Masahiro YAMADA
2015-01-01  0:39   ` Simon Glass
2015-01-27 23:40 ` Joe Hershberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418131289-829-2-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.