
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 + * at 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 */