aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2006-06-14[MTD] Restore MTD_ROM and MTD_RAM typesDavid Woodhouse9-9/+10
Let's not attempt the abolition of mtd->type until/unless it's properly thought through. And certainly, let's not do it by halves. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-14[MTD] assume mtd->writesize is 1 for NOR flashesArtem B. Bityutskiy8-3/+13
Signed-off-by: Artem B. Bityitskiy
2006-06-10[MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compilesDavid Woodhouse1-5/+5
Fix the control bit handling so it even looks like it might work, too. Bad tglx. No biscuit. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-09[MTD] Prepare physmap for 64-bit-resourcesAndrew Morton1-3/+3
Fallout from the incoming 64-bit-resource stuff: drivers/mtd/maps/physmap.c: In function 'physmap_flash_probe': drivers/mtd/maps/physmap.c:94: warning: format '%.8lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' drivers/mtd/maps/physmap.c:94: warning: format '%.8lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-09[JFFS2] Fix more breakage caused by janitorial meddling.David Woodhouse1-2/+2
jffs2_zlib_exit() and free_workspaces() shouldn't be marked __exit because they get called in the error case from the init functions. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-03[JFFS2] Remove stray __exit from jffs2_compressors_exit()David Woodhouse1-1/+1
It's used from the initfunc in case of failure too. We could actually do with an '__initexit' for this kind of thing -- when built in to the kernel, it could do with being dropped with the init text. We _could_ actually just use __init for it, but that would break if/when we start dropping init text from modules. So let's just leave it as it was for now, and mutter a little more about random 'janitorial' fixes from people who aren't paying attention to what they're doing. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-30[MTD] Allow alternate JFFS2 mount variant for root filesystem.Joern Engel1-0/+4
With this patch, "root=mtd3" and "root=mtd:foo" work for a JFFS2 rootfs. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30[MTD] Disconnect struct mtd_info from ABIJoern Engel1-1/+10
mtdchar.c direcly copied part of struct mtd_info to userspace, thereby implicitly making it part of the ABI. With this patch, struct mtd_info is independent of the ABI and can have its fields removed, reordered, etc. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30[MTD] replace MTD_RAM with MTD_GENERIC_TYPEJoern Engel9-10/+10
Ram devices get the extra capability of MTD_NO_ERASE - not requiring an explicit erase before writing to it. Currently only mtdblock uses this capability. Rest of the patch is a simple text replacement. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30[MTD] replace MTD_ROM with MTD_GENERIC_TYPEJoern Engel2-5/+3
No mtd user should ever check for the device type. Instead, device features should be checked by the flags - if at all. As a first step towards type removal, change MTD_ROM into MTD_GENERIC_TYPE. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30[MTD] remove a forgotten MTD_XIPJoern Engel1-1/+1
MTD_XIP definition was removed in an earlier patch. This invocation was left by mistake. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30[MTD] Fix build warnings (and debug build error) in nand_base.cAndrew Morton1-4/+4
drivers/mtd/nand/nand_base.c: In function 'nand_transfer_oob': drivers/mtd/nand/nand_base.c:909: warning: comparison of distinct pointer types lacks a cast drivers/mtd/nand/nand_base.c: In function 'nand_do_read_oob': drivers/mtd/nand/nand_base.c:1097: error: 'len' undeclared (first use in this function) drivers/mtd/nand/nand_base.c:1097: error: (Each undeclared identifier is reported only once drivers/mtd/nand/nand_base.c:1097: error: for each function it appears in.) drivers/mtd/nand/nand_base.c: In function 'nand_fill_oob': drivers/mtd/nand/nand_base.c:1411: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-30[JFFS2] Preallocate node refs for cleanmarker in summary scanDavid Woodhouse1-5/+8
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-30[JFFS2] Fix calculation of potential summary marker offset on NOR flash.David Woodhouse1-1/+1
Helps if we look _inside_ the buffer, rather than adding jeb->offset to it. Doh. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-30[MTD] NAND Expose the new raw mode function and status info to userspaceThomas Gleixner7-98/+259
The raw read/write access to NAND (without ECC) has been changed in the NAND rework. Expose the new way - setting the file mode via ioctl - to userspace. Also allow to read out the ecc statistics information so userspace tools can see that bitflips happened and whether errors where correctable or not. Also expose the number of bad blocks for the partition, so nandwrite can check if the data fits into the parition before writing to it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Signal that a bitflip was corrected by ECCThomas Gleixner6-24/+46
Return -EUCLEAN on read when a bitflip was detected and corrected, so the clients can react and eventually copy the affected block to a spare one. Make all in kernel users aware of the change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] Rework the out of band handling completelyThomas Gleixner18-590/+1028
Hopefully the last iteration on this! The handling of out of band data on NAND was accompanied by tons of fruitless discussions and halfarsed patches to make it work for a particular problem. Sufficiently annoyed by I all those "I know it better" mails and the resonable amount of discarded "it solves my problem" patches, I finally decided to go for the big rework. After removing the _ecc variants of mtd read/write functions the solution to satisfy the various requirements was to refactor the read/write _oob functions in mtd. The major change is that read/write_oob now takes a pointer to an operation descriptor structure "struct mtd_oob_ops".instead of having a function with at least seven arguments. read/write_oob which should probably renamed to a more descriptive name, can do the following tasks: - read/write out of band data - read/write data content and out of band data - read/write raw data content and out of band data (ecc disabled) struct mtd_oob_ops has a mode field, which determines the oob handling mode. Aside of the MTD_OOB_RAW mode, which is intended to be especially for diagnostic purposes and some internal functions e.g. bad block table creation, the other two modes are for mtd clients: MTD_OOB_PLACE puts/gets the given oob data exactly to/from the place which is described by the ooboffs and ooblen fields of the mtd_oob_ops strcuture. It's up to the caller to make sure that the byte positions are not used by the ECC placement algorithms. MTD_OOB_AUTO puts/gets the given oob data automaticaly to/from the places in the out of band area which are described by the oobfree tuples in the ecclayout data structre which is associated to the devicee. The decision whether data plus oob or oob only handling is done depends on the setting of the datbuf member of the data structure. When datbuf == NULL then the internal read/write_oob functions are selected, otherwise the read/write data routines are invoked. Tested on a few platforms with all variants. Please be aware of possible regressions for your particular device / application scenario Disclaimer: Any whining will be ignored from those who just contributed "hot air blurb" and never sat down to tackle the underlying problem of the mess in the NAND driver grown over time and the big chunk of work to fix up the existing users. The problem was not the holiness of the existing MTD interfaces. The problems was the lack of time to go for the big overhaul. It's easy to add more mess to the existing one, but it takes alot of effort to go for a real solution. Improvements and bugfixes are welcome! Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] Remove silly MTD_WRITE/READ macrosThomas Gleixner9-179/+195
Most of those macros are unused and the used ones just obfuscate the code. Remove them and fixup all users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Replace oobinfo by ecclayoutThomas Gleixner20-99/+134
The nand_oobinfo structure is not fitting the newer error correction demands anymore. Replace it by struct nand_ecclayout and fixup the users all over the place. Keep the nand_oobinfo based ioctl for user space compability reasons. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Consolidate oobinfo handlingThomas Gleixner7-28/+9
The info structure for out of band data was copied into the mtd structure. Make it a pointer and remove the ability to set it from userspace. The position of ecc bytes is defined by the hardware and should not be changed by software. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Fix platform structure and NDFC driverThomas Gleixner3-6/+7
The platform structure was lacking an oobinfo field. The NDFC driver had some remains from another tree. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] Fix debug printk format warning in m25p80 SPI chip driver, again.Andrew Morton1-1/+1
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-29[MTD] AMD Geode NAND support can depend on X86_32; we won't see it on x86_64David Woodhouse1-1/+1
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-29[JFFS2] Preallocate raw_node_refs in a couple of missing places in scanDavid Woodhouse1-2/+7
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-28[JFFS2] Fix oops when marking space dirty in scan, but no previous node exists.David Woodhouse1-1/+1
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-27[JFFS2] Fix wbuf recovery of f->metadata->raw node.David Woodhouse1-1/+5
A data node might not be in the fraglist; it could be f->metadata. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-27[MTD] NAND Consolidate references and add back default name settingThomas Gleixner1-7/+10
We have a type pointer. Make use of it instead of the error prone nand_ids[i] reference. The NAND driver used to set default name settings from the chip ID string for the device. The feature got lost during the rework. Add it back. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-27[MTD] NAND simplify nand_chip_selectThomas Gleixner1-2/+0
nCE setting can be done when the first command is issued to the device. We keep the deselect functionality as it makes sense to deassert nCE when the device becomes idle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-26[MTD] Fix thinko in nand_write_page_hwecc()David Woodhouse1-1/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-26[JFFS2] Switch to using an array of jffs2_raw_node_refs instead of a list.David Woodhouse9-225/+351
This allows us to drop another pointer from the struct jffs2_raw_node_ref, shrinking it to 8 bytes on 32-bit machines (if the TEST_TOTLEN) paranoia check is turned off, which will be committed soon). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-26[MTD] NAND modularize write functionThomas Gleixner7-548/+308
Modularize the write function and reorganaize the internal buffer management. Remove obsolete chip options and fixup all affected users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-26[MTD] Remove PCI dependency for Geode CS553[56] NAND controller.David Woodhouse2-4/+31
PCI is faked on these devices by SMM traps. Don't depend on that -- check for the chipset directly instead. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] Fix 64-bit size_t problems in XATTR code.David Woodhouse2-15/+15
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[MTD] Fix NAND_VERIFY_WRITE case to build with tglx's recent changesDavid Woodhouse1-4/+4
Bad tglx. No biscuit. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[MTD] Remove the only useless readv implementationThomas Gleixner2-33/+0
Removing readv from struct mtd_info broke block2mtd. Remove the reference and the useless default implementation. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25[MTD] NAND Modularize read functionThomas Gleixner4-255/+275
Split the core of the read function out and implement seperate handling functions for software and hardware ECC. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25[MTD] NAND Add read/write function pointers to struct nand_ecc_ctrlThomas Gleixner1-0/+13
Add read/write function pointers to struct nand_ecc_ctrl to prepare the modulaization of nand_read/write functions. The current implementation handles every type of ecc mode software/hardware and all kinds of strange ecc placement schemes in one switch/if construct. Thats too complex to maintain and too inflexible to expand. Modularization will also shorten the code pathes of the read/write functions. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25[MTD] Add ECC statistics to struct mtd_infoThomas Gleixner1-0/+14
FLASH - especially NAND FLASH - will become less reliable and bit flips more likely. Add an ECC statistics struct to struct mtd_info to keep track of this. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25[MTD] NAND Cleanup oob functionsThomas Gleixner1-75/+81
Cleanup the code in the oob related functions and make use of the new NO_READRDY flag. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25[MTD] NAND Introduce NAND_NO_READRDY optionThomas Gleixner2-77/+92
The nand driver has a superflous read ready / command delay in the read functions. This was added to handle chips which have an automatic read forward. Newer chips do not have this functionality anymore. Add this option to avoid the delay / I/O operation. Mark all large page chips with the new option flag. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25[MTD] NAND Initialize controller lock and wq only onceThomas Gleixner2-4/+9
The lock simplifying patch did not move the lock and waitqueue initialization into the controller allocation patch. This reinitializes waitqueue and spinlocks also for driver supplied controller stuctures. Move it into the allocation path. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25[JFFS2] Fix and improve debugging output during scan.David Woodhouse2-5/+5
Print wasted_size in scanned eraseblocks, print range correctly for summary dirent and inode entries. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] Add 'jeb' argument to jffs2_prealloc_raw_node_refs()David Woodhouse7-14/+16
Preallocation of refs is shortly going to be a per-eraseblock thing, rather than per-filesystem. Add the required argument to the function. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] Correctly handle wasted space before summary node.David Woodhouse1-2/+2
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] jffs2_free_all_node_refs() doesn't free them all. Rename it.David Woodhouse4-5/+5
... to jffs2_free_jeb_node_refs() since that's what it does. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[JFFS2] Allocate node_ref for wasted space when skipping to page boundaryDavid Woodhouse1-5/+2
One more place where we were changing the accounting info without actually allocating a ref for the lost space... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-24[MTD] NAND fix cmd_ctrl breakageThomas Gleixner1-5/+10
The cmd_ctrl rework lacks some state transition flags. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-24[MTD] NAND coding style and namespace cleanupThomas Gleixner1-534/+520
Cleanup the functions which are not going to change in the next steps. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-24[JFFS2] Revert Artem's Bunkage in debug messages.David Woodhouse1-2/+2
Random unthinking 'cleanup' caused debug messages like this: Obsoleting node at 0x0006daf4 of len 0x3a4: <7>Dirtying If messages are continuation of an existing line, they don't need to be prefixed with KERN_DEBUG. THINK. Or you will be replaced by a small shell script. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-24Merge branch 'master' of git://git.infradead.org/~gleixner/mtd-nand-2.6.gitDavid Woodhouse32-1515/+666