change prefix for kernelpatchbase 2.6.26
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1005-s3c2410-bbt.patch.patch
1 From ee782e877d8c50f3ed775aee8934565699a5fc99 Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Wed, 16 Jul 2008 14:44:10 +0100
4 Subject: [PATCH] s3c2410-bbt.patch
5 [PATCH] Add Kconfig option to enable NAND bad-block-table support for s3c2410
6
7 This patch adds a new CONFIG_MTD_NAND_S3C2410_BBT which, if enabled,
8 asks the mtd NAND core to use a bad-block table.
9
10 Signed-off-by: Harald Welte <laforge@openmoko.org>
11 ---
12 drivers/mtd/nand/s3c2410.c | 6 +++++-
13 include/asm-arm/plat-s3c/nand.h | 3 +++
14 2 files changed, 8 insertions(+), 1 deletions(-)
15
16 diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
17 index 101b6b5..cd2e1da 100644
18 --- a/drivers/mtd/nand/s3c2410.c
19 +++ b/drivers/mtd/nand/s3c2410.c
20 @@ -619,9 +619,13 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
21 chip->select_chip = s3c2410_nand_select_chip;
22 chip->chip_delay = 50;
23 chip->priv = nmtd;
24 - chip->options = 0;
25 chip->controller = &info->controller;
26
27 + if (set->flags & S3C2410_NAND_BBT)
28 + chip->options = NAND_USE_FLASH_BBT;
29 + else
30 + chip->options = 0;
31 +
32 switch (info->cpu_type) {
33 case TYPE_S3C2410:
34 chip->IO_ADDR_W = regs + S3C2410_NFDATA;
35 diff --git a/include/asm-arm/plat-s3c/nand.h b/include/asm-arm/plat-s3c/nand.h
36 index ad6bbe9..54f479e 100644
37 --- a/include/asm-arm/plat-s3c/nand.h
38 +++ b/include/asm-arm/plat-s3c/nand.h
39 @@ -21,11 +21,14 @@
40 * partitions = mtd partition list
41 */
42
43 +#define S3C2410_NAND_BBT 0x0001
44 +
45 struct s3c2410_nand_set {
46 unsigned int disable_ecc : 1;
47
48 int nr_chips;
49 int nr_partitions;
50 + unsigned int flags;
51 char *name;
52 int *nr_map;
53 struct mtd_partition *partitions;
54 --
55 1.5.6.3
56
This page took 0.052714 seconds and 5 git commands to generate.