public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/6] shannon/INFERNO: fix special handling of environment configuration
Date: Thu, 24 Jun 2010 00:06:09 +0200	[thread overview]
Message-ID: <1277330773-28395-3-git-send-email-wd@denx.de> (raw)
In-Reply-To: <1277330773-28395-1-git-send-email-wd@denx.de>

Remove some INFERNO related #ifdef's from common environment code by
fixing the board configuration settings (add CONFIG_ENV_SECT_SIZE).

While we are at it, fix comment which incorrectly talks about 4 KB
environment size, while it's actually 0x4000 = 16 KiB.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Rolf Offermanns <rof@sysgo.de>
---
 common/env_flash.c        |   12 ------------
 common/env_nand.c         |    4 ----
 include/configs/shannon.h |    7 ++++---
 3 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/common/env_flash.c b/common/env_flash.c
index b860c48..ef0582d 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -44,12 +44,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #error CONFIG_ENV_SIZE_REDUND should not be less then CONFIG_ENV_SIZE
 #endif
 
-#ifdef CONFIG_INFERNO
-# ifdef CONFIG_ENV_ADDR_REDUND
-#error CONFIG_ENV_ADDR_REDUND is not implemented for CONFIG_INFERNO
-# endif
-#endif
-
 char * env_name_spec = "Flash";
 
 #ifdef ENV_IS_EMBEDDED
@@ -294,13 +288,7 @@ int saveenv(void)
 	len	 = CONFIG_ENV_SIZE;
 #endif	/* CONFIG_ENV_SECT_SIZE */
 
-#ifndef CONFIG_INFERNO
 	end_addr = flash_sect_addr + len - 1;
-#else
-	/* this is the last sector, and the size is hardcoded here */
-	/* otherwise we will get stack problems on loading 128 KB environment */
-	end_addr = flash_sect_addr + 0x20000 - 1;
-#endif
 
 	debug ("Protect off %08lX ... %08lX\n",
 		(ulong)flash_sect_addr, end_addr);
diff --git a/common/env_nand.c b/common/env_nand.c
index a15a950..50bc111 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -49,10 +49,6 @@
 #error CONFIG_ENV_SIZE_REDUND should be the same as CONFIG_ENV_SIZE
 #endif
 
-#ifdef CONFIG_INFERNO
-#error CONFIG_INFERNO not supported yet
-#endif
-
 #ifndef CONFIG_ENV_RANGE
 #define CONFIG_ENV_RANGE	CONFIG_ENV_SIZE
 #endif
diff --git a/include/configs/shannon.h b/include/configs/shannon.h
index 13cc5ff..d848915 100644
--- a/include/configs/shannon.h
+++ b/include/configs/shannon.h
@@ -161,12 +161,13 @@
 
 #define	CONFIG_ENV_IS_IN_FLASH	1
 #ifdef CONFIG_INFERNO
-/* we take the last sector, 128 KB in size, but we only use 4 KB of it for stack reasons */
+/* we take the last sector, 128 KB in size, but we only use 16 KB of it for stack reasons */
 #define CONFIG_ENV_ADDR		(PHYS_FLASH_1 + 0x003E0000)	/* Addr of Environment Sector	*/
-#define CONFIG_ENV_SIZE		0x4000	/* Total Size of Environment Sector	*/
+#define CONFIG_ENV_SIZE		0x4000	/* Total Size of Environment 	*/
+#define CONFIG_ENV_SECT_SIZE	(128 << 10)	/* size of environment sector */
 #else
 #define CONFIG_ENV_ADDR		(PHYS_FLASH_1 + 0x1C000)	/* Addr of Environment Sector	*/
-#define CONFIG_ENV_SIZE		0x4000	/* Total Size of Environment Sector	*/
+#define CONFIG_ENV_SIZE		0x4000	/* Total Size of Environment 	*/
 #endif
 
 /*-----------------------------------------------------------------------
-- 
1.7.0.1

  parent reply	other threads:[~2010-06-23 22:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 22:06 [U-Boot] [PATCH 0/6] misc fixes / cleanups Wolfgang Denk
2010-06-23 22:06 ` [U-Boot] [PATCH 1/6] boards.cfg: fix board directory name for ML2 board Wolfgang Denk
2010-06-23 22:06 ` Wolfgang Denk [this message]
2010-07-04 21:49   ` [U-Boot] [PATCH 2/6] shannon/INFERNO: fix special handling of environment configuration Wolfgang Denk
2010-06-23 22:06 ` [U-Boot] [PATCH 3/6] cmd_ide.c: fix unused variable warning for SC3 board Wolfgang Denk
2010-07-04 21:49   ` Wolfgang Denk
2010-06-23 22:06 ` [U-Boot] [PATCH 4/6] exports.c: fix warning: 'dummy' defined but not used Wolfgang Denk
2010-06-23 23:32   ` Mike Frysinger
2010-06-29  9:52   ` [U-Boot] [PATCH 4/6 v2] " Wolfgang Denk
2010-06-29 20:00     ` Mike Frysinger
2010-06-29 21:07       ` Wolfgang Denk
2010-06-30 22:44   ` [U-Boot] [PATCH 4/6 v3] " Wolfgang Denk
2010-06-30 23:04     ` Mike Frysinger
2010-07-01  7:30       ` Wolfgang Denk
2010-07-01  7:31   ` [U-Boot] [PATCH 4/6 v4] " Wolfgang Denk
2010-07-04 21:51     ` Wolfgang Denk
2010-06-23 22:06 ` [U-Boot] [PATCH 5/6] Make *printf() return "int" instead of "void" Wolfgang Denk
2010-07-04 21:52   ` Wolfgang Denk
2010-06-23 22:06 ` [U-Boot] [PATCH 6/6] Redundant environment: move flag definitions to header file Wolfgang Denk
2010-07-04 21:52   ` Wolfgang Denk

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=1277330773-28395-3-git-send-email-wd@denx.de \
    --to=wd@denx.de \
    --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