Commit Graph

184 Commits (e5580fbe8a950131b9ccccce0f962811dfb9ef43)

Author SHA1 Message Date
Thomas Gleixner e5580fbe8a [MTD] devices: Clean up trailing white spaces
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 15:06:59 +01:00
Thomas Gleixner 69f34c98c1 [MTD] maps: Clean up trailing white spaces
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 15:01:58 +01:00
Thomas Gleixner 1f948b43f7 [MTD] chips: Clean up trailing white spaces
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 14:45:15 +01:00
Thomas Gleixner 97894cda57 [MTD] core: Clean up trailing white spaces
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 13:37:38 +01:00
Konstantin Baidarov b95f9609c7 [MTD] chips cfi_cmdset_0002: Prevent timeout race
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>
2005-11-07 10:47:08 +01:00
Marian Balakowicz be30c10fd8 [MTD] maps: Add support for the "TQM834x" Boards
The following patch adds support for the TQ Systems  TQM834x  Boards.
Verified on TQM8349L.

This is a resubmit after integrating the suggested changes.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 10:46:22 +01:00
Lennert Buytenhek ea17629f3e [MTD] maps ixp2000: fix compile warnings in ixp2000 map driver
Fix two compile warnings that occur because of treating two
'unsigned long's as 'void *'s.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 10:44:15 +01:00
Thomas Gleixner 3096617434 [MTD] NAND Kconfig: Simplify dependencies
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 02:49:43 +01:00
Thomas Gleixner 3e17404918 [MTD] maps/plat-ram: Avoid gcc 4.0 warning
The assignement of a "const char *" to a "char *" variable
is emitting a warning with gcc 4.0. We cannot change
mtd->name to "const char *" as we have dynamic assignements
of the name. So casting is the correct solution here

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 02:28:05 +01:00
Todd Poynor 868801e561 [MTD] NAND: nand_write_ecc memory and OOB corruption
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 02:24:31 +01:00
Vitaly Wool 49196f3332 [MTD] NAND nand_base: Fix shift for bad block check (16bit devices only)
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-07 02:15:21 +01:00
Thomas Gleixner 46d0d0fb61 [MTD] OneNAND/Kconfig: Fix dependencies
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 01:14:05 +01:00
Thomas Gleixner f0250fd7c3 Revert "[PATCH] OneNAND: Add simulator"
This reverts 405c829f98 commit.
2005-11-07 01:11:04 +01:00
Sean Young 01ac742db3 [MTD] maps/Kconfig: Simplify and update dependencies
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 00:40:10 +01:00
Sean Young 28f462308e [MTD] maps/ts5500: Fix partition support. Code cleanup
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 00:32:01 +01:00
Thomas Gleixner 15fdc52f35 [MTD] Tidy up Tims include cleanup
While we are at it, reorder the includes and
remove the silly /* TASK */ comment

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 00:14:42 +01:00
David Vrabel 9090ed0b82 [MTD] maps/ixp4xx: kill some warnings
- Use map.virt instead of map.map_priv_1 since it has the correct type.
- Use readw/writew instead of dereferencing an ioremap'd cookie.
- Remove an unused variable.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 00:08:05 +01:00
Richard Purdie 87c146dc1a [MTD] NAND sharpsl.c: Add support for akita and borzoi models
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 23:34:39 +01:00
Nicolas Pitre 6f6ed056d2 [MTD] chips/cfi_cmdset_0001: fix for P30 cfi parsing
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>
2005-11-06 23:19:17 +01:00
Ben Dooks cfd320fbfc [MTD] NAND s3c2410.c: Fix timing calculation bugs
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 23:15:54 +01:00
Ben Dooks d574504114 [MTD] NAND s3c2410.c: Fix missing dev parameter to dev_err
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 23:10:43 +01:00
Ben Dooks df2e162927 [MTD] maps/plat-ram.c: Initialize owner in device_driver struct
Added .owner initialisation to allow the
tracking of the device_driver owners when
built as a module

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 23:09:49 +01:00
Ben Dooks e0030b60ce [MTD] maps/bast-flash.c: Initialize owner in device_driver struct
Added owner to device driver field for tracking
when loaded as a module.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 23:08:38 +01:00
Ben Dooks 61a7275491 [MTD] NAND: s3c2410.c Initialize owner in device_driver struct
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 23:07:28 +01:00
Artem B. Bityutskiy 5cea5dadfe [MTD] mtdpart.c: Allow eraseblock size != power of 2
Don't assume eraseblock size is power of 2.
Dataflash can have aligned eraseblock size.

From: Peter Menzebach <pm-mtd@mw-itcon.de>
Acked-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 23:04:14 +01:00
Kyungmin Park 83a368380e [MTD] OneNAND: Enhanced support for DDP (Dual Densitiy Packages)
Add density mask for better support of DDP chips.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 22:59:48 +01:00
Kyungmin Park a41371eb6d [MTD] OneNAND: Power Management (PM) support
Add suspend/resume

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 22:42:28 +01:00
Kyungmin Park 87590e26ff [MTD] OneNAND: Add missing files
Simple bad block table source and header files

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 22:39:23 +01:00
Ben Dooks 0255fc1b08 [MTD] NAND: s3c2410 use dev_err() to report errors instead of printk()
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 22:37:35 +01:00
Pete Popov ef6f0d1ffc [MTD] NAND: Alchemy board driver cleanup
- 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>
2005-11-06 22:29:02 +01:00
Joern Engel b523b3bac3 [MTD] maps: Add support for MTX-1 Flash device
Add support for "4G Systems MTX-1 Flash device", better known as meshcube.

From: Bruno Randolf <bruno.randolf@4g-systems.biz>
Signed-off-by: Joern Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:58:57 +01:00
Vitaly Wool 962034f439 [MTD] NAND: Add suspend/resume functionality
The changes introduced allow to suspend/resume NAND flash.
A new state (FL_PM_SUSPENDED) is introduced, as well as
routines for mtd->suspend and mtd->resume to put the flash in
suspended state from software pov.

Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:43:45 +01:00
Todd Poynor 9c517e6c80 [MTD] maps: Add mapping driver for PQ2FADS boards.
From: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:40:38 +01:00
Kyungmin Park 1b01d9798d OneNAND: Remove OMAP platform driver
Now we can use the generic platform driver

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:35:12 +01:00
Kyungmin Park 68ee4b1c50 [MTD] OneNAND: Add generic platform driver
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:33:11 +01:00
David Vrabel e4c212efbd [MTD] maps/ixp4xx: remove platform specific bits
- Intel chip driver has a reboot notifier so no need to reset the chip here.
- Don't play with chip selects (platform code should do this if necessary).

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:32:16 +01:00
Kyungmin Park 1501787675 [MTD] OneNAND: Remove experimental Kconfig dependency
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:25:42 +01:00
Kyungmin Park d36d63d404 [PATCH] OneNAND: Fix bug in write verify
- Remove unused block, page parameters
- Add constant instead of runtime value

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:24:51 +01:00
Kyungmin Park 405c829f98 [PATCH] OneNAND: Add simulator
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:23:10 +01:00
Kyungmin Park fcc31470c4 [PATCH] OneNAND: Update OMAP OneNAND mapping using device driver model
- Update OMAP OneNAND mapping file using device driver model
- Remove board specific macro and values.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:22:01 +01:00
Kyungmin Park cdc001305d [PATCH] OneNAND: Simple Bad Block handling support
Based on NAND memory bad block table code

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:20:53 +01:00
Kyungmin Park 52b0eea73d [PATCH] OneNAND: Sync. Burst Read support
Add OneNAND Sync. Burst Read support
Tested with OMAP platform

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:19:37 +01:00
Kyungmin Park cd5f6346bc [MTD] Add initial support for OneNAND flash chips
OneNAND is a new flash technology from Samsung with integrated SRAM
buffers and logic interface.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:17:24 +01:00
Thomas Gleixner d409466154 [MTD] NAND: Use correct mask for OOB size calculation
The bit mask used for oob size calculation was using 2 bits instead
of one. Fortunately the next bit has been 0 all the time.

Thanks to Nathan H. for pointing this out

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:22:32 +01:00
Thomas Gleixner 2c92d75532 [MTD] Remove deprecated power management functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:15:30 +01:00
David Woodhouse e21f6c02f7 [MTD] Missing check on kmalloc return in INFTL mount.
Signed-off-by: Youssef Hmamouche <hyoussef@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:14:49 +01:00
Nicolas Pitre e102d54abf [MTD] writev support for cfi-cmdset-0001
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>
2005-11-06 20:12:48 +01:00
Nicolas Pitre 638d983840 {MTD] add support for Intel's "Sibley" flash
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>
2005-11-06 20:12:17 +01:00
Nicolas Pitre 4843653cab [MTD] cleanups to cfi_cmdset_0001
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>
2005-11-06 20:10:19 +01:00
Sean Young e27a9960af [MTD] Add Resident Flash Disk (RFD) support
This type of flash translation layer (FTL) is used by the Embedded BIOS
by General Software. It is known as the Resident Flash Disk (RFD), see:

http://www.gensw.com/pages/prod/bios/rfd.htm

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:08:54 +01:00