aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
Commit message (Collapse)AuthorAge
* MTD: kernel-doc fixes + additionsRandy Dunlap2006-06-29
| | | | | | | | | Fix some kernel-doc typos/spellos. Use kernel-doc syntax in places where it was almost used. Correct/add struct, struct field, and function param names where needed. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* MTD: fix all kernel-doc warningsRandy Dunlap2006-06-29
| | | | | | | | | | | Fix all kernel-doc warnings in MTD headers and source files: - add some missing struct fields; - correct some function parameter names; - use kernel-doc format for function doc. headers; - nand_ecc.c contains only exported interfaces, no internal ones; Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Merge git://git.infradead.org/hdrcleanup-2.6Linus Torvalds2006-06-20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/hdrcleanup-2.6: (63 commits) [S390] __FD_foo definitions. Switch to __s32 types in joystick.h instead of C99 types for consistency. Add <sys/types.h> to headers included for userspace in <linux/input.h> Move inclusion of <linux/compat.h> out of user scope in asm-x86_64/mtrr.h Remove struct fddi_statistics from user view in <linux/if_fddi.h> Move user-visible parts of drivers/s390/crypto/z90crypt.h to include/asm-s390 Revert include/media changes: Mauro says those ioctls are only used in-kernel(!) Include <linux/types.h> and use __uXX types in <linux/cramfs_fs.h> Use __uXX types in <linux/i2o_dev.h>, include <linux/ioctl.h> too Remove private struct dx_hash_info from public view in <linux/ext3_fs.h> Include <linux/types.h> and use __uXX types in <linux/affs_hardblocks.h> Use __uXX types in <linux/divert.h> for struct divert_blk et al. Use __u32 for elf_addr_t in <asm-powerpc/elf.h>, not u32. It's user-visible. Remove PPP_FCS from user view in <linux/ppp_defs.h>, remove __P mess entirely Use __uXX types in user-visible structures in <linux/nbd.h> Don't use 'u32' in user-visible struct ip_conntrack_old_tuple. Use __uXX types for S390 DASD volume label definitions which are user-visible S390 BIODASDREADCMB ioctl should use __u64 not u64 type. Remove unneeded inclusion of <linux/time.h> from <linux/ufs_fs.h> Fix private integer types used in V4L2 ioctls. ... Manually resolve conflict in include/linux/mtd/physmap.h
| * Don't include linux/config.h from anywhere else in include/David Woodhouse2006-04-26
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] NAND: Fix breakage all over the placeThomas Gleixner2006-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [MTD] assume mtd->writesize is 1 for NOR flashesArtem B. Bityutskiy2006-06-14
| | | | | | | | Signed-off-by: Artem B. Bityitskiy
* | [MTD] NAND Expose the new raw mode function and status info to userspaceThomas Gleixner2006-05-29
| | | | | | | | | | | | | | | | | | | | | | 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>
* | [MTD] Rework the out of band handling completelyThomas Gleixner2006-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [MTD] Remove silly MTD_WRITE/READ macrosThomas Gleixner2006-05-29
| | | | | | | | | | | | | | 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>
* | [MTD] NAND Replace oobinfo by ecclayoutThomas Gleixner2006-05-29
| | | | | | | | | | | | | | | | | | 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>
* | [MTD] NAND Consolidate oobinfo handlingThomas Gleixner2006-05-29
| | | | | | | | | | | | | | | | | | 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>
* | [MTD] NAND Fix platform structure and NDFC driverThomas Gleixner2006-05-29
| | | | | | | | | | | | | | 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>
* | [MTD] NAND modularize write functionThomas Gleixner2006-05-26
| | | | | | | | | | | | | | | | 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] NAND Modularize read functionThomas Gleixner2006-05-25
| | | | | | | | | | | | | | | | 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-25
| | | | | | | | | | | | | | | | | | | | | | | | 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-25
| | | | | | | | | | | | | | | | 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 Introduce NAND_NO_READRDY optionThomas Gleixner2006-05-25
| | | | | | | | | | | | | | | | | | | | | | 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 remove write_byte/word function from nand_chipThomas Gleixner2006-05-23
| | | | | | | | | | | | | | | | 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-23
| | | | | | | | | | | | | | | | | | | | | | | | 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] Remove read/write _ecc variantsThomas Gleixner2006-05-23
| | | | | | | | | | | | | | 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-23
| | | | | | | | | | | | | | 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-23
| | | | | | | | | | | | NAND writev(_ecc) support is not longer necessary. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] NAND ECC hwctl function has no return valueThomas Gleixner2006-05-23
| | | | | | | | | | | | Fix the broken prototype Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/Thomas Gleixner2006-05-23
|\ \ | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] Introduce writesizeJoern Engel2006-05-22
| | | | | | | | | | | | | | | | | | | | | | | | 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] NAND modularize ECCThomas Gleixner2006-05-23
| | | | | | | | | | | | | | | | | | | | | | | | 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 consolidate data typesThomas Gleixner2006-05-23
| | | | | | | | | | | | | | | | | | | | | 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-23
| | | | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | | [MTD] Add support for NDFC NAND controllerThomas Gleixner2006-05-23
| | | | | | | | | | | | | | | | | | | | | 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-23
| | | | | | | | | | | | | | | | | | | | | 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-23
|/ / | | | | | | | | | | | | | | 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>
* | [MTD] Clean up <linux/mtd/physmap.h> to fix modular buildDavid Woodhouse2006-05-14
| | | | | | | | | | | | ... and also fix the multiple inclusion guard so it actually _works_ Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Fix legacy character sets throughout drivers/mtd, include/linux/mtdDavid Woodhouse2006-05-13
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | OneNAND: One-Time Programmable (OTP) supportKyungmin Park2006-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | One Block of the NAND Flash Array memory is reserved as a One-Time Programmable Block memory area. Also, 1st Block of NAND Flash Array can be used as OTP. The OTP block can be read, programmed and locked using the same operations as any other NAND Flash Array memory block. OTP block cannot be erased. OTP block is fully-guaranteed to be a valid block. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* | OneNAND: handle byte access on BufferRAMKyungmin Park2006-05-12
| | | | | | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* | [MTD] Convert physmap to platform driverLennert Buytenhek2006-05-07
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | After dwmw2 let me know it ought to be done, I rewrote the physmap map driver to be a platform driver. I know zilch about the driver model, so I probably botched it in some way, but I've done some tests on an ixp23xx board which uses physmap, and it all seems to work. In order to not break existing physmap users, I've added some compat code that will instantiate a platform device iff CONFIG_MTD_PHYSMAP_LEN is defined and != 0. Also, I've changed the default value for CONFIG_MTD_PHYSMAP_LEN to zero, so that people who inadvertently compile in physmap (or new, platform-style, users of physmap) don't get burned. This works pretty well -- the new physmap driver is a drop-in replacement for the old one, and works on said ixp23xx board without any code changes needed. (This should hold as long as users don't touch 'physmap_map' directly.) Once all physmap users have been converted to instantiate their own platform devices, the compat code can go. (Or we decide that we can change all the in-tree users at the same time, and never merge the compat code.) Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [PATCH] drivers/mtd/: small cleanupsAdrian Bunk2006-03-31
| | | | | | | | | | | - chips/sharp.c: make two needlessly global functions static - move some declarations to a header file where they belong to Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] sem2mutex: drivers/mtd/Ingo Molnar2006-03-31
| | | | | | | | | | | | | Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] remove bogus asm/bug.h includes.Al Viro2006-02-07
| | | | | | | A bunch of asm/bug.h includes are both not needed (since it will get pulled anyway) and bogus (since they are done too early). Removed. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [PATCH] mtd onenand driver: reduce stack usageKyungmin Park2005-12-18
| | | | Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mtd onenand driver: check correct manufacturerKyungmin Park2005-12-18
| | | | | | | This (and the three subsequent patches) is working well on OMAP H4 with 2.6.15-rc4 kernel and passes the LTP fs test. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [MTD] CFI: Use 16-bit access to autoselect/read device id dataTodd Poynor2005-11-29
| | | | | | | | | | | | | | Recent models of Intel/Sharp and Spansion CFI flash now have significant bits in the upper byte of device ID codes, read via what Spansion calls "autoselect" and Intel calls "read device identifier". Currently these values are truncated to the low 8 bits in the mtd data structures, as all CFI read query info has previously been read one byte at a time. Add a new method for reading 16-bit info, currently just manufacturer and device codes; datasheets hint at future uses for upper bytes in other fields. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reasonOlaf Hering2005-11-09
| | | | | | | | | | | | | | | | | | | | | This patch removes almost all inclusions of linux/version.h. The 3 #defines are unused in most of the touched files. A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is unfortunatly in linux/version.h. There are also lots of #ifdef for long obsolete kernels, this was not touched. In a few places, the linux/version.h include was move to where the LINUX_VERSION_CODE was used. quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'` search pattern: /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [MTD] includes: Clean up trailing white spacesThomas Gleixner2005-11-07
| | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] Don't let gcc inline functions marked __xipramNicolas Pitre2005-11-06
| | | | | | | If they get inlined into non __xipram functions we're screwed. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] OneNAND: Enhanced support for DDP (Dual Densitiy Packages)Kyungmin Park2005-11-06
| | | | | | | Add density mask for better support of DDP chips. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] OneNAND: Power Management (PM) supportKyungmin Park2005-11-06
| | | | | | | Add suspend/resume Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] OneNAND: Add missing filesKyungmin Park2005-11-06
| | | | | | | Simple bad block table source and header files Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] NAND: Add suspend/resume functionalityVitaly Wool2005-11-06
| | | | | | | | | | 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: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] OneNAND: Fix bug in write verifyKyungmin Park2005-11-06
| | | | | | | | - Remove unused block, page parameters - Add constant instead of runtime value Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>