aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAge
* [MTD] Whitespace cleanup in SSFDC driver.David Woodhouse2006-09-23
| | | | | | Says akpm: ' - search for "( " and " )", fix.' Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] SSFDC translation layer minor cleanupDavid Woodhouse2006-09-23
| | | | | | | | Don't include <linux/config.h>. Don't say 'MB' where you mean 'MiB'. Don't allocate 512 bytes on the stack. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix dependencies with CONFIG_MTD=mDavid Woodhouse2006-09-23
| | | | | | | CMDLINEPARTS shouldn't be selectable, and neither should SSFDC, which can be a tristate anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Revert "[MTD] blkdev helper code: fix printk format warning"David Woodhouse2006-09-22
| | | | | | | | | | This reverts commit 668040fcd1e06fc3e68a92708cbdfa5a52c37d3c. The 'flags' field of the struct request is 'unsigned long'. Quite how Randy came to see 'long int format, different type arg' I don't know, but it doesn't seem to be the case any more. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Add SSFDC (SmartMedia) read-only translation layerClaudio Lanconelli2006-09-22
| | | | | Signed-off-by: Claudio Lanconelli <lanconelli.claudio@eptar.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] pmc551 pci cleanupJiri Slaby2006-09-22
| | | | | | | | Use pci_resource_start for getting start of regions and pci_iomap to not doing this directly by using dev->resource... (Thanks to Rolf Eike Beer) Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] pmc551 use kzallocJiri Slaby2006-09-22
| | | | | | | Use kzalloc instad of kmalloc+memset(0). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] pmc551 whitespace cleanupJiri Slaby2006-09-22
| | | | | | | | Spaces were used for indent, there was more than 80 columns per line. Get rid of that stuff. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Remove iq80310 map driverLennert Buytenhek2006-09-22
| | | | | | | | | | The iq80310 mtd map driver depends on ARCH_IQ80310, which isn't defined anywhere in the tree (as we don't have 80310 support), and furthermore, everything the driver does can be done with physmap instead. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Fix in typo ndfc.c causing wrong ECC layoutFrank Haverkamp2006-09-22
| | | | | | | Due to this typo, a wrong ECC layout table is chosen. Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] physmap: add power management supportLennert Buytenhek2006-09-22
| | | | | | | | Implement PM handling for physmap. Idea from Steven Scholz, patch by David Anders. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ioremap balanced with iounmap for drivers/mtd subsystemAmol Lad2006-09-22
| | | | | | | | | | | | | ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Tested (compilation only) with: - allmodconfig - Modifying drivers/mtd/maps/Kconfig and drivers/mtd/nand/Kconfig to make sure that the changed file is compiling without warning Signed-off-by: Amol Lad <amol@verismonetworks.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Switch to pci_get_device and do ref countingAlan Cox2006-09-22
| | | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] blkdev helper code: fix printk format warningRandy Dunlap2006-09-22
| | | | | | | | | Fix printk format warning(s): drivers/mtd/mtd_blkdevs.c:72: warning: long int format, different type arg (arg 2) Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix ixp4xx partition parsing.Brian Walsh2006-09-22
| | | | | | | | | | | | If the amount of flash is not divisible by 2 then the mask in parse_mtd_partitions would fail to work as designed. Passing in the base address corrects this problem. Signed-off-by: Brian Walsh <brian@walsh.ws> Cc: Deepak Sanexa <dsanexa@mvista.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Remove old code in au1550nd.cMichal Piotrowski2006-09-22
| | | | | | Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Unlock NOR flash automatically where necessaryHåvard Skinnemoen2006-09-22
| | | | | | | | | | | | | | | | | Introduce the MTD_STUPID_LOCK flag which indicates that the flash chip is always locked after power-up, so all sectors need to be unlocked before it is usable. If this flag is set, and the chip provides an unlock() operation, mtd_add_device will unlock the whole MTD device if it's writeable. This means that non-writeable partitions will stay locked. Set MTD_STUPID_LOCK in fixup_use_atmel_lock() so that these chips will work as expected. Signed-off-by: Håvard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar lseek()Josef 'Jeff' Sipek2006-09-17
| | | | | Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* MTD: Fix bug in fixup_convert_atmel_priHåvard Skinnemoen2006-09-16
| | | | | | | | | | | The memset() in fixup_convert_atmel_pri is supposed to zero out everything except the first 5 bytes in *extp, but it ends up zeroing out something way outside the struct instead. Fix this potentially dangerous code by casting the pointer to char * before doing arithmetic. Signed-off-by: Håvard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [PATCH] [MTD] DEVICES: Fill more device IDs in the structure of m25p80Aubrey Lee2006-09-05
| | | | | | | | The flash_info structure has a bunch of missing fields which causes problems when actually tryin to use some ST parts as it gets detected incorrectly. Signed-off-by: Aubrey L1 <aubreylee@gmail.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
* Merge branch 'master' of ↵David Woodhouse2006-08-30
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * [PATCH] MTD NAND: Fix ams-delta after core conversionJonathan McDowell2006-08-27
| | | | | | | | | | | | | | | | | | | | | | The recent hwctrl core conversion for MTD NAND devices broke the Amstrad Delta driver. This fixes it up and uses the existing control line defines rather than unclear magic numbers. Signed-off-by: Jonathan McDowell <noodles@earth.li> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] mtd corruption fixRichard Purdie2006-08-27
| | | | | | | | | | | | | | | | | | | | | | | | Read the return value before we release the nand device otherwise the value can become corrupted by another user of chip->ops, ultimately resulting in filesystem corruption. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Josh Boyer <jwboyer@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | MTD: Add lock/unlock operations for Atmel AT49BV6416Haavard Skinnemoen2006-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The AT49BV6416 is locked by default, so we really need to provide at least the unlock() operation for write and erase to work. This patch implements both ->lock() and ->unlock() and provides a fixup to install them when an AT49BV6416 chip is detected. These functions are probably valid on more Atmel chips, but I believe it's mostly obsolete ones. The AT49BV6416 is in fact obsolete, but it's used on all current AT32STK1000 development boards. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
* | MTD: Convert Atmel PRI information to AMD formatHaavard Skinnemoen2006-08-16
| | | | | | | | | | | | | | | | | | | | | | | | Atmel flash chips don't have PRI information in the same format as AMD flash chips. This patch installs a fixup for all Atmel chips that converts the relevant PRI fields into AMD format. Only the fields that are actually used by the command set is actually converted. The rest are initialized to zero (which should be safe) Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
* | [PATCH] [MTD] Maps: Add dependency on alternate probe methods to physmapTakashi YOSHII2006-08-15
| | | | | | | | | | | | | | | | | | map/physmap.c tries to probe "cfi_probe", "jedec_probe" and "map_rom", but map/Kconfig says it depends on MTD_CFI only. This patch adds MTD_JEDECPROBE and MTD_ROM to the dependency condition. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
* | [PATCH] MTD: Add Macronix MX29F040 to JEDECTakashi YOSHI2006-08-14
| | | | | | | | | | Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
* | [MTD] Fixes of performance and stability issues in CFI driver.Alexey Korolev2006-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix of performance and stability issues on Intel NOR chips. It fixes: 1. Very low write performance on Sibley (perf tests demonstrated write performance less than 100Kb/sec when it should be over 400Kb/sec). 2. Low erase performance. (perf tests on Sibleuy demonstrated erase performance 246Kb/sec when it should be over 300Kb/sec). 3. Error on JFFS2 tests with CPU loading application when MTD returns "block erase error: (status timeout)" To fix the issue it does the following: 1. Removes the timeout tuning from inval_cache_and_wait_for_operation. 2. Waiting conditions in inval_cache_and_wait_for_operation now is based on timer resolution If timeout is lower than timer resolution then we do in cycle "Checking the status" udelay(1); cond_resched(); If timeout is greater than timer resolution (probably erase operation) We do the following sleep for half of operation timeout and do in cycle the following "Checking the status" sleep for timer resolution Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Alexey Korolev <akorolev@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | block2mtd.c: Make kernel boot command line arguments work (try 4)Ville Herva2006-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to pass kernel command line arguments to block2mtd at boot-time does not work currently. block2mtd_setup() is called so early that kmalloc() fails nevermind being able to do open_bdev_excl() (which requires rootfs to be mounted. This patch only saves the option string at the early boot stage, and parses them later when block2mtd_init() is called. If open_bdev_excl() fails, open_by_devnum(name_to_dev_t()) is tried instead, which makes it possible to initialize the driver before rootfs has been mounted. Also gets rid of the superfluous parse_name() that only checks if name is longer than 80 chars and copies it to a string that is not kfreed. With this patch, I can boot statically compiled block2mtd, and mount jffs2 as rootfs (without modules or initrd), with lilo config like this: root=/dev/mtdblock0 append="rootfstype=jffs2 block2mtd.block2mtd=/dev/hdc2,65536" (Note that rootfstype=jffs2 is required, since the kernel only tries filesystems without "nodev" attribute by default, and jffs is "nodev"). Compared to first version of this patch, this one does not copy the parameters to the global buffer if init has already been called, and the global array is marked as __initdata. Compared to the second version of this patch, module build is fixed. Compared to the third version of this patch, statically compiled block2mtd driver with no boot-time parameter no longer gives spurious error 'cannot open device ""' Signed-off-by: Ville Herva <vherva@vianova.fi> Acked-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD NAND] Fix lookup error in nand_get_flash_type()David Woodhouse2006-07-15
| | | | | | | | | | Spotted by liyu <liyu@ccoss.com.cn> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | remove #error on !PCI from pmc551.cRolf Eike Beer2006-07-15
| | | | | | | | | | | | | | | | PMC551 depends on PCI in Kconfig so there is no need to #error in code if PCI is not set. Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | MTD: [NAND] Fix the sharpsl driver after breakage from a core conversionRichard Purdie2006-07-15
| | | | | | | | | | | | | | | | The CNE bits are inverted on the device and writeb function is missing a NOT operation. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] NAND: OOB buffer offset fixupsVitaly Wool2006-07-11
| | | | | | | | | | | | | | | | | | | | | | In the case of data-pad-ecc-pad-data... layout the oob start position has to be sizeof(data) in nand_write_oob_syndrom(). In nand_fill_oob() we need to copy to buf + buffer offset instead of buf + write offset. From: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [PATCH] [MTD] NAND: fix dead URL in KconfigArtem B. Bityutskiy2006-07-05
|/ | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
* Merge git://git.infradead.org/mtd-2.6Linus Torvalds2006-07-04
|\ | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: [JFFS2][XATTR] Fix memory leak in POSIX-ACL support fs/jffs2/: make 2 functions static [MTD] NAND: Fix broken sharpsl driver [JFFS2][XATTR] Fix xd->refcnt race condition MTD: kernel-doc fixes + additions MTD: fix all kernel-doc warnings [MTD] DOC: Fixup read functions and do a little cleanup
| * [MTD] NAND: Fix broken sharpsl driverThomas Gleixner2006-06-29
| | | | | | | | | | | | | | Remove the not longer supported NO_VIRTBLOCKS flag and remove an unused variable while at it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * MTD: fix all kernel-doc warningsRandy Dunlap2006-06-29
| | | | | | | | | | | | | | | | | | | | | | Fix all kernel-doc warnings in MTD headers and source files: - add some missing struct fields; - correct some function parameter names; - use kernel-doc format for function doc. headers; - nand_ecc.c contains only exported interfaces, no internal ones; Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] DOC: Fixup read functions and do a little cleanupThomas Gleixner2006-06-28
| | | | | | | | | | | | | | | | | | The NAND rework resulted in non ECC based reads. Fix it up and do a bit of cleanup while at it. Pointed out by Adrian Bunk. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | Remove obsolete #include <linux/config.h>Jörn Engel2006-06-30
| | | | | | | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds2006-06-29
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: [PATCH] i386: export memory more than 4G through /proc/iomem [PATCH] 64bit Resource: finally enable 64bit resource sizes [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed [PATCH] 64bit resource: change pnp core to use resource_size_t [PATCH] 64bit resource: change pci core and arch code to use resource_size_t [PATCH] 64bit resource: change resource core to use resource_size_t [PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource [PATCH] 64bit resource: fix up printks for resources in misc drivers [PATCH] 64bit resource: fix up printks for resources in arch and core code [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers [PATCH] 64bit resource: fix up printks for resources in video drivers [PATCH] 64bit resource: fix up printks for resources in ide drivers [PATCH] 64bit resource: fix up printks for resources in mtd drivers [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers [PATCH] 64bit resource: fix up printks for resources in networks drivers [PATCH] 64bit resource: fix up printks for resources in sound drivers [PATCH] 64bit resource: C99 changes for struct resource declarations Fixed up trivial conflict in drivers/ide/pci/cmd64x.c (the printk that was changed by the 64-bit resources had been deleted in the meantime ;)
| * [PATCH] 64bit resource: fix up printks for resources in mtd driversGreg Kroah-Hartman2006-06-27
| | | | | | | | | | | | | | | | | | | | This is needed if we wish to change the size of the resource structures. Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge git://git.infradead.org/mtd-2.6Linus Torvalds2006-06-27
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: [MTD] NAND: Select chip before checking write protect status [MTD] CORE mtdchar.c: fix off-by-one error in lseek() [MTD] NAND: Fix typo in mtd/nand/ts7250.c [JFFS2][XATTR] coexistence between xattr and write buffering support. [JFFS2][XATTR] Fix wrong copyright [JFFS2][XATTR] Re-define xd->refcnt as atomic_t [JFFS2][XATTR] Fix memory leak with jffs2_xattr_ref [JFFS2][XATTR] rid unnecessary writing of delete marker. [JFFS2][XATTR] Fix ACL bug when updating null xattr by null ACL. [JFFS2][XATTR] using 'delete marker' for xdatum/xref deletion [MTD] Fix off-by-one error in physmap.c [MTD] Remove unused 'nr_banks' variable from ixp2000 map driver [MTD NAND] s3c2412 support in s3c2410.c [MTD] Initialize 'writesize' [MTD] NAND: ndfc fix address offset thinko [MTD] NAND: S3C2410 convert prinks to dev_*()s [MTD] NAND: Missing fixups
| * [MTD] NAND: Select chip before checking write protect statusThomas Gleixner2006-06-27
| | | | | | | | | | | | | | | | The other way round works not really well with boards which have a static NAND chipselect. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] CORE mtdchar.c: fix off-by-one error in lseek()Herbert Valerio Riedel2006-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow lseek(mtdchar_fd, 0, SEEK_END) to succeed, which currently fails with EINVAL. lseek(fd, 0, SEEK_END) should result into the same fileposition as lseek(fd, 0, SEEK_SET) + read(fd, buf, length(fd)) Furthermore, lseek(fd, 0, SEEK_CUR) should return the current file position, which in case of an encountered EOF should not result in EINVAL Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Fix typo in mtd/nand/ts7250.cPetr Stetiar2006-06-27
| | | | | | | | | | | | | | | | | | | | I was unable to compile ts7250.c after your refactor commit, it's a typo probably. -- ynezz From: Petr Stetiar <ynezz@true.cz> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] Fix off-by-one error in physmap.cSascha Hauer2006-06-27
| | | | | | | | | | | | | | | | This patch fixes a simple off-by-one error in the mtd physmap driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] Remove unused 'nr_banks' variable from ixp2000 map driverLennert Buytenhek2006-06-27
| | | | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD NAND] s3c2412 support in s3c2410.cBen Dooks2006-06-27
| | | | | | | | | | | | | | | | | | | | Add support for both the S3C2412 and S3C2412 Samsung SoCs to the increasingly mis-named s3c2410.c driver. This currently only supports SLC ECCs, and a chip on nFCE0. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] Initialize 'writesize'Artem B. Bityutskiy2006-06-22
| | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
| * [MTD] NAND: ndfc fix address offset thinkoThomas Gleixner2006-06-22
| | | | | | | | | | | | | | | | The rework of the command handling in the nand driver led to wrong address setting in the command control function. Use the correct address again. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>