From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC v0 07/11] omap3: Move SYS_MALLOC_LEN and ENV_SIZE to omap3_common.h
Date: Thu, 22 Mar 2012 12:09:13 -0700 [thread overview]
Message-ID: <1332443357-14062-8-git-send-email-trini@ti.com> (raw)
In-Reply-To: <1332443357-14062-1-git-send-email-trini@ti.com>
We provide a default CONFIG_SYS_MALLOC_LEN of 1mb (noting that saveenv
and UBI are both large users by default) and a default of 128KB for
environment. Both of these can be overriden by the board if needed.
Signed-off-by: Tom Rini <trini@ti.com>
---
include/configs/am3517_crane.h | 6 ------
include/configs/am3517_evm.h | 5 -----
include/configs/cm_t35.h | 7 -------
include/configs/devkit8000.h | 5 -----
include/configs/dig297.h | 7 -------
include/configs/igep00x0.h | 5 -----
include/configs/mcx.h | 5 -----
include/configs/omap3_beagle.h | 7 -------
include/configs/omap3_common.h | 14 ++++++++++++++
include/configs/omap3_evm_common.h | 6 ------
include/configs/omap3_logic.h | 7 -------
include/configs/omap3_mvblx.h | 8 ++------
include/configs/omap3_overo.h | 7 -------
include/configs/omap3_pandora.h | 6 ------
include/configs/omap3_sdp3430.h | 9 +--------
include/configs/omap3_zoom1.h | 7 -------
include/configs/omap3_zoom2.h | 6 ------
include/configs/tam3517-common.h | 6 ------
include/configs/tricorder.h | 5 -----
19 files changed, 17 insertions(+), 111 deletions(-)
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index d0b5cc0..ab776a7 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -43,12 +43,6 @@
#define CONFIG_OMAP3_AM3517CRANE /* working with CRANEBOARD */
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
- /* initial data */
-/*
* DDR related
*/
#define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024)
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index da6a000..7b8ba00 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -43,11 +43,6 @@
#define CONFIG_OMAP3_AM3517EVM /* working with AM3517EVM */
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-/*
* DDR related
*/
#define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024)
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 9330442..0ead8b7 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -61,13 +61,6 @@
#define CONFIG_SYS_BOOTMAPSZ 0x4000
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
-/*
* Hardware drivers
*/
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index b792b40..13136ea 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -56,11 +56,6 @@
*/
#define CONFIG_SYS_TEXT_BASE 0x80100000
-/* Size of malloc() pool */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
/* Hardware drivers */
/* DM9000 */
#define CONFIG_NET_RETRY_COUNT 20
diff --git a/include/configs/dig297.h b/include/configs/dig297.h
index 41b3e7c..1923809 100644
--- a/include/configs/dig297.h
+++ b/include/configs/dig297.h
@@ -59,13 +59,6 @@
#define CONFIG_SYS_TEXT_BASE 0x80008000
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (1024 << 10) /* UBI needs >= 512 kB */
-
-/*
* Hardware drivers
*/
diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h
index 770a471..00c38b4 100644
--- a/include/configs/igep00x0.h
+++ b/include/configs/igep00x0.h
@@ -236,11 +236,6 @@
#define CONFIG_ENV_ADDR ONENAND_ENV_OFFSET
/*
- * Size of malloc() pool
- */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
-/*
* SMSC911x Ethernet
*/
#if defined(CONFIG_CMD_NET)
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 6c306bc..83783c9 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -51,11 +51,6 @@
#define CONFIG_SYS_TEXT_BASE 0x80008000
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */
-#define CONFIG_SYS_MALLOC_LEN (1024 << 10)
-/*
* DDR related
*/
#define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 06f1a66..86dabb7 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -46,13 +46,6 @@
#define CONFIG_OMAP3_BEAGLE /* working with BEAGLE */
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
-/*
* Hardware drivers
*/
diff --git a/include/configs/omap3_common.h b/include/configs/omap3_common.h
index cc0f5fb..1190ce8 100644
--- a/include/configs/omap3_common.h
+++ b/include/configs/omap3_common.h
@@ -62,4 +62,18 @@
#define CONFIG_INITRD_TAG
#define CONFIG_REVISION_TAG
+/*
+ * A minimum size of malloc() pool. There are two common large users here.
+ * One of which is 'saveenv' which requires a pool of the size of the
+ * environment (CONFIG_ENV_SIZE). A second user is UBI which requires
+ *@least 512KiB. We default to 1MB worth of pool. These can be
+ * overridden by the board if needed.
+ */
+#ifndef CONFIG_ENV_SIZE
+#define CONFIG_ENV_SIZE (128 << 10)
+#endif
+#ifndef CONFIG_SYS_MALLOC_LEN
+#define CONFIG_SYS_MALLOC_LEN (1024 << 10)
+#endif
+
#endif /* __CONFIG_OMAP3_COMMON_H */
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index af1e5dc..d7fdd44 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -44,12 +44,6 @@
#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
#define CONFIG_SYS_HZ 1000
-/* Size of environment - 128KB */
-#define CONFIG_ENV_SIZE (128 << 10)
-
-/* Size of malloc pool */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
/*
* Stack sizes
* These values are used in start.S
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 0e698c3..77681e9 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -50,13 +50,6 @@
#define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
-/*
* Hardware drivers
*/
diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h
index 2ff57cd..56ed3a1 100644
--- a/include/configs/omap3_mvblx.h
+++ b/include/configs/omap3_mvblx.h
@@ -50,12 +50,8 @@
#define CONFIG_MVBLX /* working with mvBlueLYNX-X */
#define CONFIG_MACH_TYPE MACH_TYPE_MVBLX
-/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (2 << 10) /* 2 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
+/* We have a 2KiB sector size */
+#define CONFIG_ENV_SIZE (2 << 10)
/*
* Hardware drivers
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index a19e22d..fdb3bba 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -37,13 +37,6 @@
#define CONFIG_OMAP3_OVERO /* working with overo */
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
-/*
* Hardware drivers
*/
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 0ee91bb..d9f4f27 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -41,12 +41,6 @@
#define CONFIG_OMAP3_PANDORA /* working with pandora */
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
-#define CONFIG_SYS_MALLOC_LEN (1024 * 1024 + CONFIG_ENV_SIZE)
-
-/*
* Hardware drivers
*/
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index b70e9b9..4656690 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -56,15 +56,8 @@
*/
#define CONFIG_OMAP3_3430SDP /* working with SDP Rev2 */
-/*
- * Size of malloc() pool
- * Total Size Environment - 256k
- * Malloc - add 256k
- */
+/* We have 256KiB for environment. */
#define CONFIG_ENV_SIZE (256 << 10)
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (256 << 10))
-
-/*--------------------------------------------------------------------------*/
/*
* Hardware drivers
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index 56585fb..90f37af 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -47,13 +47,6 @@
#define CONFIG_OMAP3_ZOOM1 /* working with Zoom MDK Rev1 */
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
-/*
* Hardware drivers
*/
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index e199b7a..c563c5b 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -48,12 +48,6 @@
#define CONFIG_OMAP3_ZOOM2 /* working with Zoom II */
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-/*
* Hardware drivers
*/
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index fb0833c..f2edbf1 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -43,12 +43,6 @@
#define CONFIG_SYS_CACHELINE_SIZE 64
/*
- * Size of malloc() pool
- */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10) + \
- 2 * 1024 * 1024)
-/*
* DDR related
*/
#define CONFIG_OMAP3_MICRON_DDR /* Micron DDR */
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 5d7d189..1bd8b5c 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -57,11 +57,6 @@
*/
#define CONFIG_SYS_TEXT_BASE 0x80100000
-/* Size of malloc() pool */
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (512 << 10))
-
/* Hardware drivers */
/* NS16550 Configuration */
--
1.7.0.4
next prev parent reply other threads:[~2012-03-22 19:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 19:09 [U-Boot] [RFC v0 0/11]: Add <configs/omap3_common.h> Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 01/11] omap3+: Introduce <configs/omap3_common.h> Tom Rini
2012-03-23 1:48 ` Jason Kridner
2012-03-23 15:26 ` Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 02/11] omap3: Move DISPLAY_CPUINFO / DISPLAY_BOARDINFO to common Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 03/11] omap3: Move V_OSCK / V_SCLK to omap3_common.h Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 04/11] omap3: Move '#undef CONFIG_USE_IRQ' " Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 05/11] omap3: Move CONFIG_MISC_INIT_R " Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 06/11] omap3: Move ATAGS and OF_LIBFDT " Tom Rini
2012-03-22 19:09 ` Tom Rini [this message]
2012-03-22 19:09 ` [U-Boot] [RFC v0 08/11] omap3: Consolidate UART information in omap3_common.h Tom Rini
2012-04-03 21:35 ` Mike Frysinger
2012-04-03 23:45 ` Tom Rini
2012-04-04 2:42 ` Mike Frysinger
2012-04-04 18:19 ` Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 09/11] omap3: Consolidate HSMMC support into omap3_common.h Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 10/11] omap3: Consolidate NAND information in omap3_common.h Tom Rini
2012-03-22 19:09 ` [U-Boot] [RFC v0 11/11] omap3: Consolidate I2C information into omap3_common.h Tom Rini
2012-04-03 21:37 ` [U-Boot] [RFC v0 0/11]: Add <configs/omap3_common.h> Mike Frysinger
2012-04-03 23:35 ` Tom Rini
2012-04-04 2:46 ` Mike Frysinger
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=1332443357-14062-8-git-send-email-trini@ti.com \
--to=trini@ti.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox