summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [JFFS2] Switch to using an array of jffs2_raw_node_refs instead of a list.David Woodhouse2006-05-269-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>
* [MTD] NAND modularize write functionThomas Gleixner2006-05-267-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>
* [MTD] Remove PCI dependency for Geode CS553[56] NAND controller.David Woodhouse2006-05-262-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>
* [JFFS2] Fix 64-bit size_t problems in XATTR code.David Woodhouse2006-05-252-15/+15
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix NAND_VERIFY_WRITE case to build with tglx's recent changesDavid Woodhouse2006-05-251-4/+4
| | | | | | Bad tglx. No biscuit. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Remove the only useless readv implementationThomas Gleixner2006-05-252-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>
* [MTD] NAND Modularize read functionThomas Gleixner2006-05-254-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>
* [MTD] NAND Add read/write function pointers to struct nand_ecc_ctrlThomas Gleixner2006-05-251-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>
* [MTD] Add ECC statistics to struct mtd_infoThomas Gleixner2006-05-251-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>
* [MTD] NAND Cleanup oob functionsThomas Gleixner2006-05-251-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>
* [MTD] NAND Introduce NAND_NO_READRDY optionThomas Gleixner2006-05-252-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>
* [MTD] NAND Initialize controller lock and wq only onceThomas Gleixner2006-05-252-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>
* [JFFS2] Fix and improve debugging output during scan.David Woodhouse2006-05-252-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>
* [JFFS2] Add 'jeb' argument to jffs2_prealloc_raw_node_refs()David Woodhouse2006-05-257-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>
* [JFFS2] Correctly handle wasted space before summary node.David Woodhouse2006-05-251-2/+2
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [JFFS2] jffs2_free_all_node_refs() doesn't free them all. Rename it.David Woodhouse2006-05-254-5/+5
| | | | | | ... to jffs2_free_jeb_node_refs() since that's what it does. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [JFFS2] Allocate node_ref for wasted space when skipping to page boundaryDavid Woodhouse2006-05-251-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>
* [MTD] NAND fix cmd_ctrl breakageThomas Gleixner2006-05-241-5/+10
| | | | | | The cmd_ctrl rework lacks some state transition flags. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] NAND coding style and namespace cleanupThomas Gleixner2006-05-241-534/+520
| | | | | | | Cleanup the functions which are not going to change in the next steps. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Revert Artem's Bunkage in debug messages.David Woodhouse2006-05-241-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>
* Merge branch 'master' of git://git.infradead.org/~gleixner/mtd-nand-2.6.gitDavid Woodhouse2006-05-2432-1515/+666
|\
| * [MTD] NAND LED support cleanupThomas Gleixner2006-05-231-2/+6
| | | | | | | | | | | | | | Move the define out of the middle of the code and add an appropriate comment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] NAND remove write_byte/word function from nand_chipThomas Gleixner2006-05-237-93/+14
| | | | | | | | | | | | | | | | The previous change of the command / hardware control allows to remove the write_byte/word functions completely, as their only user were nand_command and nand_command_lp. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] Refactor NAND hwcontrol to cmd_ctrlThomas Gleixner2006-05-2318-543/+430
| | | | | | | | | | | | | | | | | | | | | | | | The hwcontrol function enforced a step by step state machine for any kind of hardware chip access. Let the hardware driver know which control bits are set and inform it about a change of the control lines. Let the hardware driver write out the command and address bytes directly. This gives a peformance advantage for address bus controlled chips and simplifies the quirks in the hardware drivers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] Export nand_write_rawThomas Gleixner2006-05-231-0/+1
| | | | | | | | | | | | | | The previous _ecc removal / cleanup broke (i)nftl module usage. Export the missing symbol. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] Mark NAND drivers TOTO and PPChameleon brokenThomas Gleixner2006-05-231-2/+2
| | | | | | | | | | | | Both drivers can not be fixed and compiled due to missing header files. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] Remove read/write _ecc variantsThomas Gleixner2006-05-2315-404/+209
| | | | | | | | | | | | | | MTD clients are agnostic of FLASH which needs ECC suppport. Remove the functions and fixup the callers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] Remove readv/readv_eccThomas Gleixner2006-05-234-37/+1
| | | | | | | | | | | | | | These functions were never implemented and added only bloat to partition and concat code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] Remove nand writev supportThomas Gleixner2006-05-236-434/+3
| | | | | | | | | | | | NAND writev(_ecc) support is not longer necessary. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] ECC rework broke diskonchipThomas Gleixner2006-05-231-1/+1
| | | | | | | | | | | | Fix the diskonchip ecc setup. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] NAND ECC hwctl function has no return valueThomas Gleixner2006-05-231-1/+1
| | | | | | | | | | | | Fix the broken prototype Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Introduce ref_next() macro for finding next physical nodeDavid Woodhouse2006-05-246-30/+31
| | | | | | | | | | | | Another part of the preparation for switching to an array... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [JFFS2] Reduce visibility of raw_node_ref to upper layers of JFFS2 code.David Woodhouse2006-05-2412-349/+204
|/ | | | | | | | | | | | | As the first step towards eliminating the ref->next_phys member and saving memory by using an _array_ of struct jffs2_raw_node_ref per eraseblock, stop the write functions from allocating their own refs; have them just _reserve_ the appropriate number instead. Then jffs2_link_node_ref() can just fill them in. Use a linked list of pre-allocated refs in the superblock, for now. Once we switch to an array, it'll just be a case of extending that array. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/Thomas Gleixner2006-05-2332-415/+357
|\ | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Remove flash offset argument from various functions.David Woodhouse2006-05-239-115/+135
| | | | | | | | | | | | | | | | We don't need the upper layers to deal with the physical offset. It's _always_ c->nextblock->offset + c->sector_size - c->nextblock->free_size so we might as well just let the actual write functions deal with that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] Introduce MTD_BIT_WRITEABLEJoern Engel2006-05-226-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | o Add a flag MTD_BIT_WRITEABLE for devices that allow single bits to be cleared. o Replace MTD_PROGRAM_REGIONS with a cleared MTD_BIT_WRITEABLE flag for STMicro and Intel Sibley flashes with internal ECC. Those flashes disallow clearing of single bits, unlike regular NOR flashes, so the new flag models their behaviour better. o Remove MTD_ECC. After the STMicro/Sibley merge, this flag is only set and never checked. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * [MTD] Merge STMicro NOR_ECC code with Intel Sibley codeJoern Engel2006-05-224-56/+6
| | | | | | | | | | | | | | | | | | In 2002, STMicro started producing NOR flashes with internal ECC protection for small blocks (8 or 16 bytes). Support for those flashes was added by me. In 2005, Intel Sibley flashes copied this strategy and Nico added support for those. Merge the code for both. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * [MTD] Introduce writesizeJoern Engel2006-05-2217-114/+117
| | | | | | | | | | | | | | | | At least two flashes exists that have the concept of a minimum write unit, similar to NAND pages, but no other NAND characteristics. Therefore, rename the minimum write unit to "writesize" for all flashes, including NAND. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * [MTD] Use single flag to mark writeable devices.Joern Engel2006-05-221-6/+4
| | | | | | | | | | | | | | | | | | Two flags exist to decide whether a device is writeable or not. None of those two flags is checked for independently, so they are clearly redundant, if not an invitation to bugs. This patch removed both of them, replacing them with a single new flag. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * [JFFS2] Put list of nodes in common part of ic/x_ref/x_datum structureDavid Woodhouse2006-05-222-24/+34
| | | | | | | | | | | | | | | | | | | | We'll be using a proper list of nodes in the jffs2_xattr_datum and jffs2_xattr_ref structures, because the existing code to overwrite them is just broken. Put it in the common part at the front of the structure which is shared with the jffs2_inode_cache, so that the jffs2_link_node_ref() function can do the right thing. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Add some preemptive BUG checks for XATTR codeDavid Woodhouse2006-05-222-0/+5
| | | | | | | | | | | | | | | | In a couple of places, we assume that what's at the end of the ->next_in_ino list is a struct jffs2_inode_cache. Let's check for that, since we expect it to change soon. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [JFFS2] Extend jffs2_link_node_ref() to link into per-inode list too.David Woodhouse2006-05-2210-91/+53
| | | | | | | | | | | | | | | | | | | | | | Let's avoid the potential for forgetting to set ref->next_in_ino, by doing it within jffs2_link_node_ref() instead. This highlights the ugliness of what we're currently doing with xattr_datum and xattr_ref structures -- we should find a nicer way of dealing with that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] NAND modularize ECCThomas Gleixner2006-05-2316-166/+131
| | | | | | | | | | | | | | | | First step of modularizing ECC support. - Move ECC related functionality into a seperate embedded data structure - Get rid of the hardware dependend constants to simplify new ECC models Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] NAND cleanup nand_scanThomas Gleixner2006-05-231-174/+233
| | | | | | | | | | | | | | | | Seperate functionality out of nand_scan so the code is more readable. No functional change. First step of simplifying the nand driver. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] NAND consolidate data typesThomas Gleixner2006-05-232-64/+64
| | | | | | | | | | | | | | The NAND driver used a mix of unsigned char, u_char amd uint8_t data types. Consolidate to uint8_t usage Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] NAND whitespace and formatting cleanupThomas Gleixner2006-05-232-111/+96
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [JFFS2] Simplify writebuffer handlingThomas Gleixner2006-05-231-170/+102
| | | | | | | | | | | | | | | | | | | | The writev based write buffer implementation was far to complex as in most use cases the write buffer had to be handled anyway. Simplify the write buffer handling and use mtd->write instead. From extensive testing no performance impact has been noted. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] Add support for NDFC NAND controllerThomas Gleixner2006-05-234-0/+390
| | | | | | | | | | | | | | NDFC NAND Flash controller is embedded in PPC EP44x SoCs. Add platform driver based support. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] Add platform support for NANDThomas Gleixner2006-05-231-0/+47
| | | | | | | | | | | | | | Add the data structures necessary to provide platform device support for NAND Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] Simplify NAND lockingThomas Gleixner2006-05-232-41/+47
| | | | | | | | | | | | | | | | Replace the chip lock by a the controller lock. For simple drivers a dummy controller structure is created by the scan code. This simplifies the locking algorithm in nand_get/release_chip(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
OpenPOWER on IntegriCloud