aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
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] redboot partition combined fis / config problemYoshinori Sato
Can't analyze FIS directory in CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG really. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> 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-12-01[MTD] bugfix: DataFlash is not bit writableHaavard Skinnemoen
This patch fixes the "jffs2_flash_writev(): Non-contiguous write to 00825300 with mtd_dataflash" bug. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Artem Bityutskiy <dedekind@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-29[MTD] Use EXPORT_SYMBOL_GPL() for exported symbols.David Woodhouse
While we're fixing up the newly-added symbol, change the neighbouring ones too, for consistency and also to reflect the author's interpretation of the GPL -- which is that _no_ non-GPL modules are permitted. The author always intended his code to be released under the GPL, and believes that any new interpretation of 'EXPORT_SYMBOL' as being any different from 'EXPORT_SYMBOL_GPL' is entirely invalid; the GPL requires that _all_ exports have the semantics of the new 'EXPORT_SYMBOL_GPL', which means the extra four characters are entirely redundant. But since those four extra characters trigger the check for illegal modules in a way that just EXPORT_SYMBOL does not, it's useful to change anyway. This action in no way indicates an admission that there is any legal distinction between the two states, and in particular does not indicate that the author believes that non-GPL modules may use symbols exported with EXPORT_SYMBOL alone. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-29[MTD] return error code from get_mtd_device()Artem Bityutskiy
get_mtd_device() returns NULL in case of any failure. Teach it to return an error code instead. Fix all users as well. Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29[MTD] add get and put methodsArtem Bityutskiy
This patch adds get_device() and put_device() methods to the MTD description structure (struct mtd_info). These methods are called by MTD whenever the MTD device is get or put. They are needed when the underlying driver is something smarter then just flash chip driver, for example UBI. Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29[MTD] add get_mtd_device_nm() functionArtem Bityutskiy
This patch adds one more function to the MTD interface to make it possible to open MTD devices by their names, not only numbers. This is very handy in many situations. Also, MTD device number depend on load order and may vary, while names are fixed. Signed-off-by: Artem Bityutskiy <dedekind@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] add MTD_BLKDEVS Kconfig optionJosh Boyer
Add a MTD_BLKDEVS Kconfig option to cleanup the makefile a bit Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29[MTD] fix map probe name for cstm_mips_ixxYoichi Yuasa
This patch has fixed name of map probe for cstm_mips_ixx.c Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-28[PATCH] Fix Intel/Sharp command set erase suspend bugJoakim Tjernlund
When we sleep and wait for a suspended operation to be resumed, go back and check until it's ready -- don't just continue after the first time we're woken. This can cause file system corruption. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Linus Torvalds <torvalds@osdl.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-29Merge git://git.infradead.org/~kmpark/onenand-mtd-2.6David Woodhouse
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-28[MTD] Fix printk format warning in physmap. (resources again)Randy Dunlap
Fix printk format warning: drivers/mtd/maps/physmap.c:93: warning: long long unsigned int format, long unsigned int arg (arg 2) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> 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] Allow variable block sizes in mtd_blkdevsRichard Purdie
Currently, mtd_blkdevs enforces a block size of 512, even if the drivers can seemingly request a different size. This patch fixes mtd_blkdevs so block sizes other than 512 work correctly. Signed-off-by: Richard Purdie <rpurdie@openedhand.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28[MTD] [MAPS] Support for BIOS flash chips on the nvidia ck804 southbridgeDave Olsen
Add support for accessing BIOS flash chips connected to the NVIDIA ck804 southbridge. Signed-off-by: Ryan Jackson <rjackson@lnxi.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] make drivers/mtd/cmdlinepart.c:mtdpart_setup() staticAdrian Bunk
This patch makes the needlessly global mtdpart_setup() static. Signed-off-by: Adrian Bunk <bunk@stusta.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-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-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