aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/onenand
AgeCommit message (Collapse)Author
2009-02-06MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatc ↵merge
hes-tracking-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011-1233879414-1233879505 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011-1233879414-1233879505 / 1c405b6ccee468298e7ccbfd9a3a3f4d123207b0 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011-1233879414 stable-tracking-hist top was MERGE-via-mokopatches-tracking-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011-1233879414 / 71be0a45396066b1f8f27f8f4f87937247a129e1 ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011 mokopatches-tracking-hist top was MERGE-via-master-MERGE-via-master-hist-1232625318-1233879011 / 1be1b01373f572a02c6f1f99863c8c11ed2f9f5b ... parent commitmessage: From: merge <null@invalid> MERGE-via-master-MERGE-via-master-hist-1232625318 master top was MERGE-via-master-hist-1232625318 / dd4b117123ae66451695810017eb72fbdfc05df5 ... parent commitmessage: From: merge <null@invalid> MERGE-master-patchset-edits
2009-01-22MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatc ↵merge
hes-tracking-fix-stray-endmenu-patch-1232632040-1232632141 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-04drivers: remove duplicated #includeJianjun Kong
Signed-off-by: Jianjun Kong <jianjun@zeuux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-16[MTD] [NAND] OMAP2: add retry after read timeoutAdrian Hunter
Very occasionally, (about one in a million) read operations are ongoing after the timeout has expired. So, retry three times while the ongoing bit remains set. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-15[MTD] [OneNAND] OMAP3: add delay for GPIOAdrian Hunter
On OMAP3, the driver was occasionally not seeing the GPIO interrupt. Adding a small delay of one register read eliminates the problem. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-12[MTD] [OneNAND] Add OMAP2 / OMAP3 OneNAND driverAdrian Hunter
This driver had resided in the OMAP tree but is now to be in MTD. Original authors were: Jarkko Lavinen <jarkko.lavinen@nokia.com> and Juha Yrjölä IRQ and DMA support written by Timo Teras Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-12[MTD] Define and use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffffAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01[MTD] dataflash OTP supportDavid Brownell
Now that we can tell when we have one of the newer DataFlash chips, optionally expose the 128 bytes of OTP memory they provide. Tested on at45db642 revision B and D chips. Switch mtdchar over to a generic HAVE_MTD_OTP flag instead of adding another #ifdef for each type of chip whose driver has OTP support. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Bryan Wu <cooloney@kernel.org> Cc: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2008-06-05[MTD] [MAPS] Fix cmdlineparse handling in mapping filesKyungmin Park
Now it returns the 0 if cmdlineparse not supplied. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [OneNAND] Check the ECC status first instead of controllerKyungmin Park
To get the correct information in case of power off recovery, it should read ECC status first Also remove previous workaround method. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [OneNAND] Allow for controller errors when readingAdrian Hunter
A power loss while writing can result in a page becoming unreadable. When the device is mounted again, reading that page gives controller errors. Upper level software like JFFS2 treat -EIO as fatal, refusing to mount at all. That means it is necessary to treat the error as an ECC error to allow recovery. Note that typically in this case, the eraseblock can still be erased and rewritten i.e. it has not become a bad block. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [OneNAND] unlikely(x) || unlikely(y) => unlikely(x || y)Roel Kluin
Acked-By: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [OneNAND] proper onenand_bbt_read_oob() prototypeAdrian Bunk
This patch adds a proper prototype for onenand_bbt_read_oob() in include/linux/mtd/onenand.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-16[MTD] [OneNAND] Fix unlock all in Double Density Package (DDP)Kyungmin Park
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-02-07[MTD] onenand: Add panic_write function to the onenand driverRichard Purdie
Implement the panic_write function for the onenand driver. This waits for any active command to complete/timeout, performs the write, waits for it to complete and then returns. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-01-29[MTD] [OneNAND] Use pre-alloced oob buffer instead of local bufferKyungmin Park
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Use the u_char instead of char in oobbufSheng Yongjie (Sam
In function onenand_verify_oob, local variable oobbuf shall be unsigned char. In the case of a value is >= 0x80, it's unequal in comparing the value in an unsigned char and signed char. Signed-off-by: Sheng Yongjie (Sam) <samsheng@trident.com.cn> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Check the initial bad block using ONENAND_CTRL_ERRORKyungmin Park
Some chips don't set the ONENAND_CTRL_LOAD bit. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Get correct density from device IDKyungmin Park
Use the higher bits for other purpose. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Consolidate OneNAND operation orderKyungmin Park
Consolidate OneNAND operation order as OneNAND Spec. It also doesn't break previous operation order. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] fix call to onenand_verify when writing subpagesAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-01-29[MTD] [OneNAND] Do not release chip twiceAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-11-26[MTD] [OneNAND] Do not stop reading for ECC errorsAdrian Hunter
When an ECC error occurs, the read should be completed anyway before returning -EBADMSG. Returning -EBADMSG straight away is incorrect. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-23Eliminate pointless casts from void* in a few driver irq handlers.Jeff Garzik
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-22[MTD] [OneNAND] Fix wrong free the static address in onenand_simKyungmin Park
Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-20[MTD] [OneNAND] onenand-sim: fix kernel-doc and typosRandy Dunlap
Correct kernel-doc notation and descriptions. Correct other typos. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-14[MTD] [OneNAND] Avoid deadlock in erase callback; release chip lock first.Adrian Hunter
When the erase callback performs some other action on the flash, it's highly likely to deadlock unless we actually release the chip lock before calling it. This patch mirrors that same change already done for NAND. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-14[MTD] [OneNAND] Return only negative error codesAdrian Hunter
The OneNAND driver was confusing JFFS2 by returning positive error codes. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-14[MTD] [OneNAND] Synchronize block locking operationsAdrian Hunter
Ensure OneNAND's block locking operations are synchronized like all other operations. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-13[MTD] [OneNAND] Fix typo related with recent commitKyungmin Park
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-09-23[MTD] [OneNAND] fix numerous racesArtem Bityutskiy
This patch make the OneNAND driver much less racy. It fixes our "onenand_wait: read timeout!" heisenbugs. The reason of these bugs was that the driver did not lock the chip when accessing OTP, and it screwed up OneNAND state when the OTP was read while JFFS2 was doing FS checking. This patch also fixes other races I spotted: 1. BBT was not protected 2. Access to ecc_stats was not protected Now the chip is locked when BBT is accessed. To fix all of these I basically split all interface functions on 'function()' and 'function_nolock()' parts. I tested this patch on N800 hardware - it fixes our problems. But I tested a little different version because our OneNAND codebase is slightly out-of-date. But it should be OK. This patch also includes the prin fixes I posted before. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-09-06[MTD] [OneNAND] main read/write ops support for yaffs2Kyungmin Park
Now we can use yaffs2 on OneNAND Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-30[MTD] [OneNAND] Use mtd_oob_ops at oob functionsKyungmin Park
To enable the main read/write at oob ops Next time we will commit the main read/write support for yaffs2 Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-01[MTD] [ONENAND] onenand_sim.c: make struct info staticAdrian Bunk
This patch makes the needlessly global struct info static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-07-10[MTD] [ONENAND] Make onenand_sim compile on non-ARM platforms.David Woodhouse
The whole point of a sim is that it should run almost anywhere. Gratuitously depending on '#define SZ_128K 131072' from an ARM-specific header isn't really a good idea. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-06-30[MTD] OneNAND Simulator supportKyungmin Park
This simulate various OneNAND flash chips for the MTD onenand layer. It's simple implementation, only basic operations. It don't support the recent changes in NANDSIM such as lazy block allocation, bitflip, and so on. Note: This passed nand-tests. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-06-30[MTD] [OneNAND] 2X program supportKyungmin Park
The 2X Program is an extension of Program Operation. Since the device is equipped with two DataRAMs, and two-plane NAND Flash memory array, these two component enables simultaneous program of 4KiB. Plane1 has only even blocks such as block0, block2, block4 while Plane2 has only odd blocks such as block1, block3, block5. So MTD regards it as 4KiB page size and 256KiB block size Now the following chips support it. (KFXXX16Q2M) Demux: KFG2G16Q2M, KFH4G16Q2M, KFW8G16Q2M, Mux: KFM2G16Q2M, KFN4G16Q2M, And more recent chips Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-05-09Fix occurrences of "the the "Michael Opdenacker
Signed-off-by: Michael Opdenacker <michael@free-electrons.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-04-25[MTD] [OneNAND] Exit loop only when column start with 0Adrian Hunter
The JFFS2 requests OOB function from column 0. But the oobtest in nand-tests doesn't. So we only exit loop only when column start with 0. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-25[MTD] [OneNAND] Fix access the past of the real oobfree arrayKyungmin Park
Here it's not the case: all the entries are occupied by OOB chunks. Therefore, once we get into a loop like for (free = this->ecclayout->oobfree; free->length; ++free) { } we might end up scanning past the real oobfree array. Probably the best way out, as the same thing might happen for common NAND as well, is to check index against MTD_MAX_OOBFREE_ENTRIES. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-25[MTD] [OneNAND] Update Samsung OneNAND official URLKyungmin Park
Update Samsung OneNAND official URL. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-04-19Use menuconfig objects: MTDJan Engelhardt
Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-09[MTD] [OneNAND] Classify the page data and oob bufferKyungmin Park
Classify the page data and oob buffer and it prevents the memory fragementation (writesize + oobsize) Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-09[MTD] [OneNAND] Exit the loop when transferring/filling of the oob is finishedKyungmin Park
When transferring/filling of the oob is finished in OOB_AUTO, we exit the loop Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-09[MTD] [OneNAND] add Nokia Copyright and a creditAdrian Hunter
add Nokia Copyright and a credit Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-09[MTD] [OneNAND] Fix typo & wrong commentsKyungmin Park
Fix typo & wrong comments Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-09[MTD] [OneNAND] Use oob buffer instead of main one in oob functionsKyungmin Park
In oob functions, it is used main buffer instead of oob one. So fix it. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-03-08[MTD] [NAND] make oobavail publicVitaly Wool
During the MTD rework the oobavail parameter of mtd_info structure has become private. This is not quite correct in terms of integrity and logic. If we have means to write to OOB area, then we'd like to know upfront how many bytes out of OOB are spare per page to be able to adapt to specific cases. The patch inlined adds the public oobavail parameter. Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-18[MTD] [ONENAND] onenand_base warning fixAndrew Morton
drivers/mtd/onenand/onenand_base.c: In function 'onenand_bbt_read_oob': drivers/mtd/onenand/onenand_base.c:1033: warning: format '%i' expects type 'int', but argument 3 has type 'size_t' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>