[U-Boot-Users] [PATCH 2/4] TQM885D: adjust for doubled flash sector size + some minor fixes

Martin Krause martin.krause at tqs.de
Tue Jul 24 10:58:39 CEST 2007


Signed-off-by: Martin Krause <martin.krause at tqs.de>
---

 board/tqm8xx/tqm8xx.c     |    4 ++--
 include/common.h          |    9 +++++----
 include/commproc.h        |    4 ----
 include/configs/TQM885D.h |   20 +++++++++++++-------
 4 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/board/tqm8xx/tqm8xx.c b/board/tqm8xx/tqm8xx.c
index 6b206f8..ed1d692 100644
--- a/board/tqm8xx/tqm8xx.c
+++ b/board/tqm8xx/tqm8xx.c
@@ -183,7 +183,7 @@ long int initdram (int board_type)
 #ifndef	CONFIG_CAN_DRIVER
 	if ((board_type != 'L') &&
 	    (board_type != 'M') &&
-	    (board_type != 'D') ) {	/* "L" and "M" type boards have only one bank SDRAM */
+	    (board_type != 'D') ) {	/* only one SDRAM bank on L, M and D modules */
 		memctl->memc_or3 = CFG_OR3_PRELIM;
 		memctl->memc_br3 = CFG_BR3_PRELIM;
 	}
@@ -259,7 +259,7 @@ long int initdram (int board_type)
 #ifndef	CONFIG_CAN_DRIVER
 	if ((board_type != 'L') &&
 	    (board_type != 'M') &&
-	    (board_type != 'D') ) {	/* "L" and "M" type boards have only one bank SDRAM */
+	    (board_type != 'D') ) {	/* only one SDRAM bank on L, M and D modules */
 		/*
 		 * Check Bank 1 Memory Size
 		 * use current column settings
diff --git a/include/common.h b/include/common.h
index 23f9390..a17f1ac 100644
--- a/include/common.h
+++ b/include/common.h
@@ -126,20 +126,21 @@ typedef void (interrupt_handler_t)(void *);
 
 /*
  * enable common handling for all TQM8xxL/M boards:
- * - CONFIG_TQM8xxM will be defined for all TQM8xxM and TQM885D boards
+ * - CONFIG_TQM8xxM will be defined for all TQM8xxM
  * - CONFIG_TQM8xxL will be defined for all TQM8xxL _and_ TQM8xxM boards
+ *                  and for the TQM885D board
  */
 #if defined(CONFIG_TQM823M) || defined(CONFIG_TQM850M) || \
     defined(CONFIG_TQM855M) || defined(CONFIG_TQM860M) || \
-    defined(CONFIG_TQM862M) || defined(CONFIG_TQM866M) || \
-    defined(CONFIG_TQM885D)
+    defined(CONFIG_TQM862M) || defined(CONFIG_TQM866M)
 # ifndef CONFIG_TQM8xxM
 #  define CONFIG_TQM8xxM
 # endif
 #endif
 #if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L) || \
     defined(CONFIG_TQM855L) || defined(CONFIG_TQM860L) || \
-    defined(CONFIG_TQM862L) || defined(CONFIG_TQM8xxM)
+    defined(CONFIG_TQM862L) || defined(CONFIG_TQM8xxM) || \
+    defined(CONFIG_TQM885D)
 # ifndef CONFIG_TQM8xxL
 #  define CONFIG_TQM8xxL
 # endif
diff --git a/include/commproc.h b/include/commproc.h
index 12400e3..8cb2986 100644
--- a/include/commproc.h
+++ b/include/commproc.h
@@ -1440,10 +1440,6 @@ typedef struct scc_enet {
 #define SICR_ENET_MASK	((uint)0x0000ff00)
 #define SICR_ENET_CLKRT	((uint)0x00002600)
 
-# ifdef CONFIG_FEC_ENET		/* Use FEC for Fast Ethernet */
-#define FEC_ENET
-# endif	/* CONFIG_FEC_ENET */
-
 #endif	/* CONFIG_MVS v1, CONFIG_TQM823L/M, CONFIG_TQM850L/M, etc. */
 
 /***  TQM855L/M, TQM860L/M, TQM862L/M, TQM866L/M  *********************/
diff --git a/include/configs/TQM885D.h b/include/configs/TQM885D.h
index 8bbac4c..17b2070 100644
--- a/include/configs/TQM885D.h
+++ b/include/configs/TQM885D.h
@@ -84,8 +84,13 @@
 	"net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0"	\
 	"rootpath=/opt/eldk/ppc_8xx\0"					\
 	"bootfile=/tftpboot/TQM866M/uImage\0"				\
-	"kernel_addr=40080000\0"					\
-	"ramdisk_addr=40180000\0"					\
+	"kernel_addr=400C0000\0"					\
+	"ramdisk_addr=401C0000\0"					\
+	"load=tftp 200000 ${u-boot}\0"					\
+	"update=protect off 40000000 4003FFFF;"				\
+		"erase 40000000 4003FFFF;"				\
+		"cp.b 200000 40000000 ${filesize};"			\
+		"protect on 40000000 4003FFFF\0"			\
 	""
 #define CONFIG_BOOTCOMMAND	"run flash_self"
 
@@ -218,9 +223,9 @@
  */
 #define CFG_SDRAM_BASE		0x00000000
 #define CFG_FLASH_BASE		0x40000000
-#define CFG_MONITOR_LEN		(256 << 10)	/* Reserve 256 kB for Monitor	*/
+#define CFG_MONITOR_LEN		(256 << 10)	/* Reserve 256 kB for Monitor */
 #define CFG_MONITOR_BASE	CFG_FLASH_BASE
-#define CFG_MALLOC_LEN		(128 << 10)	/* Reserve 128 kB for malloc()	*/
+#define CFG_MALLOC_LEN		(256 << 10)	/* Reserve 128 kB for malloc() */
 
 /*
  * For booting Linux, the board info and command line data
@@ -239,9 +244,9 @@
 #define CFG_FLASH_WRITE_TOUT	500	/* Timeout for Flash Write (in ms)	*/
 
 #define CFG_ENV_IS_IN_FLASH	1
-#define CFG_ENV_OFFSET		0x40000 /*   Offset   of Environment Sector	*/
-#define CFG_ENV_SIZE		0x08000 /* Total Size of Environment Sector	*/
-#define CFG_ENV_SECT_SIZE	0x20000 /* Total Size of Environment Sector	*/
+#define CFG_ENV_OFFSET		0x40000 /* Offset of Environment Sector */
+#define CFG_ENV_SIZE		0x08000 /* Total Size of Environment */
+#define CFG_ENV_SECT_SIZE	0x40000 /* Total Size of Environment Sector */
 
 /* Address and size of Redundant Environment Sector	*/
 #define CFG_ENV_OFFSET_REDUND	(CFG_ENV_OFFSET+CFG_ENV_SECT_SIZE)
@@ -475,6 +480,7 @@
  */
 #define CONFIG_SCC2_ENET		/* enable ethernet on SCC2 */
 #define CONFIG_FEC_ENET			/* enable ethernet on FEC */
+#define FEC_ENET			/* enable the FEC driver */
 #define CONFIG_ETHER_ON_FEC1		/* ... for FEC1 */
 #define CONFIG_ETHER_ON_FEC2		/* ... for FEC2 */
 




More information about the U-Boot mailing list