]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
Merge tag 'for-linus-20140405' of git://git.infradead.org/linux-mtd
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Apr 2014 17:17:30 +0000 (10:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Apr 2014 17:17:30 +0000 (10:17 -0700)
Pull MTD updates from Brian Norris:
 - A few SPI NOR ID definitions
 - Kill the NAND "max pagesize" restriction
 - Fix some x16 bus-width NAND support
 - Add NAND JEDEC parameter page support
 - DT bindings for NAND ECC
 - GPMI NAND updates (subpage reads)
 - More OMAP NAND refactoring
 - New STMicro SPI NOR driver (now in 40 patches!)
 - A few other random bugfixes

* tag 'for-linus-20140405' of git://git.infradead.org/linux-mtd: (120 commits)
  Fix index regression in nand_read_subpage
  mtd: diskonchip: mem resource name is not optional
  mtd: nand: fix mention to CONFIG_MTD_NAND_ECC_BCH
  mtd: nand: fix GET/SET_FEATURES address on 16-bit devices
  mtd: omap2: Use devm_ioremap_resource()
  mtd: denali_dt: Use devm_ioremap_resource()
  mtd: devices: elm: update DRIVER_NAME as "omap-elm"
  mtd: devices: elm: configure parallel channels based on ecc_steps
  mtd: devices: elm: clean elm_load_syndrome
  mtd: devices: elm: check for hardware engine's design constraints
  mtd: st_spi_fsm: Succinctly reorganise .remove()
  mtd: st_spi_fsm: Allow loop to run at least once before giving up CPU
  mtd: st_spi_fsm: Correct vendor name spelling issue - missing "M"
  mtd: st_spi_fsm: Avoid duplicating MTD core code
  mtd: st_spi_fsm: Remove useless consts from function arguments
  mtd: st_spi_fsm: Convert ST SPI FSM (NOR) Flash driver to new DT partitions
  mtd: st_spi_fsm: Move runtime configurable msg sequences into device's struct
  mtd: st_spi_fsm: Supply the W25Qxxx chip specific configuration call-back
  mtd: st_spi_fsm: Supply the S25FLxxx chip specific configuration call-back
  mtd: st_spi_fsm: Supply the MX25xxx chip specific configuration call-back
  ...

1  2 
drivers/mtd/nand/Kconfig
drivers/mtd/nand/davinci_nand.c
drivers/mtd/nand/fsl_ifc_nand.c
drivers/mtd/ubi/ubi.h
fs/jffs2/fs.c

diff --combined drivers/mtd/nand/Kconfig
index a4bee41ad5cb3c191748a04409c81ad5414dd1f4,a5bb73865616feee3ed1948a44ff5063f415facb..f1cf503517fdcff3e8743fd3ec2816d85d4fcd80
@@@ -428,7 -428,6 +428,7 @@@ config MTD_NAND_FSL_IF
        tristate "NAND support for Freescale IFC controller"
        depends on MTD_NAND && FSL_SOC
        select FSL_IFC
 +      select MEMORY
        help
          Various Freescale chips e.g P1010, include a NAND Flash machine
          with built-in hardware ECC capabilities.
@@@ -460,6 -459,8 +460,8 @@@ config MTD_NAND_MX
  config MTD_NAND_SH_FLCTL
        tristate "Support for NAND on Renesas SuperH FLCTL"
        depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
+       depends on HAS_IOMEM
+       depends on HAS_DMA
        help
          Several Renesas SuperH CPU has FLCTL. This option enables support
          for NAND Flash using FLCTL.
index 8eb6a36f125aa6e3ea57d6ad0f27d8228e3aa34d,4f5f3223aeefc528a2a02c19d68019ee55388fde..4615d79fc93f795c869687117744e01653219478
@@@ -24,7 -24,6 +24,6 @@@
   */
  
  #include <linux/kernel.h>
- #include <linux/init.h>
  #include <linux/module.h>
  #include <linux/platform_device.h>
  #include <linux/err.h>
@@@ -746,6 -745,28 +745,6 @@@ static int nand_davinci_probe(struct pl
                goto err_clk_enable;
        }
  
 -      /*
 -       * Setup Async configuration register in case we did not boot from
 -       * NAND and so bootloader did not bother to set it up.
 -       */
 -      val = davinci_nand_readl(info, A1CR_OFFSET + info->core_chipsel * 4);
 -
 -      /* Extended Wait is not valid and Select Strobe mode is not used */
 -      val &= ~(ACR_ASIZE_MASK | ACR_EW_MASK | ACR_SS_MASK);
 -      if (info->chip.options & NAND_BUSWIDTH_16)
 -              val |= 0x1;
 -
 -      davinci_nand_writel(info, A1CR_OFFSET + info->core_chipsel * 4, val);
 -
 -      ret = 0;
 -      if (info->timing)
 -              ret = davinci_aemif_setup_timing(info->timing, info->base,
 -                                                      info->core_chipsel);
 -      if (ret < 0) {
 -              dev_dbg(&pdev->dev, "NAND timing values setup fail\n");
 -              goto err;
 -      }
 -
        spin_lock_irq(&davinci_nand_lock);
  
        /* put CSxNAND into NAND mode */
index 50d9161c4faf49959174f603efe69db4ed969334,f8c77e3117665b361d02beaee5eee67d77a8ad0d..cb45d2f8e208425cdaa8866ebdb96753cb80f999
@@@ -22,7 -22,6 +22,6 @@@
  
  #include <linux/module.h>
  #include <linux/types.h>
- #include <linux/init.h>
  #include <linux/kernel.h>
  #include <linux/of_address.h>
  #include <linux/slab.h>
@@@ -30,7 -29,7 +29,7 @@@
  #include <linux/mtd/nand.h>
  #include <linux/mtd/partitions.h>
  #include <linux/mtd/nand_ecc.h>
 -#include <asm/fsl_ifc.h>
 +#include <linux/fsl_ifc.h>
  
  #define FSL_IFC_V1_1_0        0x01010000
  #define ERR_BYTE              0xFF /* Value returned for read
diff --combined drivers/mtd/ubi/ubi.h
index 0ba8b0a288381f80bf0aedfed61e9b3933baa604,41763223f7ea290d8bfa419b06af91544a83c6f4..7bf416329c1973ee58b6c3511f90c8aecc5a997a
@@@ -22,7 -22,6 +22,6 @@@
  #ifndef __UBI_UBI_H__
  #define __UBI_UBI_H__
  
- #include <linux/init.h>
  #include <linux/types.h>
  #include <linux/list.h>
  #include <linux/rbtree.h>
@@@ -864,26 -863,6 +863,26 @@@ int ubi_update_fastmap(struct ubi_devic
  int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai,
                     int fm_anchor);
  
 +/* block.c */
 +#ifdef CONFIG_MTD_UBI_BLOCK
 +int ubiblock_init(void);
 +void ubiblock_exit(void);
 +int ubiblock_create(struct ubi_volume_info *vi);
 +int ubiblock_remove(struct ubi_volume_info *vi);
 +#else
 +static inline int ubiblock_init(void) { return 0; }
 +static inline void ubiblock_exit(void) {}
 +static inline int ubiblock_create(struct ubi_volume_info *vi)
 +{
 +      return -ENOSYS;
 +}
 +static inline int ubiblock_remove(struct ubi_volume_info *vi)
 +{
 +      return -ENOSYS;
 +}
 +#endif
 +
 +
  /*
   * ubi_rb_for_each_entry - walk an RB-tree.
   * @rb: a pointer to type 'struct rb_node' to use as a loop counter
diff --combined fs/jffs2/fs.c
index f73991522672a665e92b13ac4433e6ce35935764,560821bff038070d6b7ef54985b4dae3696ab516..601afd1afddf5bca94fb35f993e61919b6bbdcd4
@@@ -242,7 -242,7 +242,7 @@@ void jffs2_evict_inode (struct inode *i
  
        jffs2_dbg(1, "%s(): ino #%lu mode %o\n",
                  __func__, inode->i_ino, inode->i_mode);
 -      truncate_inode_pages(&inode->i_data, 0);
 +      truncate_inode_pages_final(&inode->i_data);
        clear_inode(inode);
        jffs2_do_clear_inode(c, f);
  }
@@@ -457,12 -457,14 +457,14 @@@ struct inode *jffs2_new_inode (struct i
           The umask is only applied if there's no default ACL */
        ret = jffs2_init_acl_pre(dir_i, inode, &mode);
        if (ret) {
-           make_bad_inode(inode);
-           iput(inode);
-           return ERR_PTR(ret);
+               mutex_unlock(&f->sem);
+               make_bad_inode(inode);
+               iput(inode);
+               return ERR_PTR(ret);
        }
        ret = jffs2_do_new_inode (c, f, mode, ri);
        if (ret) {
+               mutex_unlock(&f->sem);
                make_bad_inode(inode);
                iput(inode);
                return ERR_PTR(ret);
        inode->i_size = 0;
  
        if (insert_inode_locked(inode) < 0) {
+               mutex_unlock(&f->sem);
                make_bad_inode(inode);
                iput(inode);
                return ERR_PTR(-EINVAL);
@@@ -687,7 -690,7 +690,7 @@@ unsigned char *jffs2_gc_fetch_page(stru
        struct inode *inode = OFNI_EDONI_2SFFJ(f);
        struct page *pg;
  
 -      pg = read_cache_page_async(inode->i_mapping, offset >> PAGE_CACHE_SHIFT,
 +      pg = read_cache_page(inode->i_mapping, offset >> PAGE_CACHE_SHIFT,
                             (void *)jffs2_do_readpage_unlock, inode);
        if (IS_ERR(pg))
                return (void *)pg;