Patchwork [U-Boot] powerpc/corenet: fix compile error when CONFIG_SYS_NO_FLASH is defined

login
register
mail settings
Submitter shaohui xie
Date June 29, 2012, 9:35 a.m.
Message ID <1340962534-6860-1-git-send-email-Shaohui.Xie@freescale.com>
Download mbox | patch
Permalink /patch/168026/
State Accepted
Commit 0f57f6a3fe26a9c2d69b34e9caf8f83082d77636
Delegated to: Andy Fleming
Headers show

Comments

shaohui xie - June 29, 2012, 9:35 a.m.
ENV location compile logic is wrong, and when CONFIG_SYS_NO_FLASH is defined
and non-NOR u-boot is building, it will cause compile error. Also, add
CONFIG_SYS_FLASH_USE_BUFFER_WRITE for p2041, which will improve NOR flash
write performance.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
---
 include/configs/P2041RDB.h   |    5 +++++
 include/configs/corenet_ds.h |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
Andy Fleming - Aug. 9, 2012, 12:30 a.m.
Please copy me on 85xx patches (That includes corenet)

On Fri, Jun 29, 2012 at 4:35 AM, Shaohui Xie <Shaohui.Xie@freescale.com> wrote:
> ENV location compile logic is wrong, and when CONFIG_SYS_NO_FLASH is defined
> and non-NOR u-boot is building, it will cause compile error. Also, add
> CONFIG_SYS_FLASH_USE_BUFFER_WRITE for p2041, which will improve NOR flash
> write performance.
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>

Applied, thanks

Patch

diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 23a32bc..c8a8d67 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -73,10 +73,13 @@ 
 #define CONFIG_ENV_OVERWRITE
 
 #ifdef CONFIG_SYS_NO_FLASH
+#ifndef CONFIG_RAMBOOT_PBL
 #define CONFIG_ENV_IS_NOWHERE
+#endif
 #else
 #define CONFIG_FLASH_CFI_DRIVER
 #define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
 #endif
 
 #if defined(CONFIG_SPIFLASH)
@@ -101,6 +104,8 @@ 
 #define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_SIZE			CONFIG_SYS_NAND_BLOCK_SIZE
 #define CONFIG_ENV_OFFSET		(5 * CONFIG_SYS_NAND_BLOCK_SIZE)
+#elif defined(CONFIG_ENV_IS_NOWHERE)
+	#define CONFIG_ENV_SIZE		0x2000
 #else
 	#define CONFIG_ENV_IS_IN_FLASH
 	#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE \
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index a3705cb..669778c 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -77,7 +77,7 @@ 
 #define CONFIG_ENV_OVERWRITE
 
 #ifdef CONFIG_SYS_NO_FLASH
-#ifndef CONFIG_SRIOBOOT_SLAVE
+#if !defined(CONFIG_SRIOBOOT_SLAVE) && !defined(CONFIG_RAMBOOT_PBL)
 #define CONFIG_ENV_IS_NOWHERE
 #endif
 #else