diff options
| -rw-r--r-- | arch/arm/plat-s3c/include/plat/nand.h | 5 | ||||
| -rw-r--r-- | drivers/mtd/nand/s3c2410.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/include/plat/nand.h b/arch/arm/plat-s3c/include/plat/nand.h index 935651664969..18f958801e64 100644 --- a/arch/arm/plat-s3c/include/plat/nand.h +++ b/arch/arm/plat-s3c/include/plat/nand.h | |||
| @@ -13,6 +13,10 @@ | |||
| 13 | /** | 13 | /** |
| 14 | * struct s3c2410_nand_set - define a set of one or more nand chips | 14 | * struct s3c2410_nand_set - define a set of one or more nand chips |
| 15 | * @disable_ecc: Entirely disable ECC - Dangerous | 15 | * @disable_ecc: Entirely disable ECC - Dangerous |
| 16 | * @flash_bbt: Openmoko u-boot can create a Bad Block Table | ||
| 17 | * Setting this flag will allow the kernel to | ||
| 18 | * look for it at boot time and also skip the NAND | ||
| 19 | * scan. | ||
| 16 | * @nr_chips: Number of chips in this set | 20 | * @nr_chips: Number of chips in this set |
| 17 | * @nr_partitions: Number of partitions pointed to by @partitions | 21 | * @nr_partitions: Number of partitions pointed to by @partitions |
| 18 | * @name: Name of set (optional) | 22 | * @name: Name of set (optional) |
| @@ -25,6 +29,7 @@ | |||
| 25 | */ | 29 | */ |
| 26 | struct s3c2410_nand_set { | 30 | struct s3c2410_nand_set { |
| 27 | unsigned int disable_ecc:1; | 31 | unsigned int disable_ecc:1; |
| 32 | unsigned int flash_bbt:1; | ||
| 28 | 33 | ||
| 29 | int nr_chips; | 34 | int nr_chips; |
| 30 | int nr_partitions; | 35 | int nr_partitions; |
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index ef5665258968..d315b513db5c 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
| @@ -845,6 +845,12 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info, | |||
| 845 | dev_info(info->device, "NAND ECC UNKNOWN\n"); | 845 | dev_info(info->device, "NAND ECC UNKNOWN\n"); |
| 846 | break; | 846 | break; |
| 847 | } | 847 | } |
| 848 | |||
| 849 | /* If you use u-boot BBT creation code, specifying this flag will | ||
| 850 | * let the kernel fish out the BBT from the NAND, and also skip the | ||
| 851 | * full NAND scan that can take 1/2s or so. Little things... */ | ||
| 852 | if (set->flash_bbt) | ||
| 853 | chip->options |= NAND_USE_FLASH_BBT | NAND_SKIP_BBTSCAN; | ||
| 848 | } | 854 | } |
| 849 | 855 | ||
| 850 | /** | 856 | /** |
