[PATCH] u-boot from nand and skip bad block

Andy Green andy at openmoko.com
Sun Apr 13 20:23:04 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:
| Hi,
|
| I have rebased the patch to the latest git.

Thanks a lot, the patch went in easily and was signed-off-by too :-)  So
I stuck it on the andy branch.

Reading through the patch, if I understood it it will only do something
on GTA01 which has CONFIG_S3C2410 defined.  GTA02 has CONFIG_S3C2442 set
instead... in cpu/arm920t/s3c24x0/nand_read.c:

#if defined(CONFIG_S3C2410)
/* configuration for 2410 with 512byte sized flash */
#define NAND_PAGE_SIZE		512
#define BAD_BLOCK_OFFSET	5    <===== patched this
#define NAND_BLOCK_MASK		(NAND_PAGE_SIZE - 1)
#define NAND_BLOCK_SIZE		0x4000
#else
/* configuration for 2440 with 2048byte sized flash */
#define NAND_5_ADDR_CYCLE
#define NAND_PAGE_SIZE		2048
#define BAD_BLOCK_OFFSET	NAND_PAGE_SIZE  <=== not this.. is ok?
#define	NAND_BLOCK_MASK		(NAND_PAGE_SIZE - 1)
#define NAND_BLOCK_SIZE		(NAND_PAGE_SIZE * 64)
#endif

On GTA02, we get BAD_BLOCK_OFFSET ---> NAND_PAGE_SIZE... is that OK or
should it too be changed like BAD_BLOCK_OFFSET went to 5 from 517 in the
CONFIG_S3C2410 case?  Just curious about if CONFIG_S3C2442 / GTA02 has
whatever problem it is we fix here for CONFIG_S3C2410 / GTA01 as well.

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkgCT4EACgkQOjLpvpq7dMpazQCfaAAiguGDkDNFGV8Omo0aYL5f
gnAAn0WX+Aix/w5ODJ6jdufzjbyOMwvt
=CAA8
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list