diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-11-01 05:11:07 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-01 05:11:07 -0500 |
commit | e87a3dd33eab30b4db539500064a9584867e4f2c (patch) | |
tree | 2f7ad16e46ae30518ff63bb5391b63f7f7cc74dd /drivers/mtd/nand/mxc_nand.c | |
parent | b14f5de731ae657d498d18d713c6431bfbeefb4b (diff) | |
parent | 3d00941371a765779c4e3509214c7e5793cce1fe (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/mtd/nand/mxc_nand.c')
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 76beea40d2cf..65b26d5a5c0d 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
@@ -857,6 +857,17 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, | |||
857 | } | 857 | } |
858 | } | 858 | } |
859 | 859 | ||
860 | /* Define some generic bad / good block scan pattern which are used | ||
861 | * while scanning a device for factory marked good / bad blocks. */ | ||
862 | static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; | ||
863 | |||
864 | static struct nand_bbt_descr smallpage_memorybased = { | ||
865 | .options = NAND_BBT_SCAN2NDPAGE, | ||
866 | .offs = 5, | ||
867 | .len = 1, | ||
868 | .pattern = scan_ff_pattern | ||
869 | }; | ||
870 | |||
860 | static int __init mxcnd_probe(struct platform_device *pdev) | 871 | static int __init mxcnd_probe(struct platform_device *pdev) |
861 | { | 872 | { |
862 | struct nand_chip *this; | 873 | struct nand_chip *this; |
@@ -973,7 +984,10 @@ static int __init mxcnd_probe(struct platform_device *pdev) | |||
973 | goto escan; | 984 | goto escan; |
974 | } | 985 | } |
975 | 986 | ||
976 | host->pagesize_2k = (mtd->writesize == 2048) ? 1 : 0; | 987 | if (mtd->writesize == 2048) { |
988 | host->pagesize_2k = 1; | ||
989 | this->badblock_pattern = &smallpage_memorybased; | ||
990 | } | ||
977 | 991 | ||
978 | if (this->ecc.mode == NAND_ECC_HW) { | 992 | if (this->ecc.mode == NAND_ECC_HW) { |
979 | switch (mtd->oobsize) { | 993 | switch (mtd->oobsize) { |