aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-05-29[MTD] Rework the out of band handling completelyThomas Gleixner2-10/+43
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] NAND Replace oobinfo by ecclayoutThomas Gleixner1-8/+6
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 Gleixner1-1/+1
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-23[MTD] Remove read/write _ecc variantsThomas Gleixner1-58/+17
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 Gleixner1-2/+0
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 Gleixner1-140/+0
NAND writev(_ecc) support is not longer necessary. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-22[MTD] Introduce MTD_BIT_WRITEABLEJoern Engel1-1/+1
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>
2006-05-22[MTD] Introduce writesizeJoern Engel2-38/+38
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>
2006-05-12OneNAND: fix block command typoKyungmin Park1-1/+1
We need to check block cmd only instead with comparing with cmd Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-05-12OneNAND: One-Time Programmable (OTP) supportKyungmin Park2-3/+324
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>
2006-05-12OneNAND: Handle erase correctly in Double Density Package (DDP)Kyungmin Park1-0/+6
There's erase bug in DDP. We need to add DDP select in erase Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-05-12OneNAND: Write oob area with aligned size, mtd->oobsizeKyungmin Park1-2/+5
There's some problem with write oob in serveral platform. So we write oob with oobsize aligned (16bytes) instead of 3 bytes (from {2, 3}) Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-05-12OneNAND: Add write_oob verify functionKyungmin Park1-4/+43
Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
2006-05-12OneNand: Fix free byte positions.Jarkko Lavinen1-1/+2
Some free byte positions at onenand_oob_64 were wrong. This was also reported by Christian Lehne. 3 byte slots are at 2+16*i and 2 byte slots at 14+16*i. Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
2006-05-12OneNAND: handle byte access on BufferRAMKyungmin Park1-0/+38
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-05-12OneNAND: Add touch_softlock_watchdog()Kyungmin Park1-0/+1
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-01-08[PATCH] fix more missing includesTim Schmielau1-0/+1
Include fixes for 2.6.14-git11. Should allow to remove sched.h from module.h on i386, x86_64, arm, ia64, ppc, ppc64, and s390. Probably more to come since I haven't yet checked the other archs. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] mtd onenand driver: use platform_device.h instead device.hKyungmin Park1-2/+2
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] mtd onenand driver: reduce stack usageKyungmin Park2-5/+26
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] mtd onenand driver: fix unlock problem in DDPKyungmin Park1-4/+6
2005-12-18[PATCH] mtd onenand driver: check correct manufacturerKyungmin Park1-6/+10
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>
2005-11-09[PATCH] mtd: onenand_base needs sched.hAndrew Morton1-0/+2
drivers/mtd/onenand/onenand_base.c: In function `onenand_wait': drivers/mtd/onenand/onenand_base.c:293: error: `jiffies' undeclared (first use in this function) drivers/mtd/onenand/onenand_base.c:293: error: (Each undeclared identifier is reported only once drivers/mtd/onenand/onenand_base.c:293: error: for each function it appears in.) drivers/mtd/onenand/onenand_base.c:293: error: implicit declaration of function `msecs_to_jiffies' drivers/mtd/onenand/onenand_base.c:294: error: implicit declaration of function `time_before' drivers/mtd/onenand/onenand_base.c:301: error: implicit declaration of function `cond_resched' drivers/mtd/onenand/onenand_base.c: In function `onenand_get_device': drivers/mtd/onenand/onenand_base.c:522: error: implicit declaration of function `set_current_state' drivers/mtd/onenand/onenand_base.c:522: error: `TASK_UNINTERRUPTIBLE' undeclared (first use in this function) drivers/mtd/onenand/onenand_base.c:525: error: implicit declaration of function `schedule' drivers/mtd/onenand/onenand_base.c: In function `onenand_release_device': drivers/mtd/onenand/onenand_base.c:545: error: `TASK_UNINTERRUPTIBLE' undeclared (first use in this function) drivers/mtd/onenand/onenand_base.c:545: error: `TASK_INTERRUPTIBLE' undeclared (first use in this function) Cc: Thomas Gleixner <tglx@linutronix.de> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[MTD] OneNAND: Clean up trailing white spacesThomas Gleixner1-12/+12
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07[MTD] OneNAND/Kconfig: Fix dependenciesThomas Gleixner1-4/+3
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07Revert "[PATCH] OneNAND: Add simulator"Thomas Gleixner3-474/+0
This reverts 405c829f98d216925de00af2ee52f969f2c2891c commit.
2005-11-06[MTD] OneNAND: Enhanced support for DDP (Dual Densitiy Packages)Kyungmin Park1-21/+18
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>
2005-11-06[MTD] OneNAND: Power Management (PM) supportKyungmin Park1-3/+33
Add suspend/resume Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] OneNAND: Add missing filesKyungmin Park1-0/+246
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>
2005-11-06OneNAND: Remove OMAP platform driverKyungmin Park3-154/+0
Now we can use the generic platform driver Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] OneNAND: Add generic platform driverKyungmin Park3-0/+155
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] OneNAND: Remove experimental Kconfig dependencyKyungmin Park1-2/+2
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[PATCH] OneNAND: Fix bug in write verifyKyungmin Park1-7/+4
- 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>
2005-11-06[PATCH] OneNAND: Add simulatorKyungmin Park3-0/+474
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[PATCH] OneNAND: Update OMAP OneNAND mapping using device driver modelKyungmin Park1-182/+89
- Update OMAP OneNAND mapping file using device driver model - Remove board specific macro and values. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[PATCH] OneNAND: Simple Bad Block handling supportKyungmin Park2-20/+89
Based on NAND memory bad block table code Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[PATCH] OneNAND: Sync. Burst Read supportKyungmin Park3-4/+107
Add OneNAND Sync. Burst Read support Tested with OMAP platform Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] Add initial support for OneNAND flash chipsKyungmin Park4-0/+1681
OneNAND is a new flash technology from Samsung with integrated SRAM buffers and logic interface. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>