Merge with /home/sr/git/u-boot/4xx-enet
diff --git a/CHANGELOG b/CHANGELOG
index e2be1cb..441fe16 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,37 @@
+commit 78d620ebb5871d252270dedfad60c6568993b780
+Author: Wolfgang Denk <wd@atlas.denx.de>
+Date:	Thu Nov 23 22:58:58 2006 +0100
+
+    Updates for TQM5200 modules:
+    - fix off-by-one error in board/tqm5200/cam5200_flash.c error message
+    - simplify "udate" definitions
+
+commit 2053283304eeddf250d109e6791eb6fa4cad14f7
+Author: Stefan Roese <sr@denx.de>
+Date:	Wed Nov 22 13:20:50 2006 +0100
+
+    [PATCH] PPC4xx start.S: Fix for processor errata
+
+    Fixed cpu/ppc4xx/start.S for 440EPx Errata: further corrects PPC440EPx
+    errata 1.12: 440_33 by moving patch up in code.
+
+    Signed-off-by: Jeff Mann <mannj@embeddedplanet.com>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 4ef6251403f637841000e0fef9e832aa01339822
+Author: Stefan Roese <sr@denx.de>
+Date:	Mon Nov 20 20:39:52 2006 +0100
+
+    [PATCH] Update AMCC Sequoia config file to support 64MByte NOR FLASH
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit e4bbd8da164b976d38616bd9c69c5e86e193cdf0
+Author: Wolfgang Denk <wd@pollux.denx.de>
+Date:	Mon Nov 20 10:28:30 2006 +0100
+
+    Update CHANGELOG
+
 commit 260421a21e934a68d31fb6125b0fbd2631a8ca20
 Author: Stefan Roese <sr@denx.de>
 Date:	Mon Nov 13 13:55:24 2006 +0100
diff --git a/README b/README
index b78ea61..f78bf50 100644
--- a/README
+++ b/README
@@ -1470,8 +1470,8 @@
 
 		Enable auto completion of commands using TAB.
 
-                Note that this feature has NOT been implemented yet
-                for the "hush" shell.
+		Note that this feature has NOT been implemented yet
+		for the "hush" shell.
 
 
 		CFG_HUSH_PARSER
@@ -3114,11 +3114,11 @@
 oftaddr=0x300000
 => bootm $loadaddr - $oftaddr
 ## Booting image at 00200000 ...
-   Image Name:   Linux-2.6.17-dirty
-   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
-   Data Size:    1029343 Bytes = 1005.2 kB
+   Image Name:	 Linux-2.6.17-dirty
+   Image Type:	 PowerPC Linux Kernel Image (gzip compressed)
+   Data Size:	 1029343 Bytes = 1005.2 kB
    Load Address: 00000000
-   Entry Point:  00000000
+   Entry Point:	 00000000
    Verifying Checksum ... OK
    Uncompressing Kernel Image ... OK
 Booting using flat device tree at 0x300000
diff --git a/board/mcc200/mcc200.c b/board/mcc200/mcc200.c
index 8b475c6..5d74bde 100644
--- a/board/mcc200/mcc200.c
+++ b/board/mcc200/mcc200.c
@@ -205,8 +205,7 @@
 	 */
 	svr = get_svr();
 	pvr = get_pvr();
-	if ((SVR_MJREV(svr) >= 2) && (PVR_MAJ(pvr) == 1) && 
-	    (PVR_MIN(pvr) == 4)) {
+	if ((SVR_MJREV(svr) >= 2) && (PVR_MAJ(pvr) == 1) && (PVR_MIN(pvr) == 4)) {
 		*(vu_long *)MPC5XXX_SDRAM_SDELAY = 0x04;
 		__asm__ volatile ("sync");
 	}
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 3091a58..7aae8a6 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -833,10 +833,6 @@
 			printf ("ERROR: flat device tree size does not agree with image\n");
 			return;
 		}
-
-	} else if (getenv("disable_of") == NULL) {
-		printf ("ERROR: bootm needs flat device tree as third argument\n");
-		return;
 	}
 #endif
 	if (!data) {
@@ -913,23 +909,11 @@
 
 	SHOW_BOOT_PROGRESS (15);
 
-#ifndef CONFIG_OF_FLAT_TREE
-
 #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
 	unlock_ram_in_cache();
 #endif
 
-	/*
-	 * Linux Kernel Parameters:
-	 *   r3: ptr to board info data
-	 *   r4: initrd_start or 0 if no initrd
-	 *   r5: initrd_end - unused if r4 is 0
-	 *   r6: Start of command line string
-	 *   r7: End   of command line string
-	 */
-	(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
-
-#else	/* CONFIG_OF_FLAT_TREE */
+#ifdef CONFIG_OF_FLAT_TREE
 	/* move of_flat_tree if needed */
 	if (of_data) {
 		ulong of_start, of_len;
@@ -948,30 +932,36 @@
 			of_start, of_start + of_len - 1);
 		memmove ((void *)of_start, (void *)of_data, of_len);
 	}
-
-	ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
-	/* ft_dump_blob(of_flat_tree); */
+#endif
 
-#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
-	unlock_ram_in_cache();
+	/*
+	 * Linux Kernel Parameters (passing board info data):
+	 *   r3: ptr to board info data
+	 *   r4: initrd_start or 0 if no initrd
+	 *   r5: initrd_end - unused if r4 is 0
+	 *   r6: Start of command line string
+	 *   r7: End   of command line string
+	 */
+#ifdef CONFIG_OF_FLAT_TREE
+	if (!of_flat_tree)	/* no device tree; boot old style */
 #endif
+		(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
+		/* does not return */
+
+#ifdef CONFIG_OF_FLAT_TREE
 	/*
-	 * Linux Kernel Parameters:
+	 * Linux Kernel Parameters (passing device tree):
 	 *   r3: ptr to OF flat tree, followed by the board info data
 	 *   r4: physical pointer to the kernel itself
 	 *   r5: NULL
 	 *   r6: NULL
 	 *   r7: NULL
 	 */
-	if (getenv("disable_of") != NULL)
-		(*kernel) ((bd_t *)of_flat_tree, initrd_start, initrd_end,
-			cmd_start, cmd_end);
-	else {
-		ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
-		/* ft_dump_blob(of_flat_tree); */
-		(*kernel) ((bd_t *)of_flat_tree, (ulong)kernel, 0, 0, 0);
-	}
-#endif	/* CONFIG_OF_FLAT_TREE */
+	ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
+	/* ft_dump_blob(of_flat_tree); */
+
+	(*kernel) ((bd_t *)of_flat_tree, (ulong)kernel, 0, 0, 0);
+#endif
 }
 #endif /* CONFIG_PPC */
 
diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c
index b7a5d32..8237f4a 100644
--- a/drivers/nand/nand_base.c
+++ b/drivers/nand/nand_base.c
@@ -838,9 +838,9 @@
 	unsigned long	timeo;
 
 	if (state == FL_ERASING)
-		timeo = CFG_HZ * 400;
+		timeo += (HZ * 400) / 1000;
 	else
-		timeo = CFG_HZ * 20;
+		timeo += (HZ * 20) / 1000;
 
 	if ((state == FL_ERASING) && (this->options & NAND_IS_AND))
 		this->cmdfunc(mtd, NAND_CMD_STATUS_MULTI, -1, -1);
@@ -852,8 +852,8 @@
 	while (1) {
 		if (get_timer(0) > timeo) {
 			printf("Timeout!");
-			return 0;
-			}
+			return 0x01;
+		}
 
 		if (this->dev_ready) {
 			if (this->dev_ready(mtd))
diff --git a/include/configs/sequoia.h b/include/configs/sequoia.h
index 1a460cd..00b9222 100644
--- a/include/configs/sequoia.h
+++ b/include/configs/sequoia.h
@@ -102,6 +102,7 @@
 #define CFG_ENV_IS_IN_FLASH     1	/* use FLASH for environment vars	*/
 #else
 #define CFG_ENV_IS_IN_NAND	1	/* use NAND for environment vars	*/
+#define CFG_ENV_IS_EMBEDDED	1	/* use embedded environment */
 #endif
 
 /*-----------------------------------------------------------------------
diff --git a/include/environment.h b/include/environment.h
index 26b0712..af605ab 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -79,8 +79,7 @@
 # ifdef CFG_ENV_OFFSET_REDUND
 #  define CFG_REDUNDAND_ENVIRONMENT
 # endif
-# if defined(CONFIG_NAND_U_BOOT)
-/* Use embedded environment in NAND boot versions */
+# ifdef CFG_ENV_IS_EMBEDDED
 #  define ENV_IS_EMBEDDED	1
 # endif
 #endif /* CFG_ENV_IS_IN_NAND */