aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-09-17[MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar lseek()Josef 'Jeff' Sipek1-6/+3
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-16MTD: Fix bug in fixup_convert_atmel_priHåvard Skinnemoen1-1/+1
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>
2006-09-05[PATCH] [MTD] DEVICES: Fill more device IDs in the structure of m25p80Aubrey Lee1-6/+6
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>
2006-08-30Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6David Woodhouse2-6/+10
2006-08-27[PATCH] MTD NAND: Fix ams-delta after core conversionJonathan McDowell1-4/+6
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>
2006-08-27[PATCH] mtd corruption fixRichard Purdie1-2/+4
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>
2006-08-16MTD: Add lock/unlock operations for Atmel AT49BV6416Haavard Skinnemoen1-0/+90
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>
2006-08-16MTD: Convert Atmel PRI information to AMD formatHaavard Skinnemoen1-0/+21
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>
2006-08-15[PATCH] [MTD] Maps: Add dependency on alternate probe methods to physmapTakashi YOSHII1-6/+6
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>
2006-08-14[PATCH] MTD: Add Macronix MX29F040 to JEDECTakashi YOSHI1-0/+14
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2006-07-15[MTD] Fixes of performance and stability issues in CFI driver.Alexey Korolev1-44/+43
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>
2006-07-15block2mtd.c: Make kernel boot command line arguments work (try 4)Ville Herva1-30/+63
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>
2006-07-15[MTD NAND] Fix lookup error in nand_get_flash_type()David Woodhouse1-1/+1
Spotted by liyu <liyu@ccoss.com.cn> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-07-15remove #error on !PCI from pmc551.cRolf Eike Beer1-4/+0
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>
2006-07-15MTD: [NAND] Fix the sharpsl driver after breakage from a core conversionRichard Purdie1-2/+5
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>
2006-07-11[MTD] NAND: OOB buffer offset fixupsVitaly Wool1-2/+2
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>
2006-07-05[PATCH] [MTD] NAND: fix dead URL in KconfigArtem B. Bityutskiy1-1/+1
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
2006-07-03Merge git://git.infradead.org/mtd-2.6Linus Torvalds6-332/+216
* 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
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel51-51/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-29[MTD] NAND: Fix broken sharpsl driverThomas Gleixner1-7/+0
Remove the not longer supported NO_VIRTBLOCKS flag and remove an unused variable while at it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-29Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds5-12/+16
* 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 ;)
2006-06-29MTD: fix all kernel-doc warningsRandy Dunlap2-10/+9
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>
2006-06-28[MTD] DOC: Fixup read functions and do a little cleanupThomas Gleixner3-315/+207
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>
2006-06-27Merge git://git.infradead.org/mtd-2.6Linus Torvalds18-67/+142
* 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
2006-06-27[MTD] NAND: Select chip before checking write protect statusThomas Gleixner1-3/+3
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>
2006-06-27[MTD] CORE mtdchar.c: fix off-by-one error in lseek()Herbert Valerio Riedel1-1/+1
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>
2006-06-27[MTD] NAND: Fix typo in mtd/nand/ts7250.cPetr Stetiar1-1/+1
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>
2006-06-27[PATCH] 64bit resource: fix up printks for resources in mtd driversGreg Kroah-Hartman5-12/+16
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>
2006-06-27[MTD] Fix off-by-one error in physmap.cSascha Hauer1-1/+1
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>
2006-06-27[MTD] Remove unused 'nr_banks' variable from ixp2000 map driverLennert Buytenhek1-2/+0
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-27[MTD NAND] s3c2412 support in s3c2410.cBen Dooks1-43/+111
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>
2006-06-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2-3/+3
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits) kbuild: trivial fixes in Makefile kbuild: adding symbols in Kconfig and defconfig to TAGS kbuild: replace abort() with exit(1) kbuild: support for %.symtypes files kbuild: fix silentoldconfig recursion kbuild: add option for stripping modules while installing them kbuild: kill some false positives from modpost kbuild: export-symbol usage report generator kbuild: fix make -rR breakage kbuild: append -dirty for updated but uncommited changes kbuild: append git revision for all untagged commits kbuild: fix module.symvers parsing in modpost kbuild: ignore make's built-in rules & variables kbuild: bugfix with initramfs kbuild: modpost build fix kbuild: check license compatibility when building modules kbuild: export-type enhancement to modpost.c kbuild: add dependency on kernel.release to the package targets kbuild: `make kernelrelease' speedup kconfig: KCONFIG_OVERWRITECONFIG ...
2006-06-25[MTD] sun_uflash: Port to new EBUS device layer.David S. Miller1-100/+95
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-22[MTD] Initialize 'writesize'Artem B. Bityutskiy11-2/+13
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
2006-06-22[MTD] NAND: ndfc fix address offset thinkoThomas Gleixner1-3/+3
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>
2006-06-21[MTD] NAND: S3C2410 convert prinks to dev_*()sBen Dooks1-6/+4
Convert the use of printk() to the correct dev_info/dev_err functions Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-21[MTD] NAND: Missing fixupsSavin Zlobec1-5/+5
The oob fixups broke a return value and missed one patch from the Mailing List. Signed-off-by: Savin Zlobec <savin@epico.si> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-20[MTD] NAND: Fix breakage all over the placeThomas Gleixner3-87/+220
Following problems are addressed: - wrong status caused early break out of nand_wait() - removed the bogus status check in nand_wait() which is a relict of the abandoned support for interrupted erase. - status check moved to the correct place in read_oob - oob support for syndrom based ecc with strange layouts - use given offset in the AUTOOOB based oob operations Partially based on a patch from Vitaly Vool <vwool@ru.mvista.com> Thanks to Savin Zlobec <savin@epico.si> for tracking down the status problem. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-20[PATCH] NAND: fix remaining OOB length calculationVitaly Wool1-2/+2
In nand_read_page_syndrome/nand_write_page_syndrome the calculation of the remaining oob length which is not used by the prepad/ecc/postpad areas is wrong. Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-20[MTD] NAND Fixup NDFC merge brokenessThomas Gleixner1-9/+4
Remove the remains of a broken merge. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-06-19[MTD NAND] S3C2410 driver cleanupBen Dooks1-8/+3
Fix unused variables and commenting since tglx's new NAND updates Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-19[MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation.Ben Dooks2-5/+81
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-14[MTD] Restore MTD_ROM and MTD_RAM typesDavid Woodhouse8-8/+8
Let's not attempt the abolition of mtd->type until/unless it's properly thought through. And certainly, let's not do it by halves. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-14[MTD] assume mtd->writesize is 1 for NOR flashesArtem B. Bityutskiy7-0/+7
Signed-off-by: Artem B. Bityitskiy
2006-06-10[MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compilesDavid Woodhouse1-5/+5
Fix the control bit handling so it even looks like it might work, too. Bad tglx. No biscuit. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-09kconfig: remove leading whitespace in menu promptsRoman Zippel2-3/+3
This removes all the leading whitespace kconfig now warns about. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-09[MTD] Prepare physmap for 64-bit-resourcesAndrew Morton1-3/+3
Fallout from the incoming 64-bit-resource stuff: drivers/mtd/maps/physmap.c: In function 'physmap_flash_probe': drivers/mtd/maps/physmap.c:94: warning: format '%.8lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' drivers/mtd/maps/physmap.c:94: warning: format '%.8lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-30[MTD] Disconnect struct mtd_info from ABIJoern Engel1-1/+10
mtdchar.c direcly copied part of struct mtd_info to userspace, thereby implicitly making it part of the ABI. With this patch, struct mtd_info is independent of the ABI and can have its fields removed, reordered, etc. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30[MTD] replace MTD_RAM with MTD_GENERIC_TYPEJoern Engel8-8/+8
Ram devices get the extra capability of MTD_NO_ERASE - not requiring an explicit erase before writing to it. Currently only mtdblock uses this capability. Rest of the patch is a simple text replacement. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30[MTD] replace MTD_ROM with MTD_GENERIC_TYPEJoern Engel1-4/+2
No mtd user should ever check for the device type. Instead, device features should be checked by the flags - if at all. As a first step towards type removal, change MTD_ROM into MTD_GENERIC_TYPE. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>