aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-01-10[MTD] OneNAND: Handle DDP chip boundary during read-while-loadAdrian Hunter1-1/+14
The read-while-load method of reading from OneNAND needs to allow for the change of bufferRAM address at the boundary between the two chips in a double density (DDP) device. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-10[MTD] OneNAND: return ecc error code only when 2-bit ecc occursKyungmin Park1-3/+3
we don't need to return ecc error when 1-bit ecc. We only return error code when 2-bit ecc error Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-10[MTD] OneNAND: Implement read-while-loadAdrian Hunter1-32/+42
Read-while-load enables higher performance read operations. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-10[MTD] OneNAND: fix onenand_wait bug in read ecc errorKyungmin Park1-2/+3
Even though there is ECC error. OneNAND driver updates the buffram as valid Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-10[MTD] OneNAND: release CPU in cyclesArtem Bityutskiy1-7/+9
This patch teaches OneNAND to release processor in read/write/erase cycles and let other processes proceed. Also, remove buggi touch watchdog call which only hides the problem instead of solving it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-10[MTD] OneNAND: add subpage write supportKyungmin Park1-14/+42
OneNAND supports up to 4 writes at one NAND page. Add support of this feature. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-10[MTD] OneNAND: fix onenand_wait bugKyungmin Park2-24/+17
Fix onenand_wait error reporting Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-12-11[MTD] OneNAND: fix oob handling in recent oob patchKyungmin Park1-4/+4
There are missing place in recent MTD oob patch http://git.infradead.org/?p=mtd-2.6.git;a=commitdiff;h=7014568bad55c20b7ee4f439d78c9e875912d51f Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-30[MTD] Remove trailing whitespaceDavid Woodhouse1-1/+1
The newly-added cafe_ecc.c had a lot of it because of the way the lookup table was auto-generated; clean up the other files too while we're at it. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-29Merge git://git.infradead.org/~kmpark/onenand-mtd-2.6David Woodhouse3-21/+169
2006-11-28[MTD] replace kmalloc+memset with kzallocBurman Yan2-10/+4
Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-16[MTD] OneNAND: Single bit error detectionKyungmin Park2-5/+14
Idea from Jarkko Lavinen Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-11-16[MTD] OneNAND: lock supportKyungmin Park1-15/+48
Now you can use mtd lock inferface on OneNAND The idea is from Nemakal, Vijaya, thanks Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-11-16MTD: OneNAND: interrupt based wait supportKyungmin Park2-2/+108
We can use the two methods to wait. 1. polling: read interrupt status register 2. interrupt: use kernel ineterrupt mechanism To use interrupt method, you first connect onenand interrupt pin to your platform and configure interrupt properly Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
2006-10-03Fix several typos in drivers/Matt LaPlante1-1/+1
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-09-26[MTD ONENAND] Check OneNAND lock scheme & all block unlock command supportKyungmin Park1-19/+118
OneNAND lock scheme depends on density and process of chip. Some OneNAND chips support all block unlock Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-26[MTD ONENAND] Remove unused MTD_ONENAND_SYNC_READ configurationKyungmin Park1-6/+0
Now the bootloader configures the OneNAND sync. burst mode. So we don't access Sync. burst mode related registers in kernel. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-26[MTD ONENAND] Fix OneNAND probeKyungmin Park1-3/+14
- fix OneNAND probe whether OneNAND Sync. Burst read mode or not - fix OneNAND reset wait problem Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
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>