aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/onenand/onenand_base.c
AgeCommit message (Collapse)Author
2007-01-10[MTD] OneNAND: Handle DDP chip boundary during read-while-loadAdrian Hunter
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 Park
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 Hunter
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 Park
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 Bityutskiy
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 Park
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 Park
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 Park
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 Woodhouse
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-16[MTD] OneNAND: Single bit error detectionKyungmin Park
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 Park
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 Park
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-09-26[MTD ONENAND] Check OneNAND lock scheme & all block unlock command supportKyungmin Park
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] Fix OneNAND probeKyungmin Park
- 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 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] 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-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-22[MTD] Introduce MTD_BIT_WRITEABLEJoern Engel
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 Engel
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 Park
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 Park
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 Park
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 Park
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 Park
Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
2006-05-12OneNand: Fix free byte positions.Jarkko Lavinen
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 Park
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-05-12OneNAND: Add touch_softlock_watchdog()Kyungmin Park
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2005-12-18[PATCH] mtd onenand driver: reduce stack usageKyungmin Park
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] mtd onenand driver: fix unlock problem in DDPKyungmin Park
2005-12-18[PATCH] mtd onenand driver: check correct manufacturerKyungmin Park
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 Morton
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 Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] OneNAND: Enhanced support for DDP (Dual Densitiy Packages)Kyungmin Park
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 Park
Add suspend/resume 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 Park
- 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: Simple Bad Block handling supportKyungmin Park
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 Park
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 Park
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>