aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2008-02-14Introduce path_put()Jan Blunck
* Add path_put() functions for releasing a reference to the dentry and vfsmount of a struct path in the right order * Switch from path_release(nd) to path_put(&nd->path) * Rename dput_path() to path_put_conditional() [akpm@linux-foundation.org: fix cifs] Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Cc: <linux-fsdevel@vger.kernel.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14Embed a struct path into struct nameidata instead of nd->{dentry,mnt}Jan Blunck
This is the central patch of a cleanup series. In most cases there is no good reason why someone would want to use a dentry for itself. This series reflects that fact and embeds a struct path into nameidata. Together with the other patches of this series - it enforced the correct order of getting/releasing the reference count on <dentry,vfsmount> pairs - it prepares the VFS for stacking support since it is essential to have a struct path in every place where the stack can be traversed - it reduces the overall code size: without patch series: text data bss dec hex filename 5321639 858418 715768 6895825 6938d1 vmlinux with patch series: text data bss dec hex filename 5320026 858418 715768 6894212 693284 vmlinux This patch: Switch from nd->{dentry,mnt} to nd->path.{dentry,mnt} everywhere. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: fix cifs] [akpm@linux-foundation.org: fix smack] Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-09[MTD] [NAND] cs553x_nand: command line partitioning supportMart Raudsepp
Implements kernel command line partitioning support for the CS5535/CS5536 chipsets driver. For that the following is done: * cs553x_cleanup(): try the cleanup for all chip selects to not leak memory * Assign a unique name for each chip select to be separately addressable in the command line mtd-id portion(s) * Use the already defined PIN_OPT_IDE constant where appropriate for readability * Include command line partitioning support when CONFIG_MTD_PARTS is set Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07Merge git://git.infradead.org/mtd-2.6Linus Torvalds
* git://git.infradead.org/mtd-2.6: (120 commits) [MTD] Fix mtdoops.c compilation [MTD] [NOR] fix startup lock when using multiple nor flash chips [MTD] [DOC200x] eccbuf is statically defined and always evaluate to true [MTD] Fix maps/physmap.c compilation with CONFIG_PM [MTD] onenand: Add panic_write function to the onenand driver [MTD] mtdoops: Use the panic_write function when present [MTD] Add mtd panic_write function pointer [MTD] [NAND] Freescale enhanced Local Bus Controller FCM NAND support. [MTD] physmap.c: Add support for multiple resources [MTD] [NAND] Fix misparenthesization introduced by commit 78b65179... [MTD] [NAND] Fix Blackfin NFC ECC calculating bug with page size 512 bytes [MTD] [NAND] Remove wrong operation in PM function of the BF54x NFC driver [MTD] [NAND] Remove unused variable in plat_nand_remove [MTD] Unlocking all Intel flash that is locked on power up. [MTD] [NAND] at91_nand: Make mtdparts option can override board info [MTD] mtdoops: Various minor cleanups [MTD] mtdoops: Ensure sequential write to the buffer [MTD] mtdoops: Perform write operations in a workqueue [MTD] mtdoops: Add further error return code checking [MTD] [NOR] Test devtype, not definition in flash_probe(), drivers/mtd/devices/lart.c ...
2008-02-07[MTD] Fix mtdoops.c compilationDavid Woodhouse
drivers/mtd/mtdoops.c: In function ‘mtdoops_console_sync’: drivers/mtd/mtdoops.c:329: error: implicit declaration of function ‘in_interrupt’ Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] [NOR] fix startup lock when using multiple nor flash chipsRizzo Davide
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=9829 I found and solved the problem, at line 115 of drivers/mtd/chips/gen_probe.c (kernel 2.6.24): mapsize value must be calculated in bytes, not in long. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] [DOC200x] eccbuf is statically defined and always evaluate to trueSamuel Tardieu
Signed-off-by: Samuel Tardieu <sam@rfc1149.net> Acked-by: Joern Engel <joern@logfs.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] Fix maps/physmap.c compilation with CONFIG_PMakpm@linux-foundation.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] onenand: Add panic_write function to the onenand driverRichard Purdie
Implement the panic_write function for the onenand driver. This waits for any active command to complete/timeout, performs the write, waits for it to complete and then returns. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] mtdoops: Use the panic_write function when presentRichard Purdie
When the MTD provides a panic_write function, use it. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] Add mtd panic_write function pointerRichard Purdie
MTDs are well suited for logging critical data and the mtdoops driver allows kernel panics/oops to be written to flash in a blackbox flight recorder fashion allowing better debugging and analysis of crashes. Any kernel oops in user context can be easily handled since the kernel continues as normal and any queued mtd writes are scheduled. Any kernel oops in interrupt context results in a panic and the delayed writes will not be scheduled however. The existing mtd->write function cannot be called in interrupt context so these messages can never be written to flash. This patch adds a panic_write function pointer that drivers can optionally implement which can be called in interrupt context. It is only intended to be called when its known the kernel is about to panic and we need to write to succeed. Since the kernel is not going to be running for much longer, this function can break locks and delay to ensure the write succeeds (but not sleep). Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] [NAND] Freescale enhanced Local Bus Controller FCM NAND support.Scott Wood
Signed-off-by: Nick Spence <nick.spence@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-06Claim maintainership for block2mtd and update email addressesJoern Engel
I have been prime author and maintainer of block2mtd from day one, but neither MAINTAINERS nor the module source makes this fact clear. And while I'm at it, update my email addresses tree-wide, as the old address currently bounces and change my name to "joern" as unicode will likely continue to cause trouble until the end of this century. Signed-off-by: Joern Engel <joern@lazybastard.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-03drivers/mtd/: Spelling fixesJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03Spelling fixes: lenght->lengthPaulius Zaleckas
Signed-off-by: Paulius Zaleckas <pauliusz@yahoo.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03fix typo 'the same the\>'Uwe Kleine-König
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03[MTD] physmap.c: Add support for multiple resourcesStefan Roese
This patch extends the physmap mapping driver to support multiple resources for non-identical NOR chips that will be concatenated together when selected. This is needed for example for Intel 48F4400 512MBit chips, since they consist of 2 single different NOR chips with different geometries. The first (lower) one has botton boot sectors and the 2nd (upper) has top boot sectors. This currently isn't handled correctly by calling the physmap driver once with only one resource covering both chips in one memory region. The same geometrie is used for both chips. With this patch the following resource structure can be used to describe the 48F4400 chip correctly: static struct resource board_nor_resource[] = { [0] = { .start = 0xf8000000, .end = 0xfbffffff, .flags = IORESOURCE_MEM, }, [1] = { .start = 0xfc000000, .end = 0xffffffff, .flags = IORESOURCE_MEM, } }; Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] [NAND] Fix misparenthesization introduced by commit 78b65179...Scott Wood
Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03Merge git://git.infradead.org/~dedekind/ubi-2.6David Woodhouse
2008-02-03[MTD] [NAND] Fix Blackfin NFC ECC calculating bug with page size 512 bytesBryan Wu
Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] [NAND] Remove wrong operation in PM function of the BF54x NFC driverBryan Wu
There is no suspend/resume operation in NFC driver at all, currently. Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] [NAND] Remove unused variable in plat_nand_removeLi Zefan
With CONFIG_MTD_PARTITIONS not set, got this: drivers/mtd/nand/plat_nand.c:113: warning: unused variable 'pdata' Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03Merge git://git.infradead.org/~kmpark/onenand-mtd-2.6David Woodhouse
2008-02-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitDavid Woodhouse
2008-02-03[MTD] Unlocking all Intel flash that is locked on power up.Justin Treon
Patch for unlocking all Intel flash that has instant locking on power up. The patch has been tested on Intel M18, P30 and J3D Strata Flash. 1. The automatic unlocking can be disabled for a particular partition in the map or the command line. a. For the bit mask in the map it should look like: .mask_flags = MTD_POWERUP_LOCK, b. For the command line parsing it should look like: mtdparts=0x80000(bootloader)lk 2. This will only unlock parts with instant individual block locking. Intel parts with legacy unlocking will not be unlocked. Signed-off-by: Justin Treon <justin_treon@yahoo.com> Signed-off-by: Jared Hulbert <jaredeh@gmail.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] [NAND] at91_nand: Make mtdparts option can override board infoAtsushi Nemoto
Call parse_mtd_partitions before checking board's partition_info, so that "mtdparts=" option can override board's default setting. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] mtdoops: Various minor cleanupsRichard Purdie
Various minor cleaups to mtdoops: * Don't support the mtd->erasesize < OOPS_PAGE_SIZE case * Tweak printks and make the device mtdoops connects to more visible * CON_PRINTBUFFER flag is uneeded Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] mtdoops: Ensure sequential write to the bufferRichard Purdie
Add a spinlock to ensure writes to the mtdoops buffer memory are sequential and don't race. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] mtdoops: Perform write operations in a workqueueRichard Purdie
Writing to the flash needs to be done in a workqueue. The console write functions may be called in any context which can lead to lockups otherwise. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] mtdoops: Add further error return code checkingRichard Purdie
Add further error return code checks to the mtdoops driver. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] [NOR] Test devtype, not definition in flash_probe(), ↵Roel Kluin
drivers/mtd/devices/lart.c drivers/mtd/devices/lart.c:119:#define FLASH_DEVICE_16mbit_BOTTOM 0x88f488f4 As was, unless "manufacturer != FLASH_MANUFACTURER" this returned true Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[UBI] drivers/mtd/ubi/scan.c: fix uninitialized var warningakpm@linux-foundation.org
drivers/mtd/ubi/scan.c: In function 'ubi_scan': drivers/mtd/ubi/scan.c:772: warning: 'ec' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[UBI] drivers/mtd/ubi/wl.c: fix uninitialized var warningakpm@linux-foundation.org
drivers/mtd/ubi/wl.c:746: warning: 'pe' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[UBI] drivers/mtd/ubi/cdev.c: unused varakpm@linux-foundation.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] Factor out OF partition support from the NOR driver.Scott Wood
Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] jedec probe: drop unnecessary forward declarationsIlpo Järvinen
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-03[MTD] JEDEC probe: kill some inline bloatIlpo Järvinen
$ codiff $OBJ.old $OBJ drivers/mtd/chips/jedec_probe.c: cfi_jedec_setup | -320 jedec_probe_chip | -7073 2 functions changed, 7393 bytes removed, diff: -7393 drivers/mtd/chips/jedec_probe.c: jedec_reset | +1151 1 function changed, 1151 bytes added, diff: +1151 drivers/mtd/chips/jedec_probe.o: 3 functions changed, 1151 bytes added, 7393 bytes removed, diff: -6242 Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-01UBI: do not flush queue on each vtbl changeArtem Bityutskiy
This is just not necessary. We re-write whole layout copy, so the old contents cannot show up again sice scan process will drop it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-29[MTD] [OneNAND] Use pre-alloced oob buffer instead of local bufferKyungmin Park
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Use the u_char instead of char in oobbufSheng Yongjie (Sam
In function onenand_verify_oob, local variable oobbuf shall be unsigned char. In the case of a value is >= 0x80, it's unequal in comparing the value in an unsigned char and signed char. Signed-off-by: Sheng Yongjie (Sam) <samsheng@trident.com.cn> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Check the initial bad block using ONENAND_CTRL_ERRORKyungmin Park
Some chips don't set the ONENAND_CTRL_LOAD bit. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Get correct density from device IDKyungmin Park
Use the higher bits for other purpose. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Consolidate OneNAND operation orderKyungmin Park
Consolidate OneNAND operation order as OneNAND Spec. It also doesn't break previous operation order. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] fix call to onenand_verify when writing subpagesAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Do not release chip twiceAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-26[MTD] [NAND] fix s3c2410 error correctionMatt Reimer
The single-bit error correction was, well, incorrect. For determing which bit to correct it was using P1' P2' P4' P8' instead of P1 P2 P4 P8, and it was using P16' P32' P64' P128' P256' P512' P1024' P2048' instead of P16 P32 P64 P128 P256 P512 P1024 P2048. Signed-off-by: Matt Reimer <mreimer@vpop.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-01-25UBI: implement atomic LEB change ioctlArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-25UBI: handle zero-length caseArtem Bityutskiy
ubi_eba_atomic_leb_change() has to just map the LEB to a free PEB if data length is zero. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-25UBI: simplify internal interfacesArtem Bityutskiy
Instead of passing vol_id to all functions and then find struct ubi_volume, pass struct ubi_volume pointer. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-25UBI: do not change file pointer while updatingArtem Bityutskiy
Since we do not change semantics of seek(), changing the file pointer while updating does not make much sense. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>