aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.26/0021-s3c24xx-nand-largepage.patch.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
commit614683faf8029100802db06a825648d0b6490285 (patch)
tree7401b135dc7ce24ff0175e67e0f2ce7f96296ff0 /target/linux/s3c24xx/patches-2.6.26/0021-s3c24xx-nand-largepage.patch.patch
parent4a018d2445c5f249179ff82c8fffb0e3b717f738 (diff)
downloadupstream-614683faf8029100802db06a825648d0b6490285.tar.gz
upstream-614683faf8029100802db06a825648d0b6490285.tar.bz2
upstream-614683faf8029100802db06a825648d0b6490285.zip
changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko)
SVN-Revision: 13613
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.26/0021-s3c24xx-nand-largepage.patch.patch')
-rwxr-xr-xtarget/linux/s3c24xx/patches-2.6.26/0021-s3c24xx-nand-largepage.patch.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.26/0021-s3c24xx-nand-largepage.patch.patch b/target/linux/s3c24xx/patches-2.6.26/0021-s3c24xx-nand-largepage.patch.patch
new file mode 100755
index 0000000000..383ae6a739
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.26/0021-s3c24xx-nand-largepage.patch.patch
@@ -0,0 +1,58 @@
+From 68108d95040732cebf06296affaaeaaf76029c3d Mon Sep 17 00:00:00 2001
+From: mokopatches <mokopatches@openmoko.org>
+Date: Wed, 16 Jul 2008 14:44:50 +0100
+Subject: [PATCH] s3c24xx-nand-largepage.patch
+ MTD: S3C24XX large page NAND support
+
+This adds support for using large page NAND devices
+with the S3C24XX NAND controller. This also adds the
+file Documentation/arm/Samsung-S3C24XX/NAND.txt to
+describe the differences.
+
+Signed-off-by: Ben Dooks <ben-linux@fluff.org>
+---
+ drivers/mtd/nand/s3c2410.c | 28 ++++++++++++++++++++++++++++
+ 1 files changed, 28 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
+index cd2e1da..6e7a5b9 100644
+--- a/drivers/mtd/nand/s3c2410.c
++++ b/drivers/mtd/nand/s3c2410.c
+@@ -726,6 +726,34 @@ static void s3c2410_nand_update_chip(struct s3c2410_nand_info *info,
+ }
+ }
+
++/* s3c2410_nand_update_chip
++ *
++ * post-probe chip update, to change any items, such as the
++ * layout for large page nand
++ */
++
++static void s3c2410_nand_update_chip(struct s3c2410_nand_info *info,
++ struct s3c2410_nand_mtd *nmtd)
++{
++ struct nand_chip *chip = &nmtd->chip;
++
++ printk("%s: chip %p: %d\n", __func__, chip, chip->page_shift);
++
++ if (hardware_ecc) {
++ /* change the behaviour depending on wether we are using
++ * the large or small page nand device */
++
++ if (chip->page_shift > 10) {
++ chip->ecc.size = 256;
++ chip->ecc.bytes = 3;
++ } else {
++ chip->ecc.size = 512;
++ chip->ecc.bytes = 3;
++ chip->ecc.layout = &nand_hw_eccoob;
++ }
++ }
++}
++
+ /* s3c2410_nand_probe
+ *
+ * called by device layer when it finds a device matching
+--
+1.5.6.3
+