aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAge
...
* | [MTD] NAND cleanup nand_scanThomas Gleixner2006-05-23
| | | | | | | | | | | | | | | | 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>
* | [MTD] NAND consolidate data typesThomas Gleixner2006-05-23
| | | | | | | | | | | | | | 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>
* | [MTD] NAND whitespace and formatting cleanupThomas Gleixner2006-05-23
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] Add support for NDFC NAND controllerThomas Gleixner2006-05-23
| | | | | | | | | | | | | | NDFC NAND Flash controller is embedded in PPC EP44x SoCs. Add platform driver based support. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [MTD] Simplify NAND lockingThomas Gleixner2006-05-23
| | | | | | | | | | | | | | | | 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>
* | [MTD] Improve software ECC calculationThomas Gleixner2006-05-23
|/ | | | | | | | | 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>
* [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_request() in old DiskOnChip probe code to find actual driverDavid Woodhouse2006-05-21
| | | | | | | | The previous code wouldn't work correctly on architectures which have a non-empty MODULE_SYMBOL_PREFIX, and this version is neater if slightly less optimal in the built-in case. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Add Amstrad Delta NAND supportJonathan McDowell2006-05-21
| | | | | | | | | | 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>
* [MTD] Avoid 64-bit division in mtdconcatAndrew Morton2006-05-20
| | | | | | | WARNING: "__moddi3" [drivers/mtd/mtdconcat.ko] undefined! Signed-off-by: Andrew Morton <akpm@osdl.org> 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>
* git-mtd: symbol_get() fixAndrew Morton2006-05-19
| | | | | | | | | | drivers/mtd/devices/docprobe.c: In function `DoC_Probe': drivers/mtd/devices/docprobe.c:338: warning: assignment from incompatible pointer type drivers/mtd/devices/docprobe.c:341: warning: assignment from incompatible pointer type Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> 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>
* [MTD] Fix mtdconcat build. We didn't introduce mtd->writesize yet.David Woodhouse2006-05-17
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* MTD: mtdconcat NAND/Sibley support (rev.2)Alexander Belyakov2006-05-17
| | | | | | | | | | | | | | | | | | There is a second revision of "mtdconcat NAND/Sibley" patch. I hope the patch will not get damaged as I'm posting it from gmail account, thanks to Jorn. The patch adds previously missing concat_writev(), concat_writev_ecc(), concat_block_isbad(), concat_block_markbad() functions to make concatenation layer compatible with Sibley and NAND chips. Patch has been cleared from whitespaces, fixed some lines of code as requested. Also I have added code for alignment check that should support Jorn's "writesize" patch. Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* LASAT depends on MTD_CFIMartin Michlmayr2006-05-17
| | | | | | | | The following difference was found between the mainline and linux-mips kernel. LASAT depends on MTD_CFI. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Re-add module description for ms02-nv to KconfigMartin Michlmayr2006-05-17
| | | | | | | | | | | | In an unrelated MTD commit, a description about the ms02-nv module got removed from Kconfig. While I personally agree with this removal, the module maintainer (Maciej W. Rozycki) would like to see it added back. In the absense of any consistency regarding Kconfig descriptions his wish should be followed. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Acked-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] RFD FTL: Be noisier, and don't assume block without RFD magic are erasedSean Young2006-05-17
| | | | | Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] generic: propagate oobavail to MTD partitionsVitaly Wool2006-05-17
| | | | | | | | 'oobavail' parameter of mtd_info structure is now propagated to the MTD partitions Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [PCMCIA MTD] Fix leak and crash on rebootSean Young2006-05-17
| | | | | Signed-off-by: Sean Young <sean@mess.org> 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>
* NAND: Fix NAND ECC errors on AMD Au1550Sergei Shtylyov2006-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [MTD] Fix build warnings in RedBoot MTD partition parser.Ben Dooks2006-05-16
| | | | | | | | | | | | Fix build warnings from drivers/mtd/redboot.c due to use of `unsigned long` in `struct fis_image_desc` for fields being passed to swab32s() which expects __u32 * Change the entries to uint32_t to make them compatible with the swab32s() function Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* NAND: AMD Au1550 driver reads write-only registerSergei Shtylyov2006-05-16
| | | | | | | | | | | | | | 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>
* [MTD NAND] Make various initfuncs static, remove #ifdef MODULE from exitfuncsDavid Woodhouse2006-05-16
| | | | | | | 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>
* drivers/mtd/devices/docprobe.c: correct #if'sAdrian Bunk2006-05-16
| | | | | | | | | | | | | | | | | On Mon, May 15, 2006 at 12:56:37AM -0700, Andrew Morton wrote: >... > Changes since 2.6.17-rc3-mm1: >... > git-mtd.patch >... > git trees >... If we correct the names of the config options, the code might actually work as intended... Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Add help text for MTD_NAND_CS553X option.David Woodhouse2006-05-16
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Modify check for modules registering NAND devices without ->ownerDavid Woodhouse2006-05-14
| | | | | | | | 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>
* [MTD] Remove gratuitous inclusion of ARM-only header from physmap.cDavid Woodhouse2006-05-14
| | | | | | | | | The physmap platform driver conversion added to physmap.c an include of asm/mach/flash.h which is 1) ARM-specific; and 2) isn't actually necessary. Remove it. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> 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>
* mtd: fix memory leak in block2mtd_setup()Jesper Juhl2006-05-13
| | | | | | | | | | | | | There's a mem leak in drivers/mtd/devices/block2mtd.c::block2mtd_setup() We can leak 'name' allocated with kmalloc in 'parse_name' if leave via the 'parse_err' macro since it contains a return but doesn't do any freeing. Spotted by coverity checker as bug 615. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix module refcounting in NAND board drivers.David Woodhouse2006-05-13
| | | | | | | | | 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>
* mtd: fix memory leaks in phram_setupJesper Juhl2006-05-13
| | | | | | | | | | | | | | There are two code paths in drivers/mtd/devices/phram.c::phram_setup() that will leak memory. Memory is allocated to the variable 'name' with kmalloc() by the parse_name() function, but if we leave by way of the parse_err() macro, then that memory is never kfree()'d, nor is it ever used with register_device() so it won't be freed later either - leak. Found by the Coverity checker as #593 - simple fix below. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Indent all of drivers/mtd/nand/*.c.David Woodhouse2006-05-13
| | | | | | It was just too painful to deal with. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD NAND] Reduce paranoia level when scanning for bad blocks on virgin chipsDavid Woodhouse2006-05-13
| | | | | | | | 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>
* [MTD NAND] Update CS553x NAND driver: Hardware ECC support, optimisations.David Woodhouse2006-05-12
| | | | | | | | | | | | | - 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>
* [MTD NAND] Use vmalloc for buffer when scanning for bad blocks.David Woodhouse2006-05-12
| | | | | | These new chips have 128KiB blocks. Don't try to kmalloc that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Trivial typo fixes in Kconfig files (MTD).Egry Gábor2006-05-12
| | | | | Signed-off-by: Egry Gábor <gaboregry@t-online.hu> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* OneNAND: fix block command typoKyungmin Park2006-05-12
| | | | | | We need to check block cmd only instead with comparing with cmd Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: One-Time Programmable (OTP) supportKyungmin Park2006-05-12
| | | | | | | | | | | | | | One Block of the NAND Flash Array memory is reserved as a One-Time Programmable Block memory area. Also, 1st Block of NAND Flash Array can be used as OTP. The OTP block can be read, programmed and locked using the same operations as any other NAND Flash Array memory block. OTP block cannot be erased. OTP block is fully-guaranteed to be a valid block. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: Handle erase correctly in Double Density Package (DDP)Kyungmin Park2006-05-12
| | | | | | | There's erase bug in DDP. We need to add DDP select in erase Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: Write oob area with aligned size, mtd->oobsizeKyungmin Park2006-05-12
| | | | | | | | There's some problem with write oob in serveral platform. So we write oob with oobsize aligned (16bytes) instead of 3 bytes (from {2, 3}) Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: Add write_oob verify functionKyungmin Park2006-05-12
| | | | Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
* OneNand: Fix free byte positions.Jarkko Lavinen2006-05-12
| | | | | | | | Some free byte positions at onenand_oob_64 were wrong. This was also reported by Christian Lehne. 3 byte slots are at 2+16*i and 2 byte slots at 14+16*i. Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
* OneNAND: handle byte access on BufferRAMKyungmin Park2006-05-12
| | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: Add touch_softlock_watchdog()Kyungmin Park2006-05-12
| | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [MTD] Fix invalid default value of CONFIG_MTD_PCMCIA_ANONYMOUS in KconfigJean-Luc Leger2006-05-12
| | | | | | | | | | Default values for boolean and tristate options can only be 'y', 'm' or 'n'. This patch removes wrong default for MTD_PCMCIA_ANONYMOUS. Signed-off-by: Jean-Luc Leger <jean-luc.leger@dspnet.fr.eu.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>