aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2006-06-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits) kbuild: trivial fixes in Makefile kbuild: adding symbols in Kconfig and defconfig to TAGS kbuild: replace abort() with exit(1) kbuild: support for %.symtypes files kbuild: fix silentoldconfig recursion kbuild: add option for stripping modules while installing them kbuild: kill some false positives from modpost kbuild: export-symbol usage report generator kbuild: fix make -rR breakage kbuild: append -dirty for updated but uncommited changes kbuild: append git revision for all untagged commits kbuild: fix module.symvers parsing in modpost kbuild: ignore make's built-in rules & variables kbuild: bugfix with initramfs kbuild: modpost build fix kbuild: check license compatibility when building modules kbuild: export-type enhancement to modpost.c kbuild: add dependency on kernel.release to the package targets kbuild: `make kernelrelease' speedup kconfig: KCONFIG_OVERWRITECONFIG ...
2006-06-25[MTD] sun_uflash: Port to new EBUS device layer.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-20[MTD] NAND: Fix breakage all over the placeThomas Gleixner
Following problems are addressed: - wrong status caused early break out of nand_wait() - removed the bogus status check in nand_wait() which is a relict of the abandoned support for interrupted erase. - status check moved to the correct place in read_oob - oob support for syndrom based ecc with strange layouts - use given offset in the AUTOOOB based oob operations Partially based on a patch from Vitaly Vool <vwool@ru.mvista.com> Thanks to Savin Zlobec <savin@epico.si> for tracking down the status problem. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-20[PATCH] NAND: fix remaining OOB length calculationVitaly Wool
In nand_read_page_syndrome/nand_write_page_syndrome the calculation of the remaining oob length which is not used by the prepad/ecc/postpad areas is wrong. Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-20[MTD] NAND Fixup NDFC merge brokenessThomas Gleixner
Remove the remains of a broken merge. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-19[MTD NAND] S3C2410 driver cleanupBen Dooks
Fix unused variables and commenting since tglx's new NAND updates Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-19[MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation.Ben Dooks
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-14[MTD] Restore MTD_ROM and MTD_RAM typesDavid Woodhouse
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. Bityutskiy
Signed-off-by: Artem B. Bityitskiy
2006-06-10[MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compilesDavid Woodhouse
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-09kconfig: remove leading whitespace in menu promptsRoman Zippel
This removes all the leading whitespace kconfig now warns about. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-09[MTD] Prepare physmap for 64-bit-resourcesAndrew Morton
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-05-30[MTD] Disconnect struct mtd_info from ABIJoern Engel
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 Engel
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 Engel
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 Engel
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 Morton
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[MTD] NAND Expose the new raw mode function and status info to userspaceThomas 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Signal that a bitflip was corrected by ECCThomas 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] Rework the out of band handling completelyThomas 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] Remove silly MTD_WRITE/READ macrosThomas Gleixner
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 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Consolidate oobinfo handlingThomas 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-29[MTD] NAND Fix platform structure and NDFC driverThomas Gleixner
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 Morton
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 Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-27[MTD] NAND Consolidate references and add back default name settingThomas 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-27[MTD] NAND simplify nand_chip_selectThomas 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-26[MTD] Fix thinko in nand_write_page_hwecc()David Woodhouse
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-26[MTD] NAND modularize write functionThomas Gleixner
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 Woodhouse
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[MTD] Fix NAND_VERIFY_WRITE case to build with tglx's recent changesDavid Woodhouse
Bad tglx. No biscuit. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25[MTD] Remove the only useless readv implementationThomas Gleixner
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 Gleixner
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 Cleanup oob functionsThomas Gleixner
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 Gleixner
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 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-24[MTD] NAND fix cmd_ctrl breakageThomas Gleixner
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 Gleixner
Cleanup the functions which are not going to change in the next steps. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] NAND LED support cleanupThomas Gleixner
Move the define out of the middle of the code and add an appropriate comment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] NAND remove write_byte/word function from nand_chipThomas 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] Refactor NAND hwcontrol to cmd_ctrlThomas 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: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] Export nand_write_rawThomas Gleixner
The previous _ecc removal / cleanup broke (i)nftl module usage. Export the missing symbol. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] Mark NAND drivers TOTO and PPChameleon brokenThomas Gleixner
Both drivers can not be fixed and compiled due to missing header files. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] Remove read/write _ecc variantsThomas Gleixner
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>
2006-05-23[MTD] Remove readv/readv_eccThomas Gleixner
These functions were never implemented and added only bloat to partition and concat code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] Remove nand writev supportThomas Gleixner
NAND writev(_ecc) support is not longer necessary. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] ECC rework broke diskonchipThomas Gleixner
Fix the diskonchip ecc setup. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/Thomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] NAND modularize ECCThomas 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: Thomas Gleixner <tglx@linutronix.de>