aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
AgeCommit message (Collapse)Author
2006-05-23Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/Thomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] NAND modularize ECCThomas Gleixner
First step of modularizing ECC support. - Move ECC related functionality into a seperate embedded data structure - Get rid of the hardware dependend constants to simplify new ECC models Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] NAND cleanup nand_scanThomas Gleixner
Seperate functionality out of nand_scan so the code is more readable. No functional change. First step of simplifying the nand driver. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] NAND consolidate data typesThomas Gleixner
The NAND driver used a mix of unsigned char, u_char amd uint8_t data types. Consolidate to uint8_t usage Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] NAND whitespace and formatting cleanupThomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] Add support for NDFC NAND controllerThomas Gleixner
NDFC NAND Flash controller is embedded in PPC EP44x SoCs. Add platform driver based support. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] Simplify NAND lockingThomas Gleixner
Replace the chip lock by a the controller lock. For simple drivers a dummy controller structure is created by the scan code. This simplifies the locking algorithm in nand_get/release_chip(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23[MTD] Improve software ECC calculationThomas Gleixner
Unrolling the loops produces denser and much faster code. Add a config switch which allows to select the byte order of the resulting ecc code. The current Linux implementation has a byte swap versus the SmartMedia specification Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-22[MTD] Introduce MTD_BIT_WRITEABLEJoern Engel
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>
2006-05-22[MTD] Introduce writesizeJoern Engel
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>
2006-05-21[MTD] Add Amstrad Delta NAND supportJonathan McDowell
The patch below adds support for the NAND device on the Amstrad Delta. This is a 32MiB 8bit Toshiba device, with the data bus connected to the OMAP MPUIO pins and ALE, CLE, NCE, NRE, NWE and NWP all connected to the Delta's latch2 16bit latch. Signed-Off-By: Jonathan McDowell <noodles@earth.li> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-16NAND: Fix NAND ECC errors on AMD Au1550Sergei Shtylyov
On AMD Au1550 the static bus controller fails to keep -CE asserted during chip ready delay on read commands and the NAND chip being used requires this. So, the current driver allows nand_base.c to drive -CE manually during the entire sector read. When the PCMCIA driver is enabled however, occasionally the ECC errors occur on NAND reads. This happens because the PCMCIA driver polls sockets periodically and reads one of the board's control/status regs (BCSRs) which are on the same static bus as the NAND flash, and just use another chip select (and the NOR flash also resides on that bus), so as the NAND driver forces NAND chip select asserted and the -RE signal is shared, a contention occurs on the static bus when BCSR or NOR flash is read while we're reading from NAND. So, we either can't keep interrupts enabled during the whole NAND sector read (which is hardly acceptable), or have to implement some interlocking scheme between multiple drivers (which is painful, and makes me shudder :-). There's a third way which has proven to work: to force -CE asserted only while we're waiting for a NAND chip to become ready after a read command, disabling interrupts for a maximum of 25 microseconds (according to Toshiba TC58DVM92A1FT00 datasheet -- this chip is mentioned in the board schematics); for Samsung NAND chip which seems to be actually used this delay is even less, 12 us. Signed-off-by: Konstantin Baydarov <kbaidarov@ru.mvista.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-16NAND: AMD Au1550 driver reads write-only registerSergei Shtylyov
During the last cleanup of the AMD Au1550 NAND driver the old buglet was reintroduced: as the MEM_STNDCTL register is write-only and seem to always read as 0x31, read-modify-write to it done in au1xxx_nand_init() will have the side effect of enabling -RCS0/1 pin override (via bits 4/5 of this reg.), thus possibly causing a contention on the static bus when the NOR flash (using -RCS0) or board control status registers (using -RCS2) are read. Luckily, this goes away with a first NAND access, since au1550_hwcontrol() doesn't try to read this register before writing anymore. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-16[MTD NAND] Make various initfuncs static, remove #ifdef MODULE from exitfuncsDavid Woodhouse
We all inherited the same error from the original NAND board driver which got copied and changed. Fix them all at once... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-16[MTD] Add help text for MTD_NAND_CS553X option.David Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-14[MTD NAND] Modify check for modules registering NAND devices without ->ownerDavid Woodhouse
Make it work even with compilers which lack the wit to notice that THIS_MODULE is always non-NULL. Use #ifdef MODULE instead. It's only a temporary debugging check anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-14[MTD] Fix legacy character sets throughout drivers/mtd, include/linux/mtdDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-14[MTD] Fix module refcounting in NAND board drivers.David Woodhouse
The _board_ driver needs to be mtd->owner, and it in turn pins the nand.ko module. Fix them all to actually do that, and fix nand.ko not to overwrite it -- and also to check that the caller sets it, if the caller is a module. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-13[MTD NAND] Indent all of drivers/mtd/nand/*.c.David Woodhouse
It was just too painful to deal with. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-13[MTD NAND] Reduce paranoia level when scanning for bad blocks on virgin chipsDavid Woodhouse
We were scanning for 0xFF through the entire chip -- which takes a while when it's a 512MiB device as I have on my current toy. The specs only say we need to check certain bytes -- so do only that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-13[MTD NAND] Update CS553x NAND driver: Hardware ECC support, optimisations.David Woodhouse
- Implement HW ECC support, - Provide read_buf() and write_buf() routines using memcpy - Use on-flash bad block table - Fix module refcounting - Avoid read/modify/write in hwcontrol() - Minor cosmetic fixes Partly based on code and ideas from Tom Sylla <tom.sylla@amd.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-13[MTD NAND] Use vmalloc for buffer when scanning for bad blocks.David Woodhouse
These new chips have 128KiB blocks. Don't try to kmalloc that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-12Trivial typo fixes in Kconfig files (MTD).Egry Gábor
Signed-off-by: Egry Gábor <gaboregry@t-online.hu> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-11[MTD] Basic NAND driver for AMD/NatSemi CS5535/CS5536 Geode companion chipDavid Woodhouse
This lacks hardware ECC support and a few optimisations we're going to want fairly soon, but it works well enough to mount and use JFFS2. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-04-30ts72xx NAND driverLennert Buytenhek
The TS-72xx is a series of embedded single board computers from Technologic Systems based on the Cirrus ep93xx (arm920t based) CPU. The TS-7200 uses NOR flash, while all the other models in the series (TS-7250, TS-7260) use NAND flash -- included is a driver for the NAND flash on those boards. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-04-18MTD: Correct Poodle partition sizeRichard Purdie
Correct the MTD NAND partition size for Poodle (Sharp Zaurus SL-5600) Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2006-03-31[PATCH] LED: add NAND MTD activity LED triggerRichard Purdie
Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-31[PATCH] drivers/mtd: Use ARRAY_SIZE macroTobias Klauser
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>
2006-03-31[PATCH] MTD_NAND_SHARPSL and MTD_NAND_NANDSIM should be tristate'sAdrian Bunk
MTD_NAND=m and MTD_NAND_SHARPSL=y or MTD_NAND_NANDSIM=y are illegal combinations that mustn't be allowed. This patch fixes this bug by making MTD_NAND_SHARPSL and MTD_NAND_NANDSIM tristate's. Additionally, it fixes some whitespace damage at these options. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: "Artem B. Bityutskiy" <dedekind@yandex.ru> 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>
2006-01-14[PATCH] Unlinline a bunch of other functionsArjan van de Ven
Remove the "inline" keyword from a bunch of big functions in the kernel with the goal of shrinking it by 30kb to 40kb Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10[PATCH] turn "const static" into "static const"Jesper Juhl
ICC likes to complain about storage class not being first, GCC doesn't care much (except for cases like "inline static"). have a hard time seeing how it could break anything. Thanks to Gabriel A. Devenyi for pointing out http://linuxicc.sourceforge.net/ which is what made me create this patch. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-07[ARM] Move asm/hardware/clock.h to linux/clk.hRussell King
This is needs to be visible to other architectures using the AMBA bus and peripherals. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-03[ARM] Remove clk_use()/clk_unuse()Russell King
It seems that clk_use() and clk_unuse() are additional complexity which isn't required anymore. Remove them from the clock framework to avoid the additional confusion which they cause, and update all ARM machine types except for OMAP. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-29[MTD] Make functions static, include header files with prototypesAdrian Bunk
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>
2005-11-17[ARM] Drivers should not make use of architecture private __ioremapRussell King
__ioremap is an architecture private interface and must not be used by drivers when the architecture independent interface will do just as well. Switch the ipaq drivers to use the correct interface. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-11Merge master.kernel.org:/home/rmk/linux-2.6-drvmodelLinus Torvalds
2005-11-09[DRIVER MODEL] Convert platform drivers to use struct platform_driverRussell King
This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-09[PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reasonOlaf Hering
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>
2005-11-07Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6Linus Torvalds
Some manual fixups for clashing kfree() cleanups etc.
2005-11-07[PATCH] kfree cleanup: drivers/mtdJesper Juhl
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>
2005-11-07[MTD] NAND: Clean up trailing white spacesThomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07[MTD] NAND Kconfig: Simplify dependenciesThomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07[MTD] NAND: nand_write_ecc memory and OOB corruptionTodd Poynor
Nathan Roberts noticed the nand_write_ecc index into oobbuf goes out of bounds when crossing an erase block boundary, causing incorrect OOB data to be written and corrupting memory. Reset the index to zero after re-preparing oobbuf for a new erase block. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07[MTD] NAND nand_base: Fix shift for bad block check (16bit devices only)Vitaly Wool
In case of an odd offset, the result was shifted by 1 instead of 8 Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] NAND sharpsl.c: Add support for akita and borzoi modelsRichard Purdie
The Sharp Zaurus akita and borzoi models are large page flash devices. This patch adds support for them to the sharpsl MTD NAND driver but keeps the oob layout and bad block positions compatible with the Sharp Zaurus 2.4 kernel and ROM bootloader. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] NAND s3c2410.c: Fix timing calculation bugsBen Dooks
Spotted by basprog@mail.ru Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] NAND s3c2410.c: Fix missing dev parameter to dev_errBen Dooks
Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] NAND: s3c2410.c Initialize owner in device_driver structBen Dooks
Added owner fields to the device_driver for tracking ownership when built as a module Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] NAND: s3c2410 use dev_err() to report errors instead of printk()Ben Dooks
Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] NAND: Alchemy board driver cleanupPete Popov
- cleaned up the partitions and include files - added more flexible CS and address detection and setup Regression tested on db1200 and db1550. Signed-off-by: Pete Popov <ppopov@pacbell.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>