aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2008-07-11[MTD] [NOR] gen_probe: No debug message when debugging is disabledJean Delvare
Use pr_debug(...) instead of printk(KERN_DEBUG ...) so that the message is only printed when debugging is enabled. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: John stoffel <john@stoffel.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [NAND] remove __PPC__ hardcoded address from DiskOnChip driversMilton Miller
Such a hardcoded address can cause a checkstop or machine check if the driver is in the kernel but the address is not acknowledged. Both drivers allow an address to be specified as either a module parameter or config option. Any future powerpc board should either use one of these methods or find the address in the device tree. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [MAPS] Remove the bast-flash driver.Ben Dooks
Remove the Simtec BAST flash driver as this has been replaced by using the platform flash driver. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [NAND] fsl_elbc_nand: ecclayout cleanupsAnton Vorontsov
This patch deletes oobavail assignments, they're calculated by the nand core code in nand_scan_tail, plus current oobavail values are wrong for the LP NANDs. Also remove mtd->ecclayout and mtd->oobavail assignments, mtd core handles this all by itself. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [NAND] fsl_elbc_nand: implement support for flash-based BBTAnton Vorontsov
This patch implements support for flash-based BBT for chips working through ELBC NAND controller, so that NAND core will not have to re-scan for bad blocks on every boot. Because ELBC controller may provide HW-generated ECCs we should adjust bbt pattern and bbt version positions in the OOB free area. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chipsAnton Vorontsov
For large page chips, nand_bbt is looking into OOB area, and checking for "0xff 0xff" pattern at OOB offset 0. That is, two bytes should be reserved for bbt means. But ELBC driver is specifying ecclayout so that oobfree area starts at offset 1, so only one byte left for the bbt purposes. This causes problems with any OOB users, namely JFFS2: after first mount JFFS2 will fill all OOBs with "erased marker", so OOBs will contain: OOB Data: ff 19 85 20 03 00 ff ff ff 00 00 08 ff ff ff ff OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff And on the next boot, NAND core will rescan for bad blocks, then will see "0xff 0x19" pattern, and will mark all blocks as bad ones. To fix the issue we should implement our own bad block pattern: just one byte at OOB start. Though, this will work only for x8 chips. For x16 chips two bytes must be checked. Since ELBC driver does not support x16 NANDs (yet), we're safe for now. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [NAND] atmel_nand can be modularDavid Brownell
There's no reason to prevent the Atmel NAND driver from building as a module. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [NAND] atmel_nand: Work around AT32AP7000 ECC erratumHaavard Skinnemoen
The ALE signal isn't correctly wired up to the ECC controller on the AP7000, so it starts calculating ECC during the address cycles. Work around this by resetting the ECC controller between the address and data cycles. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [NAND] atmel_nand speedup via {read,write}s{b,w}()David Brownell
This uses __raw_{read,write}s{b,w}() primitives to access data on NAND chips for more efficient I/O. On an arm926 with memory clocked at 100 MHz, this reduced the elapsed time for a 64 MiB read by 16%. ("dd" /dev/mtd0 to /dev/null, with an 8-bit NAND using hardware ECC and 128KiB blocksize.) Also some minor section tweaks: - Use platform_driver_probe() so no pointer to probe() lingers after that code has been removed at run-time. - Use __exit and __exit_p so the remove() code will normally be removed by the linker. Since these buffer read/write calls are new, this increases the runtime code footprint (by 88 bytes on my build, after the section tweaks). [haavard.skinnemoen@atmel.com: rebase onto atmel_nand rename] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] mtdchar.c remove shadowed variable warningsHarvey Harrison
Use einfo, oinfo for the inner erase_info and otp_info structs used in individual case statements. drivers/mtd/mtdchar.c:582:26: warning: symbol 'info' shadows an earlier one drivers/mtd/mtdchar.c:380:23: originally declared here drivers/mtd/mtdchar.c:596:26: warning: symbol 'info' shadows an earlier one drivers/mtd/mtdchar.c:380:23: originally declared here drivers/mtd/mtdchar.c:704:19: warning: symbol 'info' shadows an earlier one drivers/mtd/mtdchar.c:380:23: originally declared here Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] mtdchar.c silence sparse warningHarvey Harrison
The copy_to_user was casting away the address space to get the offset of the length member. Use offsetof() instead and add it to the void __user *argp. drivers/mtd/mtdchar.c:527:23: warning: cast removes address space of expression drivers/mtd/mtdchar.c:527:23: warning: incorrect type in argument 1 (different address spaces) drivers/mtd/mtdchar.c:527:23: expected void [noderef] <asn:1>*to drivers/mtd/mtdchar.c:527:23: got unsigned int *<noident> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] m25p80: fix bug - ATmel spi flash fails to be copied toMichael Hennerich
Atmel serial flash tends to power up with the protection status bits set. http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=4089 [michael.hennerich@analog.com: remove duplicate code] Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> 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-07-10Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', ↵Russell King
'omap-reviewed', 'rpc', 'rtc' and 's3c' into devel
2008-07-09[ARM] 5105/1: CM-X270: update NAND flash driver to use gpio_libMike Rapoport
Update CM-X270 NAND flash driver to use gpio_lib. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-03ARM: OMAP: Change omap_cf.c and omap_nor.c to use omap_readw/writew instead ↵Tony Lindgren
of __REG Change omap_cf.c and omap_nor.c to use omap_readw/writew instead of __REG. This is needed for multi-omap in the future. Cc: David Brownell <david-b@pacbell.net> Cc: linux-pcmcia@lists.infradead.org Cc: linux-mtd@lists.infradead.org Signed-off-by: Tony Lindren <tony@atomide.com>
2008-06-30[MTD] orion_nand: add chip_delay parameterSaeed Bishara
Some SoCs need a different chip_delay value. Signed-off-by: Saeed Bishara <saeed@marvell.com> Acked-by: Jörn Engel <joern@logfs.org> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
2008-06-24pcmcia: (re)move {pcmcia,pccard}_get_statusDominik Brodowski
Except for one debug message in a driver marked BROKEN, pcmcia_get_status is only used by the ioctl. Therefore, move it to pcmcia_ioctl.c and unexport it. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: remove unused bulkmem.hMagnus Damm
The code in include/pcmcia/bulkmem.h was only kept for compatibility reasons. Therefore, move the remaining region_info_t definition to ds.h [linux@dominikbrodowski.net: do not modify the IOCTL, move definition to ds.h, and update changelog] Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: simplify pccard_validate_cisDominik Brodowski
As cisinfo_t only contains one unsigned_int, pccard_validate_cis can be simplified by passing that around directly. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-20UBI: cdev lock_kernel() pushdownJonathan Corbet
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20mtdchar: cdev lock_kernel() pushdownJonathan Corbet
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-07[MTD] [NAND] Fix checkpatch warnings which showed up when atmel_nand.c movedDavid Woodhouse
Some of them, at least. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] atmel_nand: make available on AVR32Håvard Skinnemoen
Make the atmel_nand driver selectable on AVR32, and update the Kconfig help text to reflect this. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] atmel_nand: Clean up and fix probe() error pathHåvard Skinnemoen
This fixes several bugs in the atmel_nand_probe() error path, including at least one memory leak. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] rename at91_nand -> atmel_nand: internal symbolsHåvard Skinnemoen
This is basically s/at91_nand/atmel_nand/g with some manual inspection. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] rename at91_nand -> atmel_nand: file names and KconfigHåvard Skinnemoen
The AT91 NAND driver needs just a few tiny modifications to work on AVR32 as well. Rename it atmel_nand to reflect this. Also move the ECC register definitions into drivers/mtd/nand since they are only useful to the atmel_nand driver, and get rid of the useless filename at the top of each file. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] at91_nand: Convert to generic GPIO APIHåvard Skinnemoen
No point in using an AT91-specific GPIO API when the generic API works just as well. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] fsl_elbc_nand: fix section mismatch between probe and removeAnton Vorontsov
WARNING: drivers/mtd/nand/built-in.o(.devinit.text+0x114): Section mismatch in reference from the function fsl_elbc_ctrl_probe() to the function .devexit.text:fsl_elbc_ctrl_remove() __devinit functions should not call functions with __devexit. Since probe function calls remove in case of errors, we want to remove __devexit attribute from it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-06Merge git://git.infradead.org/~dwmw2/mtd-2.6.26Linus Torvalds
* git://git.infradead.org/~dwmw2/mtd-2.6.26: [MTD] m25p80.c mutex unlock fix
2008-06-06Fix various old email addresses for dwmw2David Woodhouse
Although if people have questions about ARCnet, perhaps it's _better_ for them to be mailing dwmw2@cam.ac.uk about it... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06[MTD] m25p80.c mutex unlock fixChen Gong
fix a mutex release bug in function m25p80_write. Signed-off-by: Chen Gong <g.chen@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-05[MTD] [NAND] nandsim: missing header for do_divRandy Dunlap
Fix nandsim build error, missing #include: linux-next-20080605/drivers/mtd/nand/nandsim.c: In function 'divide': linux-next-20080605/drivers/mtd/nand/nandsim.c:462: error: implicit declaration of function 'do_div' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
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] [NAND] S3C2410: Remove changelog and tidy headerBen Dooks
The changelog on the driver is superflous given this is being kept under revision control. Remove the other cruft in the header and update the copyright and the supported device list. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [NAND] S3C2410: Change printk() into dev_dbg()Ben Dooks
Fix a minor problem with what should have been debug output by changing printk() to dev_dbg() inside s3c2410_nand_update_chip(). Thanks to David Woodhouse for pointing this out. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [MAPS] Blackfin Async Flash MapsMike Frysinger
Handle the case where flash memory and ethernet mac/phy are mapped onto the same async bank [try #4] - drop superfluous casts - drop SSYNC() when reading from the flash and rewrite bfin_copy_from() to be like bfin_copy_to() so that we dont have to handle all the aligned/unaligned cases [try #3] rename bf5xx-flash to bfin-async-flash - move all kconfig board settings into board resources - fixup casting style according to lkml feedback - rewrite driver so that it can handle arbitrary of instances according to the declared platform resources [try #2] Remove useless SSYNC() as Will said [try #1] The BF533-STAMP does this for example. All board-specific configuration goes in your board resources file. Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Acked-By: Jörn Engel <joern@logfs.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] Use list_for_each_entry[_safe] where appropriate.Chris Malley
Janitorial work to remove temporary pointers and make some functions a bit more readable. Signed-off-by: Chris Malley <mail@chrismalley.co.uk> Reviewed-By: Jörn Engel <joern@logfs.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04MTD/JFFS2: remove CVS keywordsAdrian Bunk
Once upon a time, the MTD repository was using CVS. This patch therefore removes all usages of the no longer updated CVS keywords from the MTD code. This also includes code that printed them to the user. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [NAND] nandsim: allow for 64-bit sizeAdrian Hunter
Amend nandsim so that it does not assume 32-bit flash size. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [NAND] nandsim: fix overridesizeAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [NAND] nandsim: fix size bugAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.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-06-04[MTD] DataFlash: use proper typesDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] DataFlash: fix bug - ATMEL AT45DF321D spi flash card fails to be ↵Michael Hennerich
copied to (v2) - Add support for binary page size DataFlashes. - The driver now prints out pagesize and erasesize. Printout valuable information for creating flash filesystems. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [NAND] pxa: fix incorrect calling of pxa3xx_nand_config() on resume pathEric Miao
Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] use list_for_each_entry() in del_mtd_device()matthias@kaehlcke.net
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] use list_for_each_entry() in add_mtd_device()matthias@kaehlcke.net
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [NAND] excite_nandflash: simplify code using ARRAY_SIZE() macro.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-04[MTD] [NAND] fix 2 "unused variable" warnings in cafe_nand.cToralf Förster
Signed-off-by: Toralf Förster <toralf.foerster@gmx.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>