1 From 68108d95040732cebf06296affaaeaaf76029c3d Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Wed, 16 Jul 2008 14:44:50 +0100
4 Subject: [PATCH] s3c24xx-nand-largepage.patch
5 MTD: S3C24XX large page NAND support
7 This adds support for using large page NAND devices
8 with the S3C24XX NAND controller. This also adds the
9 file Documentation/arm/Samsung-S3C24XX/NAND.txt to
10 describe the differences.
12 Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 drivers/mtd/nand/s3c2410.c | 28 ++++++++++++++++++++++++++++
15 1 files changed, 28 insertions(+), 0 deletions(-)
17 diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
18 index cd2e1da..6e7a5b9 100644
19 --- a/drivers/mtd/nand/s3c2410.c
20 +++ b/drivers/mtd/nand/s3c2410.c
21 @@ -726,6 +726,34 @@ static void s3c2410_nand_update_chip(struct s3c2410_nand_info *info,
25 +/* s3c2410_nand_update_chip
27 + * post-probe chip update, to change any items, such as the
28 + * layout for large page nand
31 +static void s3c2410_nand_update_chip(struct s3c2410_nand_info *info,
32 + struct s3c2410_nand_mtd *nmtd)
34 + struct nand_chip *chip = &nmtd->chip;
36 + printk("%s: chip %p: %d\n", __func__, chip, chip->page_shift);
39 + /* change the behaviour depending on wether we are using
40 + * the large or small page nand device */
42 + if (chip->page_shift > 10) {
43 + chip->ecc.size = 256;
44 + chip->ecc.bytes = 3;
46 + chip->ecc.size = 512;
47 + chip->ecc.bytes = 3;
48 + chip->ecc.layout = &nand_hw_eccoob;
55 * called by device layer when it finds a device matching