From: Linus Torvalds Date: Sat, 31 Mar 2012 00:31:56 +0000 (-0700) Subject: Merge tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6 X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~15196 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=623ff7739e7c00fa3d55dbfd42a492a68298fd7a;p=mirror_ubuntu-artful-kernel.git Merge tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6 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_. 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 ... --- 623ff7739e7c00fa3d55dbfd42a492a68298fd7a diff --cc arch/arm/mach-omap1/flash.c index f9bf78d4fdfb,4665bfcd2ce9..401eb3c080c2 --- a/arch/arm/mach-omap1/flash.c +++ b/arch/arm/mach-omap1/flash.c @@@ -13,24 -12,15 +13,16 @@@ #include #include +#include + 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); } diff --cc arch/arm/mach-s3c24xx/simtec-nor.c index 2119ca6a73bc,000000000000..b9d6d4f92c03 mode 100644,000000..100644 --- a/arch/arm/mach-s3c24xx/simtec-nor.c +++ b/arch/arm/mach-s3c24xx/simtec-nor.c @@@ -1,87 -1,0 +1,84 @@@ +/* linux/arch/arm/mach-s3c2410/nor-simtec.c + * + * Copyright (c) 2008 Simtec Electronics + * http://armlinux.simtec.co.uk/ + * Ben Dooks + * + * Simtec NOR mapping + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "simtec.h" + +static void simtec_nor_vpp(struct platform_device *pdev, int vpp) +{ + unsigned int val; - unsigned long flags; + - local_irq_save(flags); + val = __raw_readb(BAST_VA_CTRL3); + + printk(KERN_DEBUG "%s(%d)\n", __func__, vpp); + + if (vpp) + val |= BAST_CPLD_CTRL3_ROMWEN; + else + val &= ~BAST_CPLD_CTRL3_ROMWEN; + + __raw_writeb(val, BAST_VA_CTRL3); - local_irq_restore(flags); +} + +static struct physmap_flash_data simtec_nor_pdata = { + .width = 2, + .set_vpp = simtec_nor_vpp, + .nr_parts = 0, +}; + +static struct resource simtec_nor_resource[] = { + [0] = { + .start = S3C2410_CS1 + 0x4000000, + .end = S3C2410_CS1 + 0x4000000 + SZ_8M - 1, + .flags = IORESOURCE_MEM, + } +}; + +static struct platform_device simtec_device_nor = { + .name = "physmap-flash", + .id = -1, + .num_resources = ARRAY_SIZE(simtec_nor_resource), + .resource = simtec_nor_resource, + .dev = { + .platform_data = &simtec_nor_pdata, + }, +}; + +void __init nor_simtec_init(void) +{ + int ret; + + ret = platform_device_register(&simtec_device_nor); + if (ret < 0) + printk(KERN_ERR "failed to register physmap-flash device\n"); + else + simtec_nor_vpp(NULL, 1); +} diff --cc drivers/dma/mxs-dma.c index 65334c49b71e,0ddfd30b56ad..c81ef7e10e08 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@@ -25,11 -26,8 +26,10 @@@ #include #include - #include #include +#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; diff --cc drivers/mmc/host/mxs-mmc.c index 65f36cf2ff33,4062812136ef..b0f2ef988188 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@@ -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; diff --cc drivers/mtd/devices/pmc551.c index 5d53c5760a6c,c4368ec39d5c..0c51b988e1f8 --- a/drivers/mtd/devices/pmc551.c +++ b/drivers/mtd/devices/pmc551.c @@@ -93,10 -93,44 +93,43 @@@ #include #include #include -#include #include - #include - #include + + #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; diff --cc drivers/mtd/nand/gpmi-nand/gpmi-lib.c index 590dd5cceed6,c34dab17682e..e8ea7107932e --- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c @@@ -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; @@@ -1052,9 -1061,11 +1060,11 @@@ | BF_GPMI_CTRL0_ADDRESS(address) | BF_GPMI_CTRL0_XFER_COUNT(geo->page_size); pio[1] = 0; + pio[2] = 0; /* clear GPMI_HW_GPMI_ECCCTRL, disable the BCH. */ - desc = channel->device->device_prep_slave_sg(channel, + desc = dmaengine_prep_slave_sg(channel, - (struct scatterlist *)pio, 2, - DMA_TRANS_NONE, 1); + (struct scatterlist *)pio, 3, + DMA_TRANS_NONE, + DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) { pr_err("step 3 error\n"); return -1; diff --cc fs/jffs2/fs.c index c0d5c9d770da,43052faa94e1..bb6f993ebca9 --- a/fs/jffs2/fs.c +++ b/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; diff --cc sound/soc/mxs/mxs-pcm.c index 6ca1f46d84a4,420715eb6a1d..e373fbbc97a0 --- a/sound/soc/mxs/mxs-pcm.c +++ b/sound/soc/mxs/mxs-pcm.c @@@ -34,16 -35,9 +35,15 @@@ #include #include #include +#include - #include #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 |