- 30 5月, 2006 1 次提交
-
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
- 29 5月, 2006 4 次提交
-
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
- 27 5月, 2006 4 次提交
-
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 David Woodhouse 提交于
Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Thomas Gleixner 提交于
Modularize the write function and reorganaize the internal buffer management. Remove obsolete chip options and fixup all affected users. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 25 5月, 2006 6 次提交
-
-
由 David Woodhouse 提交于
Bad tglx. No biscuit. Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 Thomas Gleixner 提交于
Split the core of the read function out and implement seperate handling functions for software and hardware ECC. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
Cleanup the code in the oob related functions and make use of the new NO_READRDY flag. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
The cmd_ctrl rework lacks some state transition flags. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
Cleanup the functions which are not going to change in the next steps. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 24 5月, 2006 4 次提交
-
-
由 Thomas Gleixner 提交于
Move the define out of the middle of the code and add an appropriate comment. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
The previous _ecc removal / cleanup broke (i)nftl module usage. Export the missing symbol. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 23 5月, 2006 10 次提交
-
-
由 Thomas Gleixner 提交于
MTD clients are agnostic of FLASH which needs ECC suppport. Remove the functions and fixup the callers. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
These functions were never implemented and added only bloat to partition and concat code. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
NAND writev(_ecc) support is not longer necessary. Remove it. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
The NAND driver used a mix of unsigned char, u_char amd uint8_t data types. Consolidate to uint8_t usage Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
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: NThomas Gleixner <tglx@linutronix.de>
-
由 Joern Engel 提交于
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: NJoern Engel <joern@wh.fh-wedel.de>
-
由 Joern Engel 提交于
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: NJoern Engel <joern@wh.fh-wedel.de>
-
- 14 5月, 2006 3 次提交
-
-
由 David Woodhouse 提交于
Make it work even with compilers which lack the wit to notice that THIS_MODULE is always non-NULL. Use #ifdef MODULE instead. It's only a temporary debugging check anyway. Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 David Woodhouse 提交于
The _board_ driver needs to be mtd->owner, and it in turn pins the nand.ko module. Fix them all to actually do that, and fix nand.ko not to overwrite it -- and also to check that the caller sets it, if the caller is a module. Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
由 David Woodhouse 提交于
It was just too painful to deal with. Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
-
- 01 4月, 2006 1 次提交
-
-
由 Richard Purdie 提交于
Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 07 11月, 2005 6 次提交
-
-
由 Jesper Juhl 提交于
This is the drivers/mtd part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/mtd/. Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: NJoern Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
由 Thomas Gleixner 提交于
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Todd Poynor 提交于
Nathan Roberts noticed the nand_write_ecc index into oobbuf goes out of bounds when crossing an erase block boundary, causing incorrect OOB data to be written and corrupting memory. Reset the index to zero after re-preparing oobbuf for a new erase block. Signed-off-by: NTodd Poynor <tpoynor@mvista.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Vitaly Wool 提交于
In case of an odd offset, the result was shifted by 1 instead of 8 Signed-off-by: NVitaly Wool <vwool@ru.mvista.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Vitaly Wool 提交于
The changes introduced allow to suspend/resume NAND flash. A new state (FL_PM_SUSPENDED) is introduced, as well as routines for mtd->suspend and mtd->resume to put the flash in suspended state from software pov. Signed-off-by: NVitaly Wool <vwool@ru.mvista.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
The bit mask used for oob size calculation was using 2 bits instead of one. Fortunately the next bit has been 0 all the time. Thanks to Nathan H. for pointing this out Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 08 9月, 2005 1 次提交
-
-
由 Ingo Molnar 提交于
This patch adds a new kernel debug feature: CONFIG_DETECT_SOFTLOCKUP. When enabled then per-CPU watchdog threads are started, which try to run once per second. If they get delayed for more than 10 seconds then a callback from the timer interrupt detects this condition and prints out a warning message and a stack dump (once per lockup incident). The feature is otherwise non-intrusive, it doesnt try to unlock the box in any way, it only gets the debug info out, automatically, and on all CPUs affected by the lockup. Signed-off-by: NIngo Molnar <mingo@elte.hu> Signed-off-by: NNishanth Aravamudan <nacc@us.ibm.com> Signed-Off-By: NMatthias Urlichs <smurf@smurf.noris.de> Signed-off-by: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NAndrew Morton <akpm@osdl.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-