aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips
Commit message (Collapse)AuthorAge
* [MTD] Restore MTD_ROM and MTD_RAM typesDavid Woodhouse2006-06-14
| | | | | | | 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>
* [MTD] assume mtd->writesize is 1 for NOR flashesArtem B. Bityutskiy2006-06-14
| | | | Signed-off-by: Artem B. Bityitskiy
* [MTD] replace MTD_RAM with MTD_GENERIC_TYPEJoern Engel2006-05-30
| | | | | | | | 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>
* [MTD] replace MTD_ROM with MTD_GENERIC_TYPEJoern Engel2006-05-30
| | | | | | | | 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>
* [MTD] Introduce MTD_BIT_WRITEABLEJoern Engel2006-05-22
| | | | | | | | | | | | | o Add a flag MTD_BIT_WRITEABLE for devices that allow single bits to be cleared. o Replace MTD_PROGRAM_REGIONS with a cleared MTD_BIT_WRITEABLE flag for STMicro and Intel Sibley flashes with internal ECC. Those flashes disallow clearing of single bits, unlike regular NOR flashes, so the new flag models their behaviour better. o Remove MTD_ECC. After the STMicro/Sibley merge, this flag is only set and never checked. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
* [MTD] Merge STMicro NOR_ECC code with Intel Sibley codeJoern Engel2006-05-22
| | | | | | | | | In 2002, STMicro started producing NOR flashes with internal ECC protection for small blocks (8 or 16 bytes). Support for those flashes was added by me. In 2005, Intel Sibley flashes copied this strategy and Nico added support for those. Merge the code for both. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
* [MTD] Introduce writesizeJoern Engel2006-05-22
| | | | | | | | At least two flashes exists that have the concept of a minimum write unit, similar to NAND pages, but no other NAND characteristics. Therefore, rename the minimum write unit to "writesize" for all flashes, including NAND. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
* [MTD] Account for MODULE_SYMBOL_PREFIX when requesting NOR chip driverDavid Woodhouse2006-05-21
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Use __symbol_get() instead of symbol_get() in NOR chip probeDavid Woodhouse2006-05-19
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix printk format error in gen_probe.cDavid Woodhouse2006-05-17
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cfi_cmdset_0001: factorize code to wait for flash statusNicolas Pitre2006-05-16
| | | | | | | | | | | | | This allows for much better abstraction and separation of the XIP and non-XIP cases with their own specific implementations. This fixes the case where a timeout was tripped on in the XIP case by the code that was meant for the non-XIP case only. This also makes for a nice code reduction. Signed-off-by: Nicolas Pitre <nico@cam.org> CC: "Alexey, Korolev" <alexey.korolev@intel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cfi-cmdset-0001: always update the chip statusNicolas Pitre2006-05-16
| | | | | | | ... otherwise xip_enable() won't do the right thing. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* CHIPS: Fix potential starvation in cfi_cmdset_0001Josh Boyer2006-05-16
| | | | | | | | | | | The patch below fixes a potential starvation issue that can arise when there is contention on a chip during a period when a process is currently writing to it. The starvation is avoided by conditionally rescheduling when the chip is left in a state usable by other processes. Signed-off-by: Josh Boyer <jdub@us.ibm.com> Signed-off-by: Tom Gall <tom_gall@vnet.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix legacy character sets throughout drivers/mtd, include/linux/mtdDavid Woodhouse2006-05-13
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Deal correctly with NOR chips which are smaller than the map windowDavid Woodhouse2006-05-13
| | | | | | | | | | | | We used to calculate the number of chips to be zero, allocate an array of that size, then nasty things would happen when we attempt to access the first object in that zero-sized array. Now, if the number of _full_ chips that would fit into the map is zero, we allocate an array of one anyway, and then artificially reduce the total size of the resulting MTD device to fit in the map. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Export cfi_cmdset_0020 and cfi_cmdset_0002 with EXPORT_SYMBOL_GPLDavid Woodhouse2006-05-08
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Remove use of inter_module_crap in NOR flash chip drivers.David Woodhouse2006-05-08
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Remove unchecked MTD flagsJörn Engel2006-04-17
| | | | | | | Several flags are set by some devices, but never checked. Remove them. Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* MTD: remove obsolete Kconfig optionsAnders Larsen2006-03-31
| | | | | | | | | | | | Remove the obsolete Kconfig options MTD_CFI_AMDSTD_RETRY and MTD_CFI_AMDSTD_RETRY_MAX The code that depended on these was removed in early 2004, but Kconfig was not updated accordingly. Signed-off-by: Anders Larsen <al@alarsen.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] Add chip used in collie to jedec_probePavel Machek2006-03-31
| | | | | | | | | | | | | This adds flash chip used in Sharp Zaurus sl5500 (collie) to jedec_probe. Values work for read-only access, but I have not figured out how to do read-write. Signed-off-by: Pavel Machek <pavel@suse.cz> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] drivers/mtd: Use ARRAY_SIZE macroTobias Klauser2006-03-31
| | | | | | | | | | | Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of the macro. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] drivers/mtd/: small cleanupsAdrian Bunk2006-03-31
| | | | | | | | | | | - chips/sharp.c: make two needlessly global functions static - move some declarations to a header file where they belong to Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Kconfig help: MTD_JEDECPROBE already supports IntelAdrian Bunk2006-03-26
| | | | | | | Intel chips are already supported. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: David Woodhouse <dwmw2@infradead.org>
* [PATCH] cfi: init wait queue in chip structSimon Vogl2006-02-24
| | | | | | | | | | | Fix a kernel oops for Intel P30 flashes, where the wait queue head was not initialized for the flchip struct, which in turn caused a crash at the first read operation. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] cfi_cmdset_0001: fix range for cache invalidationAlexey Korolev2006-02-20
| | | | | | | | | | | | | | | I found an issue in cfi_cmdset0001.c. It is related to cache region invalidation in the buffered write procedure. The code performs cache invalidation from "cmd_addr" to "cmd_adr + len" in do_write_buffer() while we modify region from "adr" to "adr+len". This issue affects writes + reads of data by small chunks. Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] arm: fix dependencies for MTD_XIPAl Viro2006-02-08
| | | | | | | | | MTD_XIP depends on having working asm/mtd-xip.h; it's not just per-architecture (arm-only, as current Kconfig would have it), but actually per-subarch as well. Introduced a new symbol (ARCH_MTD_XIP) set by arch Kconfig; MTD_XIP depends on it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [PATCH] build kernel/intermodule.c only when requiredAdrian Bunk2006-01-17
| | | | | | | | | | Build kernel/intermodule.c only when required. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] no longer mark MTD_OBSOLETE_CHIPS as BROKENAdrian Bunk2006-01-17
| | | | | | | | | | This patch removes the wrong dependency of MTD_OBSOLETE_CHIPS on BROKEN and marks the non-compiling MTD_AMDSTD and MTD_JEDEC drivers as BROKEN. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [MTD] Make functions static, include header files with prototypesAdrian Bunk2005-11-29
| | | | | | | | | | | This patch contains the following possible cleanups: - every file should #include the headers containing the prototypes for it's global functions - make needlessly global functions static Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] chips: make sharps driver usable againRichard Purdie2005-11-29
| | | | | | | | | | | | | | | Update the pre-CFI Sharp driver sharps.c so it compiles. map_read32 / map_write32 no longer exist in the kernel so the driver is totally broken as it stands. The replacement functions use different parameters resulting in the other changes. Change collie to use this driver until someone works out why the cfi driver fails on that machine. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Tested-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] cfi_cmdset_0001: relax locking rules for multi hardware partition supportNicolas Pitre2005-11-29
| | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] CFI: Use 16-bit access to autoselect/read device id dataTodd Poynor2005-11-29
| | | | | | | | | | | | | | Recent models of Intel/Sharp and Spansion CFI flash now have significant bits in the upper byte of device ID codes, read via what Spansion calls "autoselect" and Intel calls "read device identifier". Currently these values are truncated to the low 8 bits in the mtd data structures, as all CFI read query info has previously been read one byte at a time. Add a new method for reading 16-bit info, currently just manufacturer and device codes; datasheets hint at future uses for upper bytes in other fields. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reasonOlaf Hering2005-11-09
| | | | | | | | | | | | | | | | | | | | | This patch removes almost all inclusions of linux/version.h. The 3 #defines are unused in most of the touched files. A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is unfortunatly in linux/version.h. There are also lots of #ifdef for long obsolete kernels, this was not touched. In a few places, the linux/version.h include was move to where the LINUX_VERSION_CODE was used. quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'` search pattern: /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6Linus Torvalds2005-11-07
|\ | | | | | | Some manual fixups for clashing kfree() cleanups etc.
| * [MTD] chips: Clean up trailing white spacesThomas Gleixner2005-11-07
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] chips: Clean up trailing white spacesThomas Gleixner2005-11-07
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] chips cfi_cmdset_0002: Prevent timeout raceKonstantin Baidarov2005-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've noticed that sometimes "MTD do_write_buffer(): software timeout" message was printed out when writing to a Fujitsu NOR flash. It turned out that this was because of a race in the timeout handling do_write_buffer(). A small timeout of (HZ / 1000) + 1 is used there, and sometimes if the timer interrupt handling takes more than one or even two jiffies (which is 1-2 ms with HZ == 1000) and that interrupt happens just after chip_ready() call, the driver bails out from a ready polling loop despite the chip has actually become ready while all those interrupts were handled. To deal with this issue, extra check for chip ready is neccessary on timeout expiration (and the checks should better be reordered). As do_write_oneword() uses the same approach, it needs to also be changed. Signed-off-by: Konstantin Baidarov <kbaidarov@ru.mvista.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] chips/cfi_cmdset_0001: fix for P30 cfi parsingNicolas Pitre2005-11-06
| | | | | | | | | | | | | | | | | | | | Change to the extended cfi table parsing for Intel NOR flash that uses the info in the extended table to 'walk' the table rather than using hard coding for various primary extended query table version numbers. From: Jared Hulbert <jaredeh@gmail.com> Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] writev support for cfi-cmdset-0001Nicolas Pitre2005-11-06
| | | | | | | | | | | | | | | | While this might be useful for all supported flash types, it is mandatory for proper JFFS2 support with Sibley flash. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * {MTD] add support for Intel's "Sibley" flashNicolas Pitre2005-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | This updates the Primary Vendor-Specific Extended Query parsing to version 1.4 in order to get the information about the Configurable Programming Mode regions implemented in the Sibley flash, as well as selecting the appropriate write command code. This flash does not behave like traditional NOR flash when writing data. While mtdblock should just work, further changes are needed for JFFS2 use. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [MTD] cleanups to cfi_cmdset_0001Nicolas Pitre2005-11-06
| | | | | | | | | | | | | | | | This includes improved error handling/reporting plus some other message cleanups. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * Merge branch 'master' of /home/tglx/work/mtd/git/linux-2.6.git/Thomas Gleixner2005-11-06
| |\
| * | [MTD] Pre-CFI Sharp chip driver: Some speedups and cleanupsTodd Poynor2005-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove useless udelay(100) after status value already read. Poll for status OK with reduced udelay if not immediate OK status return. Fix read and compare of 32-bit status value using 16-bit variable. Include slab.h since kmalloc/kfree are called. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] CHIPS: Recognize Spansion CFI 1.4 chipsTodd Poynor2005-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify Amd/Fujitsu CFI NOR flash primary vendor extension table revision check to recognize version 1.4. Verified the existing driver can handle version 1.4 chips without additional info from 1.4 extended table. Move the primary vendor extension table revision check from common file to the 3 CFI chip driver files, since the data structures and revisions handled by those data structures are specific to the chip driver. Modify the error message printed when the revision is unknown to be a KERN_ERR instead of WARNING since this will cause mtd to ignore the chip. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | | [PATCH] kfree cleanup: drivers/mtdJesper Juhl2005-11-07
| |/ |/| | | | | | | | | | | | | | | | | | | | | This is the drivers/mtd part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/mtd/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Joern Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] fix missing includesTim Schmielau2005-10-30
|/ | | | | | | | | | | | | | | | | | | | | I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [MTD] cfi_cmdset_0002: Plugged a mem leak.Joern Engel2005-07-13
| | | | | Signed-off-by: Joern Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] Make XIP support depend on CONFIG_ARMThomas Gleixner2005-07-12
| | | | | | | ARM is the only known user of this at the moment. Prevent allyes builds for other archs from failing Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] XIP cleanupThomas Gleixner2005-07-07
| | | | | | Move the architecture dependend code into include/asm/mtd-xip.h Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] cfi_cmdset_0002: Remove bogus includeThomas Gleixner2005-07-04
| | | | | | | Including asm/hardware.h has to be done in linux/mtd/xip.h. Otherwise it breaks allyes compiles. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>