summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
AgeCommit message (Collapse)AuthorFilesLines
2008-12-16[ARM] MX3: add NAND supportSascha Hauer1-1/+1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16UBI: simplify PEB protection codeXiaochuan-Xu2-241/+162
UBI has 2 RB-trees to implement PEB protection, which is too much for simply prevent PEB from being moved for some time. This patch implements this using lists. The benefits: 1. No need to allocate protection entry on each PEB get. 2. No need to maintain balanced trees and walk them. Signed-off-by: Xiaochuan-Xu <xiaochuan-xu@cqu.edu.cn> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-15Merge branch 'omap3-upstream' of ↵Russell King6-46/+45
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel
2008-12-15UBI: prepare for protection tree improvementsXiaochuan-Xu2-24/+27
This patch modifies @struct ubi_wl_entry and adds union which contains only one element so far. This is just a preparation for further changes which will kill the protection tree and make UBI use a list instead. Signed-off-by: Xiaochuan-Xu <xiaochuan-xu@cqu.edu.cn> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-13Merge git://git.marvell.com/orion into develRussell King3-3/+4
2008-12-13[ARM] netwinder: clean up GPIO namingRussell King1-4/+3
Netwinder was using gpio_xxx names which could clash with the GPIO layer. Add a 'nw_' prefix to ensure that these remain separate. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-12-10ARM: OMAP: use gpio_to_irqDavid Brownell1-3/+3
Have most uses of OMAP_GPIO_IRQ() use gpio_to_irq() instead. Calls used for table initialization are left alone, at least this time around. (This patch is for code in both the OMAP tree and mainline.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-12-10ARM: OMAP: switch to gpio_direction_inputDavid Brownell1-1/+1
More switchover to the cross-platform GPIO interface: use gpio_direction_input(), not an OMAP-specific call. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-12-10ARM: OMAP: switch to standard gpio get/set callsDavid Brownell1-1/+1
This patch replaces some legacy OMAP GPIO calls with the "new" (not really, any more!) calls that work on most platforms. The calls addressed by this patch are the simple ones to get and set values ... for code that's in mainline, including the implementations of those calls. Except for the declarations and definitions of those calls, all of these changes were performed by a simple SED script. Plus, a few "if() set() else set()" branches were merged by hand. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-12-10[MTD] [NAND] Set the fsl elbc ECCM according the settings in bootloader.Jason Jin1-1/+3
The ECCM maybe set in bootloader, Get ECCM settings from the bootloader, can avoid the image written by bootloader cannot read out by kernel. But the limitation of doing it this way is that, it could break large page NAND if it is written with NAND disabled in u-boot and read with NAND enabled, or vice versa. Signed-off-by: Jason Jin <Jason.jin@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] [NAND] remove excess kernel-doc notationRandy Dunlap1-1/+0
Delete extra kernel-doc notation for struct fields and function parameters that don't exist: Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'wq' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'datbuf' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'oobbuf' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'oobdirty' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'data_poi' description in 'nand_chip' Warning(drivers/mtd/nand/nand_base.c:2527): Excess function parameter 'maxchips' description in 'nand_scan_tail' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] physmap: fix leak of memory returned by parse_mtd_partitionsAtsushi Nemoto1-9/+8
The mtd partition parser returns an allocated pointer array of mtd_partition. The caller must free it. The array is used only for add_mtd_partitions(), so free it just after the call. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] drivers/mtd/maps/nettel.c: use ARRAY_SIZEJulia Lawall1-2/+1
ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type or the size of its first element. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @i@ @@ #include <linux/kernel.h> @depends on i using "paren.iso"@ type T; T[] E; @@ - (sizeof(E)/sizeof(E[...])) + ARRAY_SIZE(E) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] physmap: make physmap compat explicitMike Frysinger2-15/+18
The current method for always showing physmap compat address, size, and width is a bit confusing. If length is set to 0, then the address and width are still shown but silently unused. The physmap code itself already has logic which sets compat based on length, so just pull that out and into the Kconfig to make everything clear. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Bryan Wu <Bryan.Wu@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10Merge branch 'misc/mtd/sharpsl-nand' of ↵David Woodhouse1-125/+122
git://git.kernel.org/pub/scm/linux/kernel/git/lumag/tosa-2.6
2008-12-10[MTD] remove private wrapper of endian helpers in rfd_ftl.cHarvey Harrison1-4/+2
Base versions handle constant folding just fine. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10MTD: add MTD tests to compilationArtem Bityutskiy3-1/+16
Add MTD tests to Kconfig and Makefiles. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-10MTD: tests: add mtd_torturetestArtem Bityutskiy1-0/+530
This test is designed to work for very long time and it tries to wear few eraseblocks. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-10[MTD] Remove more strange u_intxx_t typesDavid Woodhouse1-1/+1
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Remove strange u_int32_t types from FTLDavid Woodhouse1-50/+50
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] [NAND] Remove strange u_int64_t types from nandsimDavid Woodhouse1-5/+5
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] update internal API to support 64-bit device sizeAdrian Hunter26-125/+161
MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. Extending the external API is a separate issue for several reasons. First, no one needs it at the moment. Secondly, whether the implementation is done with IOCTLs, sysfs or both is still debated. Thirdly external API changes require the internal API to be accepted first. Note that although the MTD API will be able to support 64-bit device sizes, existing drivers do not and are not required to do so, although NAND base has been updated. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats - division and modulus of 64-bit values - NAND base support - 32-bit local variables used by mtdpart and mtdconcat - naughtily assuming one structure maps to another in MEMERASE ioctl Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10MTD: nandsim: use less RAMAlexey Korolev1-7/+18
Nandsim consumes ~2x more RAM than the density of simulated device. It becomes critical if we need to simulate 256MB NAND and run stress tests on it. We investigated the reasons. nandsim allocates space for pages using kmalloc function. The size of LP nand page is 2112 bytes. kmalloc gets space from slab pools by chunks 2^n. So if we need to kmalloc 2112 bytes, 4096 bytes will be consumed by system. The best way to avoid this issue would be using kmem_cache allocations. AFAIK this mechanism specially designed to handle cases when arrays of allocations are used. Signed-off-by: Alexey Korolev <akorolev@infradead.org> Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10MTD: nandsim: add option to use a file to cache pagesAdrian Hunter1-24/+261
Add a new module parameter 'cache_file' which causes nandsim to use that file instead of memory to cache nand data. Using a file allows the simulation of NAND that is bigger than the available memory. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10MTD: nandsim: suppress unnecessary warningAdrian Hunter1-7/+11
nand_base sometimes reads only 2 bytes of a 4 byte id. It is OK. Do not print a warning in that case. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_impa7 staticDmitri Vorobiev1-1/+1
The function init_impa7 does not need to be global, and this patch makes it static by adding the needed keyword to drivers/mtd/maps/impa7.c. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_redwood_flash function staticDmitri Vorobiev1-1/+1
The function init_redwood_flash is needlessly defined global, make it static by this patch. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_msp_flash function staticDmitri Vorobiev1-1/+1
The function init_msp_flash, which is not used outside of drivers/mtd/maps/pmcmsp-flash.c, can become static. This patch adds the needed keyword. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make h720x_mtd_init function staticDmitri Vorobiev1-1/+1
The function h720x_mtd_init is not used outside of the file drivers/mtd/maps/h720x-flash.c and can therefore become static. This patch adds the necessary keyword. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_mbx function staticDmitri Vorobiev1-1/+1
The function init_mbx can become static, because it is not used outside the file drivers/mtd/maps/mbx860.c. This patch adds the needed keyword. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make the function init_vmax301 staticDmitri Vorobiev1-1/+1
The function init_vmax301 is needlessly defined global in drivers/mtd/maps/vmax301.c, and this patch makes it static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_fortunet function staticDmitri Vorobiev1-1/+1
The symbol init_fortunet is needlessly defined global in drivers/mtd/maps/fortunet.c. Make it static and clean up the kernel global namespace. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make alchemy_mtd_init function staticDmitri Vorobiev1-1/+1
The symbol alchemy_mtd_init does not need to be global, so make it static in drivers/mtd/maps/alchemy-flash.c. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make ipaq_mtd_init function staticDmitri Vorobiev1-1/+1
The symbol ipaq_mtd_init is not used anywhere outside of drivers/mtd/maps/ipaq-flash.c, so make it static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_dbox2_flash staticDmitri Vorobiev1-1/+1
The symbol init_dbox2_flash is not used outside of the file drivers/mtd/maps/dbox2-flash.c, so make it static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_flagadm function staticDmitri Vorobiev1-1/+1
The module init function init_flagadm does not need to be global, so add the needed keyword to drivers/mtd/maps/cfi_flagadm.c. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_oct5066 function staticDmitri Vorobiev1-1/+1
The function init_oct5066 is needlessly defined global in drivers/mtd/maps/octagon-5066.c. Make it static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make the init_edb7312nor function staticDmitri Vorobiev1-1/+1
The init_edb7312nor function is needlessly defined global in drivers/mtd/maps/edb7312.c, and this patch makes it static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_sbc82xx_flash function staticDmitri Vorobiev1-1/+1
The function init_sbc82xx_flash is needlessly defined global in drivers/mtd/maps/wr_sbc82xx_flash.c, and this patch makes it static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_rpxlite function staticDmitri Vorobiev1-1/+1
The function init_rpxlite, which is not used outside of drivers/mtd/maps/rpxlite.c, can become static. Add the needed keyword. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_tqm_mtd function staticDmitri Vorobiev1-1/+1
The init_tqm_mtd function does not need to be defined globally in drivers/mtd/maps/tqm8xxl.c. Make it static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make uclinux_mtd_cleanup and uclinux_mtd_init staticDmitri Vorobiev1-2/+2
The functions uclinux_mtd_cleanup and uclinux_mtd_init do not heed to be global. Add the needed keyword to the file drivers/mtd/maps/uclinux.c to make these functions static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make lart_flash_init, lart_flash_exit staticDmitri Vorobiev1-4/+2
The symbols lart_flash_init, lart_flash_exit are needlessly defined global in drivers/mtd/devices/lart.c, so make them static. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_sbc8240_mtd function staticDmitri Vorobiev1-1/+1
The function init_sbc8240_mtd is not called from outside the module drivers/mtd/maps/sbc8240.c where it is defined, so it can become static. Add the needed keyword. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] Make init_sharpsl symbol staticDmitri Vorobiev1-1/+1
The function init_sharpsl is needlessly defined global. Make it static by adding the needed keyword to the file drivers/mtd/maps/sharpsl-flash.c, where the function is defined. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10UBI: return -ENOMEM upon failing vmallocStefan Roese1-2/+3
Return with correct error code (-ENOMEM) from ubi_attach_mtd_dev() upon failing vmalloc(). Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-09Merge git://git.infradead.org/mtd-2.6Linus Torvalds6-41/+40
* git://git.infradead.org/mtd-2.6: [MTD] [NAND] fix OOPS accessing flash operations over STM flash on PXA [MTD] [NAND] drivers/mtd/nand/pasemi_nand.c: Add missing pci_dev_put [MTD] [NAND] fsl_upm: fix build problem with 2.6.28-rc2 [MTD] physmap: fix memory leak on physmap_flash_remove by using devres [MTD] m25p80: chip erase != block erase != sector erase [MTD] m25p80: fix detection of m25p16 flashes [MTD] m25p80: fix detection of SPI parts [MTD] [NAND] OMAP: OneNAND: header file relocation (part 2) [MTD] [NAND] OMAP: OneNAND: header file relocation
2008-12-08MTD: tests: add mtd_subpagetestArtem Bityutskiy1-0/+525
This tests makes sure sub-pages on NAND MTD device work fine. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-08MTD: tests: add mtd_stresstestArtem Bityutskiy1-0/+330
This test just performs random operations on random eraseblocks. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-08MTD: tests: add mtd_speedtestArtem Bityutskiy1-0/+502
This test examines I/O speed of the flash device. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>