[ar71xx] create firmware image for the Ubiquiti LS-SR71 board
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1021-s3c24xx-nand-largepage.patch.patch
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
6
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.
11
12 Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 ---
14 drivers/mtd/nand/s3c2410.c | 28 ++++++++++++++++++++++++++++
15 1 files changed, 28 insertions(+), 0 deletions(-)
16
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,
22 }
23 }
24
25 +/* s3c2410_nand_update_chip
26 + *
27 + * post-probe chip update, to change any items, such as the
28 + * layout for large page nand
29 + */
30 +
31 +static void s3c2410_nand_update_chip(struct s3c2410_nand_info *info,
32 + struct s3c2410_nand_mtd *nmtd)
33 +{
34 + struct nand_chip *chip = &nmtd->chip;
35 +
36 + printk("%s: chip %p: %d\n", __func__, chip, chip->page_shift);
37 +
38 + if (hardware_ecc) {
39 + /* change the behaviour depending on wether we are using
40 + * the large or small page nand device */
41 +
42 + if (chip->page_shift > 10) {
43 + chip->ecc.size = 256;
44 + chip->ecc.bytes = 3;
45 + } else {
46 + chip->ecc.size = 512;
47 + chip->ecc.bytes = 3;
48 + chip->ecc.layout = &nand_hw_eccoob;
49 + }
50 + }
51 +}
52 +
53 /* s3c2410_nand_probe
54 *
55 * called by device layer when it finds a device matching
56 --
57 1.5.6.3
58
This page took 0.046982 seconds and 5 git commands to generate.