From patchwork Thu Mar 22 19:09:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 148315 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 45EAFB6EF3 for ; Fri, 23 Mar 2012 06:11:03 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 39F0B280C4; Thu, 22 Mar 2012 20:10:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rmLCQLQi9qXw; Thu, 22 Mar 2012 20:10:35 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F9B9280BC; Thu, 22 Mar 2012 20:09:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 19B6F28088 for ; Thu, 22 Mar 2012 20:09:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b3NpyHYaDo8e for ; Thu, 22 Mar 2012 20:09:46 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by theia.denx.de (Postfix) with ESMTPS id 11CE128087 for ; Thu, 22 Mar 2012 20:09:33 +0100 (CET) Received: by mail-ob0-f172.google.com with SMTP id tb4so1697143obb.3 for ; Thu, 22 Mar 2012 12:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=rNY2INf9XCxAxcCcfw8YsMaUACPIqFpGgxQfmgKem80=; b=h26KEr2EHBnaG4EkBi6XNY3bnhZFuvdZLuBBWANOq2+6A/6scsOW4FiMzm6wwtDmk1 nymGoWaT2V1OAi6IsL1euu0NA/5yhS3iQ4aqSQi5nks59xAiZKVl342LqtCLhKpO/p3F DrCUj0QHJrVL7Wds50YCu49d2RNxdXcF8utCj6nYAE3i9QldBLeI46OnlInwM15bK0EU zbksvPUzzGKWWx5avTNJ4UFo98gVRISYCKug8ANiuOMMP+iwu8RksFOmPaJug3FOZZNh i6ApkMJL4rlGgDESifmDs4/E20ZWacVptFJJINVcx9DuvI00WCFwE2Z0KmYXe0EajvQT oXmA== Received: by 10.182.31.47 with SMTP id x15mr11143824obh.76.1332443373695; Thu, 22 Mar 2012 12:09:33 -0700 (PDT) Received: from localhost.localdomain (ip68-230-54-74.ph.ph.cox.net. [68.230.54.74]) by mx.google.com with ESMTPS id a8sm4325352oea.8.2012.03.22.12.09.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Mar 2012 12:09:32 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 22 Mar 2012 12:09:13 -0700 Message-Id: <1332443357-14062-8-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1332443357-14062-1-git-send-email-trini@ti.com> References: <1332443357-14062-1-git-send-email-trini@ti.com> Subject: [U-Boot] [RFC v0 07/11] omap3: Move SYS_MALLOC_LEN and ENV_SIZE to omap3_common.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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 */