r680 - trunk/src/target/u-boot/patches

laforge at sita.openmoko.org laforge at sita.openmoko.org
Tue Feb 6 02:03:05 CET 2007


Author: laforge
Date: 2007-02-06 02:03:05 +0100 (Tue, 06 Feb 2007)
New Revision: 680

Modified:
   trunk/src/target/u-boot/patches/s3c2410-nand_bbt.patch
Log:
* add proper patch description
* introduce (and use) new CONFIG_S3C2410_NAND_BBT option
* remove lots of debug printout


Modified: trunk/src/target/u-boot/patches/s3c2410-nand_bbt.patch
===================================================================
--- trunk/src/target/u-boot/patches/s3c2410-nand_bbt.patch	2007-02-06 01:02:24 UTC (rev 679)
+++ trunk/src/target/u-boot/patches/s3c2410-nand_bbt.patch	2007-02-06 01:03:05 UTC (rev 680)
@@ -1,58 +1,28 @@
+This introduces NAND bad block table support on the S3C2410, which is required
+by the dynamic partition support
+
+Signes-off-by: Harald Welte <laforge at openmoko.org>
 Index: u-boot.git/cpu/arm920t/s3c24x0/nand.c
 ===================================================================
---- u-boot.git.orig/cpu/arm920t/s3c24x0/nand.c	2007-01-14 01:43:12.000000000 +0100
-+++ u-boot.git/cpu/arm920t/s3c24x0/nand.c	2007-01-14 01:43:42.000000000 +0100
-@@ -188,7 +188,7 @@
+--- u-boot.git.orig/cpu/arm920t/s3c24x0/nand.c	2007-02-05 20:37:17.000000000 +0100
++++ u-boot.git/cpu/arm920t/s3c24x0/nand.c	2007-02-05 23:32:49.000000000 +0100
+@@ -188,7 +188,11 @@
  	nand->dev_ready = s3c2410_dev_ready;
  
  	nand->eccmode = NAND_ECC_SOFT;
--	nand->options = 0;
++#ifdef CONFIG_S3C2410_NAND_BBT
 +	nand->options = NAND_USE_FLASH_BBT;
++#else
+ 	nand->options = 0;
++#endif
  	//nand->waitfunc = dfc_wait;
  
  	//nand->cmdfunc = s3c2410_cmdfunc;
 Index: u-boot.git/drivers/nand/nand_bbt.c
 ===================================================================
---- u-boot.git.orig/drivers/nand/nand_bbt.c	2007-01-14 02:02:06.000000000 +0100
-+++ u-boot.git/drivers/nand/nand_bbt.c	2007-01-14 02:09:40.000000000 +0100
-@@ -84,24 +84,33 @@
- 	end = paglen + td->offs;
- 	if (td->options & NAND_BBT_SCANEMPTY) {
- 		for (i = 0; i < end; i++) {
--			if (p[i] != 0xff)
-+			if (p[i] != 0xff) {
-+				printf("SCANEMPTY1: byte at offset %u is 0x%02x, not 0xff\n",
-+					i, p[i]);
- 				return -1;
-+			}
- 		}
- 	}
- 	p += end;
- 
- 	/* Compare the pattern */
- 	for (i = 0; i < td->len; i++) {
--		if (p[i] != td->pattern[i])
-+		if (p[i] != td->pattern[i]) {
-+			printf("byte at pattern offset %u is 0x%02x, not 0x%02x\n", i,
-+				p[i], td->pattern[i]);
- 			return -1;
-+		}
- 	}
- 
- 	p += td->len;
- 	end += td->len;
- 	if (td->options & NAND_BBT_SCANEMPTY) {
- 		for (i = end; i < len; i++) {
--			if (*p++ != 0xff)
-+			if (*p++ != 0xff) {
-+				printf("SCANEMPTY1: byte at offset %u is 0x%02x, not 0xff\n",
-+					i, p[i]);
- 				return -1;
-+			}
- 		}
- 	}
- 	return 0;
-@@ -296,6 +305,8 @@
+--- u-boot.git.orig/drivers/nand/nand_bbt.c	2007-02-05 20:36:15.000000000 +0100
++++ u-boot.git/drivers/nand/nand_bbt.c	2007-02-05 23:30:30.000000000 +0100
+@@ -296,6 +296,8 @@
  		for (j = 0; j < len; j++) {
  			if (check_pattern (&buf[j * scanlen], scanlen, mtd->oobblock, bd)) {
  				this->bbt[i >> 3] |= 0x03 << (i & 0x6);
@@ -61,3 +31,14 @@
  				break;
  			}
  		}
+Index: u-boot.git/include/configs/gta01.h
+===================================================================
+--- u-boot.git.orig/include/configs/gta01.h	2007-02-05 23:31:55.000000000 +0100
++++ u-boot.git/include/configs/gta01.h	2007-02-05 23:32:23.000000000 +0100
+@@ -250,4 +250,6 @@
+ #define LCD_VIDEO_ADDR		0x33d00000
+ #endif
+ 
++#define CONFIG_S3C2410_NAND_BBT		1
++
+ #endif	/* __CONFIG_H */





More information about the commitlog mailing list