Re: [U-Boot] [PATCH] 83xx: Fix NAND_SPL link address

2010-11-25 Thread Wolfgang Denk
Dear Scott Wood,

In message 20101124232840.ga17...@udp111988uds.am.freescale.net you wrote:
 Apply the same fix for 83xx as was done for 85xx in commit
 96196a1f7546904563994d2d041804a816d7c139.
 
 Without this, NAND SPLs are built with the text base intended for the main
 image, resulting in a broken, very large u-boot-nand.bin.
 
 The block of defines for NAND boot is moved closer to where
 CONFIG_SYS_TEXT_BASE is defined.  We can't directly use
 CONFIG_SYS_NAND_U_BOOT_DST in the definition of CONFIG_SYS_TEXT_BASE because
 autoconf.mk will include the literal text CONFIG_SYS_NAND_U_BOOT_DST,
 but at least keep them close and point out that they're supposed to be
 the same.
 
 Signed-off-by: Scott Wood scottw...@freescale.com
 ---
 Compile tested on MPC8315ERDB and SIMPC8313
 Boot tested on MPC8313ERDB
 
  boards.cfg|6 ++--
  include/configs/MPC8313ERDB.h |   27 +---
  include/configs/MPC8315ERDB.h |   23 +++-
  include/configs/SIMPC8313.h   |   23 -
  nand_spl/board/freescale/mpc8313erdb/Makefile |4 +-
  nand_spl/board/freescale/mpc8315erdb/Makefile |4 +-
  nand_spl/board/sheldon/simpc8313/Makefile |4 +-
  7 files changed, 58 insertions(+), 33 deletions(-)

Tested building and image sizes.

Tested-by: Wolfgang Denk w...@denx.de
Acked-by: Wolfgang Denk w...@denx.de


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
In accord with UNIX philosophy, Perl gives you enough  rope  to  hang
yourself.  - L. Wall  R. L. Schwartz, _Programming Perl_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] 83xx: Fix NAND_SPL link address

2010-11-24 Thread Scott Wood
Apply the same fix for 83xx as was done for 85xx in commit
96196a1f7546904563994d2d041804a816d7c139.

Without this, NAND SPLs are built with the text base intended for the main
image, resulting in a broken, very large u-boot-nand.bin.

The block of defines for NAND boot is moved closer to where
CONFIG_SYS_TEXT_BASE is defined.  We can't directly use
CONFIG_SYS_NAND_U_BOOT_DST in the definition of CONFIG_SYS_TEXT_BASE because
autoconf.mk will include the literal text CONFIG_SYS_NAND_U_BOOT_DST,
but at least keep them close and point out that they're supposed to be
the same.

Signed-off-by: Scott Wood scottw...@freescale.com
---
Compile tested on MPC8315ERDB and SIMPC8313
Boot tested on MPC8313ERDB

 boards.cfg|6 ++--
 include/configs/MPC8313ERDB.h |   27 +---
 include/configs/MPC8315ERDB.h |   23 +++-
 include/configs/SIMPC8313.h   |   23 -
 nand_spl/board/freescale/mpc8313erdb/Makefile |4 +-
 nand_spl/board/freescale/mpc8315erdb/Makefile |4 +-
 nand_spl/board/sheldon/simpc8313/Makefile |4 +-
 7 files changed, 58 insertions(+), 33 deletions(-)

diff --git a/boards.cfg b/boards.cfg
index 08e531e..8aee626 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -690,9 +690,9 @@ PQ2FADS-VR_lowboot  powerpc  mpc8260mpc8260ads  
freescale   -   MPC8260ADS:ADSTYPE=C
 PQ2FADS-ZU_66MHz  powerpc  mpc8260 mpc8260ads  freescale   -   
MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS,8260_CLKIN=6600
 PQ2FADS-ZU_66MHz_lowboot  powerpc  mpc8260  mpc8260ads freescale   -   
MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS,8260_CLKIN=6600,SYS_TEXT_BASE=0xFF80
 PQ2FADS-ZU_lowboot  powerpc  mpc8260   mpc8260ads  freescale   -   
MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS,SYS_TEXT_BASE=0xFF80
-MPC8313ERDB_NAND_33  powerpc  mpc83xx  mpc8313erdb freescale   -   
MPC8313ERDB:SYS_33MHZ,NAND_U_BOOT=y,SYS_TEXT_BASE=0x0010
-MPC8313ERDB_NAND_66  powerpc  mpc83xx  mpc8313erdb freescale   -   
MPC8313ERDB:SYS_66MHZ,NAND_U_BOOT=y,SYS_TEXT_BASE=0x0010
-MPC8315ERDB_NAND  powerpc  mpc83xx mpc8315erdb freescale   -   
MPC8315ERDB:NAND
+MPC8313ERDB_NAND_33  powerpc  mpc83xx  mpc8313erdb freescale   -   
MPC8313ERDB:SYS_33MHZ,NAND_U_BOOT
+MPC8313ERDB_NAND_66  powerpc  mpc83xx  mpc8313erdb freescale   -   
MPC8313ERDB:SYS_66MHZ,NAND_U_BOOT
+MPC8315ERDB_NAND  powerpc  mpc83xx mpc8315erdb freescale   -   
MPC8315ERDB:NAND_U_BOOT
 MPC832XEMDS_HOST_33  powerpc  mpc83xx  mpc832xemds freescale   -   
MPC832XEMDS:PCI,PCI_33M,PQ_MDS_PIB=1
 MPC832XEMDS_HOST_66  powerpc  mpc83xx  mpc832xemds freescale   -   
MPC832XEMDS:PCI,PCI_66M,PQ_MDS_PIB=1
 MPC8349ITX_LOWBOOT  powerpc  mpc83xx   mpc8349itx  freescale   -   
MPC8349ITX:MPC8349ITX,SYS_TEXT_BASE=0xFE00
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 1201133..92c54d0 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -35,10 +35,29 @@
 #define CONFIG_MPC8313 1
 #define CONFIG_MPC8313ERDB 1
 
+#define CONFIG_SYS_NAND_U_BOOT_SIZE  (512  10)
+#define CONFIG_SYS_NAND_U_BOOT_DST   0x0010
+#define CONFIG_SYS_NAND_U_BOOT_START 0x00100100
+#define CONFIG_SYS_NAND_U_BOOT_OFFS  16384
+#define CONFIG_SYS_NAND_U_BOOT_RELOC 0x0001
+#define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_RELOC + 
0x1)
+
+#ifdef CONFIG_NAND_U_BOOT
+#define CONFIG_SYS_TEXT_BASE   0x0010 /* CONFIG_SYS_NAND_U_BOOT_DST */
+#define CONFIG_SYS_TEXT_BASE_SPL 0xfff0
+#ifdef CONFIG_NAND_SPL
+#define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE_SPL /* start of 
monitor */
+#endif /* CONFIG_NAND_SPL */
+#endif /* CONFIG_NAND_U_BOOT */
+
 #ifndef CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_TEXT_BASE   0xFE00
 #endif
 
+#ifndef CONFIG_SYS_MONITOR_BASE
+#define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE/* start of 
monitor */
+#endif
+
 #define CONFIG_PCI
 #define CONFIG_FSL_ELBC 1
 
@@ -200,8 +219,6 @@
 #define CONFIG_SYS_FLASH_ERASE_TOUT6   /* Flash Erase Timeout (ms) */
 #define CONFIG_SYS_FLASH_WRITE_TOUT500 /* Flash Write Timeout (ms) */
 
-#define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE/* start of 
monitor */
-
 #if (CONFIG_SYS_MONITOR_BASE  CONFIG_SYS_FLASH_BASE)  
!defined(CONFIG_NAND_SPL)
 #define CONFIG_SYS_RAMBOOT
 #endif
@@ -248,12 +265,6 @@
 #define CONFIG_NAND_FSL_ELBC 1
 #define CONFIG_SYS_NAND_BLOCK_SIZE 16384
 
-#define CONFIG_SYS_NAND_U_BOOT_SIZE  (512  10)
-#define CONFIG_SYS_NAND_U_BOOT_DST   0x0010
-#define CONFIG_SYS_NAND_U_BOOT_START 0x00100100
-#define CONFIG_SYS_NAND_U_BOOT_OFFS  16384
-#define CONFIG_SYS_NAND_U_BOOT_RELOC 0x0001
-#define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_RELOC + 
0x1)
 
 #define CONFIG_SYS_NAND_BR_PRELIM