Merge tag 'for-linus-3.5-20120601' of git://git.infradead.org/linux-mtd
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jun 2012 23:55:42 +0000 (16:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jun 2012 23:55:42 +0000 (16:55 -0700)
Pull mtd update from David Woodhouse:
 - More robust parsing especially of xattr data in JFFS2
 - Updates to mxc_nand and gpmi drivers to support new boards and device tree
 - Improve consistency of information about ECC strength in NAND devices
 - Clean up partition handling of plat_nand
 - Support NAND drivers without dedicated access to OOB area
 - BCH hardware ECC support for OMAP
 - Other fixes and cleanups, and a few new device IDs

Fixed trivial conflict in drivers/mtd/nand/gpmi-nand/gpmi-nand.c due to
added include files next to each other.

* tag 'for-linus-3.5-20120601' of git://git.infradead.org/linux-mtd: (75 commits)
  mtd: mxc_nand: move ecc strengh setup before nand_scan_tail
  mtd: block2mtd: fix recursive call of mtd_writev
  mtd: gpmi-nand: define ecc.strength
  mtd: of_parts: fix breakage in Kconfig
  mtd: nand: fix scan_read_raw_oob
  mtd: docg3 fix in-middle of blocks reads
  mtd: cfi_cmdset_0002: Slight cleanup of fixup messages
  mtd: add fixup for S29NS512P NOR flash.
  jffs2: allow to complete xattr integrity check on first GC scan
  jffs2: allow to discriminate between recoverable and non-recoverable errors
  mtd: nand: omap: add support for hardware BCH ecc
  ARM: OMAP3: gpmc: add BCH ecc api and modes
  mtd: nand: check the return code of 'read_oob/read_oob_raw'
  mtd: nand: remove 'sndcmd' parameter of 'read_oob/read_oob_raw'
  mtd: m25p80: Add support for Winbond W25Q80BW
  jffs2: get rid of jffs2_sync_super
  jffs2: remove unnecessary GC pass on sync
  jffs2: remove unnecessary GC pass on umount
  jffs2: remove lock_super
  mtd: gpmi: add gpmi support for mx6q
  ...

18 files changed:
1  2 
arch/arm/boot/dts/imx27.dtsi
arch/arm/mach-ep93xx/snappercl15.c
arch/arm/mach-ep93xx/ts72xx.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-orion5x/ts78xx-setup.c
arch/arm/mach-pxa/balloon3.c
arch/arm/mach-pxa/em-x270.c
arch/mips/alchemy/devboards/db1200.c
arch/mips/rb532/devices.c
arch/sh/boards/mach-migor/setup.c
drivers/mtd/devices/docg3.c
drivers/mtd/nand/gpmi-nand/gpmi-nand.c
drivers/mtd/nand/h1910.c
drivers/mtd/nand/mxc_nand.c

Simple merge
Simple merge
Simple merge
@@@ -199,10 -211,9 +197,9 @@@ static struct platform_nand_data nand_d
                .nr_chips               = 1,
                .chip_offset            = 0,
                .options                = NAND_SAMSUNG_LP_OPTIONS,
-               .part_probe_types       = part_probes,
        },
        .ctrl   = {
 -              .cmd_ctrl       = nand_cmd_ctl,
 +              .cmd_ctrl       = omap1_nand_cmd_ctl,
                .dev_ready      = nand_dev_ready,
        },
  };
@@@ -195,11 -207,11 +193,10 @@@ static struct platform_nand_data h2_nan
                .nr_partitions          = ARRAY_SIZE(h2_nand_partitions),
                .partitions             = h2_nand_partitions,
                .options                = NAND_SAMSUNG_LP_OPTIONS,
-               .part_probe_types       = h2_part_probes,
        },
        .ctrl   = {
 -              .cmd_ctrl       = h2_nand_cmd_ctl,
 +              .cmd_ctrl       = omap1_nand_cmd_ctl,
                .dev_ready      = h2_nand_dev_ready,
 -
        },
  };
  
@@@ -197,10 -209,9 +195,9 @@@ static struct platform_nand_data nand_p
                .nr_partitions          = ARRAY_SIZE(nand_partitions),
                .partitions             = nand_partitions,
                .options                = NAND_SAMSUNG_LP_OPTIONS,
-               .part_probe_types       = part_probes,
        },
        .ctrl   = {
 -              .cmd_ctrl       = nand_cmd_ctl,
 +              .cmd_ctrl       = omap1_nand_cmd_ctl,
                .dev_ready      = nand_dev_ready,
  
        },
@@@ -157,10 -169,9 +155,9 @@@ static struct platform_nand_data nand_d
                .nr_chips               = 1,
                .chip_offset            = 0,
                .options                = NAND_SAMSUNG_LP_OPTIONS,
-               .part_probe_types       = part_probes,
        },
        .ctrl   = {
 -              .cmd_ctrl       = nand_cmd_ctl,
 +              .cmd_ctrl       = omap1_nand_cmd_ctl,
                .dev_ready      = nand_dev_ready,
        },
  };
  #define GPMC_ECC_CONTROL      0x1f8
  #define GPMC_ECC_SIZE_CONFIG  0x1fc
  #define GPMC_ECC1_RESULT        0x200
+ #define GPMC_ECC_BCH_RESULT_0   0x240   /* not available on OMAP2 */
  
 +/* GPMC ECC control settings */
 +#define GPMC_ECC_CTRL_ECCCLEAR                0x100
 +#define GPMC_ECC_CTRL_ECCDISABLE      0x000
 +#define GPMC_ECC_CTRL_ECCREG1         0x001
 +#define GPMC_ECC_CTRL_ECCREG2         0x002
 +#define GPMC_ECC_CTRL_ECCREG3         0x003
 +#define GPMC_ECC_CTRL_ECCREG4         0x004
 +#define GPMC_ECC_CTRL_ECCREG5         0x005
 +#define GPMC_ECC_CTRL_ECCREG6         0x006
 +#define GPMC_ECC_CTRL_ECCREG7         0x007
 +#define GPMC_ECC_CTRL_ECCREG8         0x008
 +#define GPMC_ECC_CTRL_ECCREG9         0x009
 +
  #define GPMC_CS0_OFFSET               0x60
  #define GPMC_CS_SIZE          0x30
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -24,7 -24,8 +24,9 @@@
  #include <linux/module.h>
  #include <linux/mtd/gpmi-nand.h>
  #include <linux/mtd/partitions.h>
 +#include <linux/pinctrl/consumer.h>
+ #include <linux/of.h>
+ #include <linux/of_device.h>
  #include "gpmi-nand.h"
  
  /* add our owner bbt descriptor */
Simple merge
@@@ -698,14 -751,33 +751,33 @@@ static void mxc_nand_select_chip_v1_v3(
  
        if (!host->clk_act) {
                /* Enable the NFC clock */
 -              clk_enable(host->clk);
 +              clk_prepare_enable(host->clk);
                host->clk_act = 1;
        }
+ }
  
-       if (nfc_is_v21()) {
-               host->active_cs = chip;
-               writew(host->active_cs << 4, NFC_V1_V2_BUF_ADDR);
+ static void mxc_nand_select_chip_v2(struct mtd_info *mtd, int chip)
+ {
+       struct nand_chip *nand_chip = mtd->priv;
+       struct mxc_nand_host *host = nand_chip->priv;
+       if (chip == -1) {
+               /* Disable the NFC clock */
+               if (host->clk_act) {
+                       clk_disable(host->clk);
+                       host->clk_act = 0;
+               }
+               return;
+       }
+       if (!host->clk_act) {
+               /* Enable the NFC clock */
+               clk_enable(host->clk);
+               host->clk_act = 1;
        }
+       host->active_cs = chip;
+       writew(host->active_cs << 4, NFC_V1_V2_BUF_ADDR);
  }
  
  /*