Merge tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 31 Mar 2012 00:31:56 +0000 (17:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 31 Mar 2012 00:31:56 +0000 (17:31 -0700)
Pull MTD changes from David Woodhouse:
 - Artem's cleanup of the MTD API continues apace.
 - Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
   others.
 - More work on DiskOnChip G3, new driver for DiskOnChip G4.
 - Clean up debug/warning printks in JFFS2 to use pr_<level>.

Fix up various trivial conflicts, largely due to changes in calling
conventions for things like dmaengine_prep_slave_sg() (new inline
wrapper to hide new parameter, clashing with rewrite of previously last
parameter that used to be an 'append' flag, and is now a bitmap of
'unsigned long flags').

(Also some header file fallout - like so many merges this merge window -
and silly conflicts with sparse fixes)

* tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
  mtd: docg3 add protection against concurrency
  mtd: docg3 refactor cascade floors structure
  mtd: docg3 increase write/erase timeout
  mtd: docg3 fix inbound calculations
  mtd: nand: gpmi: fix function annotations
  mtd: phram: fix section mismatch for phram_setup
  mtd: unify initialization of erase_info->fail_addr
  mtd: support ONFI multi lun NAND
  mtd: sm_ftl: fix typo in major number.
  mtd: add device-tree support to spear_smi
  mtd: spear_smi: Remove default partition information from driver
  mtd: Add device-tree support to fsmc_nand
  mtd: fix section mismatch for doc_probe_device
  mtd: nand/fsmc: Remove sparse warnings and errors
  mtd: nand/fsmc: Add DMA support
  mtd: nand/fsmc: Access the NAND device word by word whenever possible
  mtd: nand/fsmc: Use dev_err to report error scenario
  mtd: nand/fsmc: Use devm routines
  mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
  mtd: fsmc_nand: add pm callbacks to support hibernation
  ...

24 files changed:
1  2 
arch/arm/mach-omap1/flash.c
arch/arm/mach-s3c24xx/simtec-nor.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/clock-sh7372.c
arch/arm/mach-u300/core.c
arch/arm/mach-u300/include/mach/u300-regs.h
drivers/dma/mxs-dma.c
drivers/mmc/host/mxs-mmc.c
drivers/mtd/Kconfig
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/devices/Kconfig
drivers/mtd/devices/pmc551.c
drivers/mtd/devices/slram.c
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/mtdchar.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/Makefile
drivers/mtd/nand/atmel_nand.c
drivers/mtd/nand/bcm_umi_nand.c
drivers/mtd/nand/gpmi-nand/gpmi-lib.c
drivers/net/ethernet/sfc/mtd.c
fs/jffs2/fs.c
sound/soc/mxs/mxs-pcm.c
sound/soc/mxs/mxs-saif.c

  #include <plat/tc.h>
  #include <plat/flash.h>
  
 +#include <mach/hardware.h>
 +
  void omap1_set_vpp(struct platform_device *pdev, int enable)
  {
-       static int count;
        u32 l;
  
-       if (enable) {
-               if (count++ == 0) {
-                       l = omap_readl(EMIFS_CONFIG);
-                       l |= OMAP_EMIFS_CONFIG_WP;
-                       omap_writel(l, EMIFS_CONFIG);
-               }
-       } else {
-               if (count && (--count == 0)) {
-                       l = omap_readl(EMIFS_CONFIG);
-                       l &= ~OMAP_EMIFS_CONFIG_WP;
-                       omap_writel(l, EMIFS_CONFIG);
-               }
-       }
+       l = omap_readl(EMIFS_CONFIG);
+       if (enable)
+               l |= OMAP_EMIFS_CONFIG_WP;
+       else
+               l &= ~OMAP_EMIFS_CONFIG_WP;
+       omap_writel(l, EMIFS_CONFIG);
  }
Simple merge
Simple merge
Simple merge
  
  #include <asm/irq.h>
  #include <mach/mxs.h>
- #include <mach/dma.h>
  #include <mach/common.h>
  
 +#include "dmaengine.h"
 +
  /*
   * NOTE: The term "PIO" throughout the mxs-dma implementation means
   * PIO mode of mxs apbh-dma and apbx-dma.  With this working mode,
@@@ -340,7 -374,7 +362,7 @@@ static void mxs_dma_free_chan_resources
  static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
                struct dma_chan *chan, struct scatterlist *sgl,
                unsigned int sg_len, enum dma_transfer_direction direction,
-               unsigned long append, void *context)
 -              unsigned long flags)
++              unsigned long flags, void *context)
  {
        struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
        struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
@@@ -324,8 -324,8 +324,8 @@@ static struct dma_async_tx_descriptor *
                sg_len = SSP_PIO_NUM;
        }
  
 -      desc = host->dmach->device->device_prep_slave_sg(host->dmach,
 +      desc = dmaengine_prep_slave_sg(host->dmach,
-                               sgl, sg_len, host->slave_dirn, append);
+                               sgl, sg_len, host->slave_dirn, flags);
        if (desc) {
                desc->callback = mxs_mmc_dma_irq_callback;
                desc->callback_param = host;
Simple merge
Simple merge
Simple merge
  #include <linux/fs.h>
  #include <linux/ioctl.h>
  #include <asm/io.h>
 -#include <asm/system.h>
  #include <linux/pci.h>
  #include <linux/mtd/mtd.h>
- #include <linux/mtd/pmc551.h>
+ #define PMC551_VERSION \
+       "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n"
+ #define PCI_VENDOR_ID_V3_SEMI 0x11b0
+ #define PCI_DEVICE_ID_V3_SEMI_V370PDC 0x0200
+ #define PMC551_PCI_MEM_MAP0 0x50
+ #define PMC551_PCI_MEM_MAP1 0x54
+ #define PMC551_PCI_MEM_MAP_MAP_ADDR_MASK 0x3ff00000
+ #define PMC551_PCI_MEM_MAP_APERTURE_MASK 0x000000f0
+ #define PMC551_PCI_MEM_MAP_REG_EN 0x00000002
+ #define PMC551_PCI_MEM_MAP_ENABLE 0x00000001
+ #define PMC551_SDRAM_MA  0x60
+ #define PMC551_SDRAM_CMD 0x62
+ #define PMC551_DRAM_CFG  0x64
+ #define PMC551_SYS_CTRL_REG 0x78
+ #define PMC551_DRAM_BLK0 0x68
+ #define PMC551_DRAM_BLK1 0x6c
+ #define PMC551_DRAM_BLK2 0x70
+ #define PMC551_DRAM_BLK3 0x74
+ #define PMC551_DRAM_BLK_GET_SIZE(x) (524288 << ((x >> 4) & 0x0f))
+ #define PMC551_DRAM_BLK_SET_COL_MUX(x, v) (((x) & ~0x00007000) | (((v) & 0x7) << 12))
+ #define PMC551_DRAM_BLK_SET_ROW_MUX(x, v) (((x) & ~0x00000f00) | (((v) & 0xf) << 8))
+ struct mypriv {
+       struct pci_dev *dev;
+       u_char *start;
+       u32 base_map0;
+       u32 curr_map0;
+       u32 asize;
+       struct mtd_info *nextpmc551;
+ };
  
  static struct mtd_info *pmc551list;
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -848,7 -848,10 +848,10 @@@ int gpmi_send_command(struct gpmi_nand_
  
        sg_init_one(sgl, this->cmd_buffer, this->command_length);
        dma_map_sg(this->dev, sgl, 1, DMA_TO_DEVICE);
-       desc = dmaengine_prep_slave_sg(channel, sgl, 1, DMA_MEM_TO_DEV, 1);
 -      desc = channel->device->device_prep_slave_sg(channel,
++      desc = dmaengine_prep_slave_sg(channel,
+                               sgl, 1, DMA_MEM_TO_DEV,
+                               DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
        if (!desc) {
                pr_err("step 2 error\n");
                return -1;
@@@ -888,8 -892,9 +891,9 @@@ int gpmi_send_data(struct gpmi_nand_dat
  
        /* [2] send DMA request */
        prepare_data_dma(this, DMA_TO_DEVICE);
 -      desc = channel->device->device_prep_slave_sg(channel, &this->data_sgl,
 +      desc = dmaengine_prep_slave_sg(channel, &this->data_sgl,
-                                               1, DMA_MEM_TO_DEV, 1);
+                                       1, DMA_MEM_TO_DEV,
+                                       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
        if (!desc) {
                pr_err("step 2 error\n");
                return -1;
@@@ -924,8 -929,9 +928,9 @@@ int gpmi_read_data(struct gpmi_nand_dat
  
        /* [2] : send DMA request */
        prepare_data_dma(this, DMA_FROM_DEVICE);
 -      desc = channel->device->device_prep_slave_sg(channel, &this->data_sgl,
 +      desc = dmaengine_prep_slave_sg(channel, &this->data_sgl,
-                                       1, DMA_DEV_TO_MEM, 1);
+                                       1, DMA_DEV_TO_MEM,
+                                       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
        if (!desc) {
                pr_err("step 2 error\n");
                return -1;
@@@ -970,8 -976,10 +975,10 @@@ int gpmi_send_page(struct gpmi_nand_dat
        pio[4] = payload;
        pio[5] = auxiliary;
  
-       desc = dmaengine_prep_slave_sg(channel, (struct scatterlist *)pio,
-                                       ARRAY_SIZE(pio), DMA_TRANS_NONE, 0);
 -      desc = channel->device->device_prep_slave_sg(channel,
++      desc = dmaengine_prep_slave_sg(channel,
+                                       (struct scatterlist *)pio,
+                                       ARRAY_SIZE(pio), DMA_TRANS_NONE,
+                                       DMA_CTRL_ACK);
        if (!desc) {
                pr_err("step 2 error\n");
                return -1;
@@@ -1033,9 -1041,10 +1040,10 @@@ int gpmi_read_page(struct gpmi_nand_dat
        pio[3] = geo->page_size;
        pio[4] = payload;
        pio[5] = auxiliary;
 -      desc = channel->device->device_prep_slave_sg(channel,
 +      desc = dmaengine_prep_slave_sg(channel,
                                        (struct scatterlist *)pio,
-                                       ARRAY_SIZE(pio), DMA_TRANS_NONE, 1);
+                                       ARRAY_SIZE(pio), DMA_TRANS_NONE,
+                                       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
        if (!desc) {
                pr_err("step 2 error\n");
                return -1;
                | BF_GPMI_CTRL0_ADDRESS(address)
                | BF_GPMI_CTRL0_XFER_COUNT(geo->page_size);
        pio[1] = 0;
 -      desc = channel->device->device_prep_slave_sg(channel,
+       pio[2] = 0; /* clear GPMI_HW_GPMI_ECCCTRL, disable the BCH. */
-                               (struct scatterlist *)pio, 2,
-                               DMA_TRANS_NONE, 1);
 +      desc = dmaengine_prep_slave_sg(channel,
+                               (struct scatterlist *)pio, 3,
+                               DMA_TRANS_NONE,
+                               DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
        if (!desc) {
                pr_err("step 3 error\n");
                return -1;
Simple merge
diff --cc fs/jffs2/fs.c
@@@ -560,10 -572,10 +572,10 @@@ int jffs2_do_fill_super(struct super_bl
  
        ret = -ENOMEM;
  
-       D1(printk(KERN_DEBUG "jffs2_do_fill_super(): d_alloc_root()\n"));
 -      jffs2_dbg(1, "%s(): d_alloc_root()\n", __func__);
 -      sb->s_root = d_alloc_root(root_i);
++      jffs2_dbg(1, "%s(): d_make_root()\n", __func__);
 +      sb->s_root = d_make_root(root_i);
        if (!sb->s_root)
 -              goto out_root_i;
 +              goto out_root;
  
        sb->s_maxbytes = 0xFFFFFFFF;
        sb->s_blocksize = PAGE_CACHE_SIZE;
  #include <sound/pcm.h>
  #include <sound/pcm_params.h>
  #include <sound/soc.h>
 +#include <sound/dmaengine_pcm.h>
  
- #include <mach/dma.h>
  #include "mxs-pcm.h"
  
 +struct mxs_pcm_dma_data {
 +      struct mxs_dma_data dma_data;
 +      struct mxs_pcm_dma_params *dma_params;
 +};
 +
  static struct snd_pcm_hardware snd_mxs_hardware = {
        .info                   = SNDRV_PCM_INFO_MMAP |
                                  SNDRV_PCM_INFO_MMAP_VALID |
Simple merge