summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.infradead.org/mtd-2.6Linus Torvalds2006-06-2015-418/+482
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: (199 commits) [MTD] NAND: Fix breakage all over the place [PATCH] NAND: fix remaining OOB length calculation [MTD] NAND Fixup NDFC merge brokeness [MTD NAND] S3C2410 driver cleanup [MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation. [JFFS2] Check CRC32 on dirent and data nodes each time they're read [JFFS2] When retiring nextblock, allocate a node_ref for the wasted space [JFFS2] Mark XATTR support as experimental, for now [JFFS2] Don't trust node headers before the CRC is checked. [MTD] Restore MTD_ROM and MTD_RAM types [MTD] assume mtd->writesize is 1 for NOR flashes [MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compiles [MTD] Prepare physmap for 64-bit-resources [JFFS2] Fix more breakage caused by janitorial meddling. [JFFS2] Remove stray __exit from jffs2_compressors_exit() [MTD] Allow alternate JFFS2 mount variant for root filesystem. [MTD] Disconnect struct mtd_info from ABI [MTD] replace MTD_RAM with MTD_GENERIC_TYPE [MTD] replace MTD_ROM with MTD_GENERIC_TYPE [MTD] remove a forgotten MTD_XIP ...
| * [MTD] NAND: Fix breakage all over the placeThomas Gleixner2006-06-201-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Restore MTD_ROM and MTD_RAM typesDavid Woodhouse2006-06-141-1/+2
| | | | | | | | | | | | | | 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>
| * [MTD] assume mtd->writesize is 1 for NOR flashesArtem B. Bityutskiy2006-06-141-3/+6
| | | | | | | | Signed-off-by: Artem B. Bityitskiy
| * [MTD] replace MTD_RAM with MTD_GENERIC_TYPEJoern Engel2006-05-301-2/+2
| | | | | | | | | | | | | | | | 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>
| * [MTD] replace MTD_ROM with MTD_GENERIC_TYPEJoern Engel2006-05-301-1/+1
| | | | | | | | | | | | | | | | 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>
| * [MTD] NAND Expose the new raw mode function and status info to userspaceThomas Gleixner2006-05-302-11/+27
| | | | | | | | | | | | | | | | | | | | | | 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-292-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-15/+1
| | | | | | | | | | | | | | 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-298-19/+43
| | | | | | | | | | | | | | | | | | 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-291-3/+2
| | | | | | | | | | | | | | | | | | 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-292-2/+5
| | | | | | | | | | | | | | 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-261-26/+45
| | | | | | | | | | | | | | | | 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-251-8/+8
| | | | | | | | | | | | | | | | 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 Introduce NAND_NO_READRDY optionThomas Gleixner2006-05-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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-231-5/+0
| | | | | | | | | | | | | | | | 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-231-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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-232-3/+3
| | | | | | | | | | | | | | 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-231-5/+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-231-2/+0
| | | | | | | | | | | | 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-231-1/+1
| | | | | | | | | | | | 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-232-11/+11
| |\ | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| | * [MTD] Introduce MTD_BIT_WRITEABLEJoern Engel2006-05-221-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Introduce writesizeJoern Engel2006-05-222-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [MTD] NAND modularize ECCThomas Gleixner2006-05-231-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | 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-231-11/+11
| | | | | | | | | | | | | | | | | | | | | 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-231-69/+34
| | | | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] Add support for NDFC NAND controllerThomas Gleixner2006-05-231-0/+66
| | | | | | | | | | | | | | | | | | | | | 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-231-3/+4
| |/ | | | | | | | | | | | | | | 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>
| * Merge git://git.infradead.org/jffs2-xattr-2.6David Woodhouse2006-05-201-0/+40
| |\ | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| | * Merge git://git.infradead.org/mtd-2.6KaiGai Kohei2006-05-1943-87/+214
| | |\
| | * | [JFFS2][XATTR] XATTR support on JFFS2 (version. 5)KaiGai Kohei2006-05-131-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This attached patches provide xattr support including POSIX-ACL and SELinux support on JFFS2 (version.5). There are some significant differences from previous version posted at last December. The biggest change is addition of EBS(Erase Block Summary) support. Currently, both kernel and usermode utility (sumtool) can recognize xattr nodes which have JFFS2_NODETYPE_XATTR/_XREF nodetype. In addition, some bugs are fixed. - A potential race condition was fixed. - Unexpected fail when updating a xattr by same name/value pair was fixed. - A bug when removing xattr name/value pair was fixed. The fundamental structures (such as using two new nodetypes and exclusion mechanism by rwsem) are unchanged. But most of implementation were reviewed and updated if necessary. Espacially, we had to change several internal implementations related to load_xattr_datum() to avoid a potential race condition. [1/2] xattr_on_jffs2.kernel.version-5.patch [2/2] xattr_on_jffs2.utils.version-5.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Support new device nodesDavid Woodhouse2006-05-191-0/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device node major/minor numbers are just stored in the payload of a single data node. Just extend that to 4 bytes and use new_encode_dev() for it. We only use the 4-byte format if we _need_ to, if !old_valid_dev(foo). This preserves backwards compatibility with older code as much as possible. If we do make devices with major or minor numbers above 255, and then mount the file system with the old code, it'll just read the first two bytes and get the numbers wrong. If it comes to garbage-collect it, it'll then write back those wrong numbers. But that's about the best we can expect. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Repack some on-medium structures. ARM is weirder than I thought.David Woodhouse2006-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | We have to pack at least the jint16_t structure, because otherwise it'll be four bytes in size. Thankfully, we can do that and _not_ pack the actual node structures, and the compiler still doesn't emit stupid code. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6David Woodhouse2006-05-1640-74/+205
| |\ \ | | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [JFFS2] Don't pack on-medium structures, because GCC emits crappy codeDavid Woodhouse2006-05-151-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we use __attribute__((packed)), GCC will _also_ assume that the structures aren't sensibly aligned, and it'll emit code to cope with that instead of straight word load/save. This can be _very_ suboptimal on architectures like ARM. Ideally, we want an attribute which just tells GCC not to do any padding, without the alignment side-effects. In the absense of that, we'll just drop the 'packed' attribute and hope that everything stays as it was (which to be fair is fairly much what we expect). And add some paranoia checks in the initialisation code, which should be optimised away completely in the normal case. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | [MTD] Clean up <linux/mtd/physmap.h> to fix modular buildDavid Woodhouse2006-05-141-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | ... 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-141-1/+1
| | |/ | |/| | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | OneNAND: One-Time Programmable (OTP) supportKyungmin Park2006-05-122-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-121-0/+3
| | | | | | | | | | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | Finally remove the obnoxious inter_module_xxx()David Woodhouse2006-05-081-9/+0
| | | | | | | | | | | | | | | | | | | | | This was already a bad plan when I argued against adding it in the first place. Good riddance. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] Convert physmap to platform driverLennert Buytenhek2006-05-071-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'master' of ↵David Woodhouse2006-05-03116-432/+2153
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * | | Move jffs2_fs_i.h and jffs2_fs_sb.h from include/linux/ to fs/jffs2/David Woodhouse2006-05-032-172/+0
| | | | | | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | Remove unused MTD typesJörn Engel2006-04-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Three types are never set or checked for. Remove. Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | | Remove unchecked MTD flagsJörn Engel2006-04-171-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Several flags are set by some devices, but never checked. Remove them. Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
OpenPOWER on IntegriCloud