aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
AgeCommit message (Collapse)Author
2007-03-08[MTD] [NAND] Correct misspelled preprocessor variable.Robert P. J. Day
Replace the apparently misspelled preprocessor variable "MTD_NAND_DISKONCHIP_BBTWRITE" with the correct form "CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE". Signed-off-by: Robert P. J. Day <rpjday@mindspring.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-25[ARM] 4233/1: nand/s3c2410.c: warning fixArnaud Patard
Noticed while building a s3c2410 kernel : drivers/mtd/nand/s3c2410.c: In function 's3c2440_nand_calculate_ecc': drivers/mtd/nand/s3c2410.c:476: warning: format '%06x' expects type 'unsigned int', but argument 3 has type 'long unsigned int' This patch fixes it. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-19Merge git://git.infradead.org/mtd-2.6Linus Torvalds
* git://git.infradead.org/mtd-2.6: (49 commits) [MTD] [NAND] S3C2412 fix hw ecc [MTD] [NAND] Work around false compiler warning in CAFÉ driver [JFFS2] printk warning fixes [MTD] [MAPS] ichxrom warning fix [MTD] [MAPS] amd76xrom warning fix [MTD] [MAPS] esb2rom warning fixes [MTD] [MAPS] ck804xrom warning fix [MTD] [MAPS] netsc520 warning fix [MTD] [MAPS] sc520cdp warning fix [MTD] [ONENAND] onenand_base warning fix [MTD] [NAND] eXcite nand flash driver [MTD] Improve heuristic for detecting wrong-endian RedBoot partition table [MTD] Fix RedBoot partition parsing regression harder. [MTD] [NAND] S3C2410: Hardware ECC correction code [JFFS2] Use MTD_OOB_AUTO to automatically place cleanmarker on NAND [MTD] Clarify OOB-operation interface comments [MTD] remove unused ecctype,eccsize fields from struct mtd_info [MTD] [NOR] Intel: remove ugly PROGREGION macros [MTD] [NOR] STAA: use writesize instead off eccsize to represent ECC block [MTD] OneNAND: Invalidate bufferRAM after erase ...
2007-02-18[MTD] [NAND] S3C2412 fix hw eccMatthieu CASTET
S3C2412 use differents registers than s3c2440 for hw ecc handling. Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.fr> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-18[MTD] [NAND] Work around false compiler warning in CAFÉ driverAndrew Morton
drivers/mtd/nand/cafe.c: In function 'cafe_nand_cmdfunc': drivers/mtd/nand/cafe.c:269: warning: 'irqs' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-14[PATCH] Scheduled removal of SA_xxx interrupt flags fixups 2Thomas Gleixner
The obsolete SA_xxx interrupt flags have been used despite the scheduled removal. Fixup the remaining users in -mm. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[MTD] [NAND] eXcite nand flash driverThomas Koeller
This is a nand flash driver for the eXcite series of intelligent cameras manufactured by Basler Vision Technologies AG. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] [NAND] S3C2410: Hardware ECC correction codeBen Dooks
Add support for correcting errors detected by the hardware ECC. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] remove unused ecctype,eccsize fields from struct mtd_infoArtem Bityutskiy
Remove unused and broken mtd->ecctype and mtd->eccsize fields from struct mtd_info. Do not remove them from userspace API data structures (don't want to breake userspace) but mark them as obsolete by a comment. Any userspace program which uses them should be half-broken anyway, so this is more about saving data structure size. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] [NAND] Fix an off-by-one in a BUG_ON in CAFÉ ECC correction.Adrian Bunk
err_pos_lut[4096] of an array with 4096 elements is a bug. Spotted by the Coverity checker. While I was at it, I also converted it to ARRAY_SIZE(). Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] [NAND] Correctly validate out-of-band offset and lengthAdrian Hunter
Add checks to ensure that out-of-band reads and writes are not attempted with an invalid offset or length. Specifically, the offset must be less than the size of oob for a page and the length must not go beyond the size of the device. Additionally the checks must adjust for auto-placement (MTD_OOB_AUTO) of oob data. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-05[MTD NAND] CAFÉ controller depends, perhaps unsurprisingly, on NANDDavid Woodhouse
Noticed by Ingo. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-05Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2007-01-30[PATCH] mtd/nand/cafe.c missing include of dma-mapping.hAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-23[MTD] [NAND] Remove debugging cruft from CAFÉ NAND driver.David Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-01-23[MTD] [NAND] Inherit CAFÉ NAND timing setup from firmwareDavid Woodhouse
The precise timings are board-specific (or NAND chip specific) and don't belong here. If they're set already, then use what we find there. Otherwise, revert to the most conservative default values (and whinge). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-08[MTD] NAND: Support for 16-bit bus-width on AT91.Andrew Victor
Add support for 16-bit NAND bus-width for the AT91 NAND driver. The 16-bit NAND is found on the Atmel AT91SAM9260-EK and AT91SAM9261-EK boards. Orignal Patch from Patrice Vilchez Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-08[MTD] nandsim: bugfix in page addressingArtem Bityutskiy
Number of address bytes for 64-128 MiB NANDs is 4, not 5. Signed-off-by: Artem Bityutskiy <dedekind@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-05[MTD] NAND: use SmartMedia ECC byte order for ndfcTimo Lindhorst
Select MTD_NAND_ECC_SMC (ECC byte order according to the Smart Media Specification) if MTD_NAND_NDFC is used. Using the wrong byte order causes fatal, unnoticed data damage. For further information see: http://lists.infradead.org/pipermail/linux-mtd/2006-November/016920.html Signed-off-by: Timo Lindhorst <lindhors@linux.vnet.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-01[MTD] [NAND] Compile fix in rfc_from4.cMariusz Kozlowski
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-01Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
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-29[MTD] NAND: add subpage write supportThomas Gleixner
Many SLC NANDs support up to 4 writes at one NAND page. Add support of this feature. Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29[MTD] Tidy bitrev usage in rtc_from4.cAndrew Morton
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-29[MTD] [NAND] fix ifdef option in nand_ecc.cTimo Lindhorst
Fix up the config option in the #ifdef statements in nand_ecc.c Signed-off-by: Timo Lindhorst <lindhors@linux.vnet.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-29[MTD] [NAND] Update CAFÉ driver interrupt handler prototypeDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28[MTD] replace kmalloc+memset with kzallocBurman Yan
Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28Merge git://git.infradead.org/~dwmw2/cafe-2.6David Woodhouse
2006-11-28[MTD] [NAND] remove len/ooblen confusion.Vitaly Wool
As was discussed between Ricard Wanderlöf, David Woodhouse, Artem Bityutskiy and me, the current API for reading/writing OOB is confusing. The thing that introduces confusion is the need to specify ops.len together with ops.ooblen for reads/writes that concern only OOB not data area. So, ops.len is overloaded: when ops.datbuf != NULL it serves to specify the length of the data read, and when ops.datbuf == NULL, it serves to specify the full OOB read length. The patch inlined below is the slightly updated version of the previous patch serving the same purpose, but with the new Artem's comments taken into account. Artem, BTW, thanks a lot for your valuable input! Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28[MTD] [NAND] Fix endianess bug in ndfc.cStefan Roese
The writel() call accidentally clears all bits in the NDFC_CCR register (endianess problem). Now __raw_writel() is used instead. Tested on Bamboo with NAND on chip select 0 and chip select 1. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28[MTD] [NAND] rtc_from4.c: use lib/bitrev.cAdrian Bunk
This patch converts drivers/mtd/nand/rtc_from4.c to use the new lib/bitrev.c Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-01[MTD] NAND: Fix ECC settings in CAFÉ controller driver.David Woodhouse
We were resetting cafe->ctl2 to zero after an erase (and also during a write, but it was correctly reset after that). This meant that ECC reads after an erase were failing. Doh. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-31[MTD] NAND: Add register debugging spew option to CAFÉ driverDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-31[MTD] NAND: Use register #defines throughout CAFÉ driver, not numbersDavid Woodhouse
Also use cafe_readl() and cafe_writel() abstraction to make code slightly cleaner -- especially if we want to use it in PIO mode. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-28[MTD] NAND: Fix timing calculation in CAFÉ debugging messageDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[PATCH] silence 'make xmldocs' warning by adding missing description of ↵Jesper Juhl
'raw' in nand_base.c:1485 Add description of 'raw' in comments for drivers/mtd/nand/nand_base.c::nand_write_page_syndrome() so 'make xmldocs' will not spew a warning at us. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-27[MTD] NAND: Remove empty block ECC workaroundDavid Woodhouse
They fixed the hardware so that ECC doesn't fail on reading an empty block. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[MTD] NAND: Add ECC debugging for CAFÉDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[MTD] CAFÉ NAND: Add 'slowtiming' parameter, default usedma and checkecc onDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[MTD] NAND: Reset Café controller before initialising.David Woodhouse
Fixes http://dev.laptop.org/ticket/237 Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[MTD] NAND: Café ECC -- remove spurious BUG_ON() in err_pos()David Woodhouse
Being a value which isn't in the table is a case we explicitly check for in the caller. Don't BUG_ON() because it does actually happen in practice. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-26[MTD] NAND: Fix nand_default_mark_blockbad() when flash-based BBT disabledRicard Wanderlöf
When a flash-based BBT is not used, nand_default_mark_blockbad() is supposed to mark the block bad in the oob. However, it sets the wrong length variable so that no bad block marker is in fact written. This patch attempts to rectify that. (As note, it seems to be that logically, it shouldn't be necessary to set both length variables, as one appears to be for the main buffer, and one for the oob buffer, but this is how it is done in several places, including the code for the mtd character device MEMWRITEOOB and MEMREADOOB ioctls. I'm not sure if this is a temporary solution during some rework of the mtd infrastructure, or whether there is a deeper thought here.) Signed-off-by: Ricard Wanderlöf <ricardw@axis.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-23[MTD] NAND: Disable ECC checking on CAFÉ since it's broken for nowDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-22[MTD] NAND: CAFÉ NAND driver cleanup, fix ECC on reading empty flashDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-22[MTD] NAND: Add hardware ECC correction support to CAFÉ NAND driverDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-22Merge git://git.infradead.org/~dwmw2/cafe-2.6David Woodhouse
Conflicts: drivers/mtd/nand/Kconfig
2006-10-22[MTD] NAND: Correct setting of chip->oob_poi OOB bufferDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-21[MTD] NAND: Combined oob buffer so it's contiguous with dataDavid Woodhouse
Ditch the separate oobrbuf and oobwbuf fields from the chip buffers, and use only a single buffer immediately after the data. This accommodates NAND controllers such as the OLPC CAFÉ chip, which can't do scatter/gather DMA so needs the OOB buffer to be contiguous with the data, for both read and write. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-21Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6