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>
Thomas Gleixner [Mon, 7 Nov 2005 00:52:27 +0000 (00:52 +0000)]
[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>
Todd Poynor [Sat, 5 Nov 2005 03:21:15 +0000 (03:21 +0000)]
[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>
David Vrabel [Tue, 1 Nov 2005 16:46:19 +0000 (16:46 +0000)]
[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>
Richard Purdie [Thu, 3 Nov 2005 11:36:45 +0000 (11:36 +0000)]
[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>
Nicolas Pitre [Tue, 25 Oct 2005 20:28:43 +0000 (21:28 +0100)]
[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>
Todd Poynor [Tue, 18 Oct 2005 23:29:38 +0000 (00:29 +0100)]
[JFFS2] Return 0, not number of bytes written, for success at commit_write
Some callers to block-layer commit_write function treat non-zero return as
error, notably the loopback mount driver sometimes used in conjunction with
JFFS2 on NAND flash for bad block avoidance, etc. Return zero for success
as do various other commit_write functions.
Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
- assume wbuf may be of size which is not power of 2
- don't make strange assumption about not padding wbuf for DataFlash
- use wbuf = DataFlash page and eraseblock >= 8 Dataflash pages
From: Peter Menzebach <pm-mtd@mw-itcon.de> Acked-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Joern Engel [Sun, 18 Sep 2005 10:46:45 +0000 (11:46 +0100)]
[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>
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>
Ferenc Havasi [Fri, 9 Sep 2005 15:12:01 +0000 (16:12 +0100)]
[JFFS2] Call summary collector for all mtd devices with writev support
Do the summary collection in the right place. If the device
was not writebuffered but had c->mtd->writev function
(e.g. blkmtd) the summary collector function was not called.
Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
David Vrabel [Thu, 8 Sep 2005 10:32:23 +0000 (11:32 +0100)]
[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>
Ferenc Havasi [Wed, 7 Sep 2005 08:35:26 +0000 (09:35 +0100)]
[JFFS2] Add erase block summary support (mount time improvement)
The goal of summary is to speed up the mount time. Erase block summary (EBS)
stores summary information at the end of every (closed) erase block. It is
no longer necessary to scan all nodes separetly (and read all pages of them)
just read this "small" summary, where every information is stored which is
needed at mount time.
This summary information is stored in a JFFS2_FEATURE_RWCOMPAT_DELETE. During
the mount process if there is no summary info the orignal scan process will
be executed. EBS works with NAND and NOR flashes, too.
There is a user space tool called sumtool to generate this summary
information for a JFFS2 image.
Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Nicolas Pitre [Sat, 6 Aug 2005 04:40:46 +0000 (05:40 +0100)]
{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>
Instead of building fragtree starting from node with the smallest version
number, start from the highest. This helps to avoid reading and checking
obsolete nodes.
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
When JFFS22 is unable to read the root inode, the bad root inode object is not
freed and remains sticked in the jffs2_i slab cache. When we further try to
free the slab cache (e.g., on rmmod jffs2), slab allocator subsystem panics.
Fix this bug.
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[JFFS2] Use f->target instead of f->dents for symlink target
JFFS2 uses f->dents to store the pointer to the symlink target string (in case
the inode is symlink). This is somewhat ugly to use the same field for
different reasons. Introduce distinct field f->target for this purpose.
Note, f->fragtree, f->dents, f->target may probably be put in a union.
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[PATCH] nvidiafb: Geforce 7800 series support added
This adds support for the Nvidia Geforce 7800 series of cards to the
nvidiafb framebuffer driver. All it does is add the PCI device id for
the 7800, 7800 GTX, 7800 GO, and 7800 GTX GO cards to the module device
table for the nvidiafb.ko driver, so that nvidiafb.ko will actually work
on these cards.
I also added the relevant PCI device ids to linux/pci_ids.h
I tested it on my 7800 GTX here and it works like a charm. I now can
get framebuffer support on this card! Woo hoo!! Nothing like 200x75 text
mode to make your eyes BLEED. ;)
Paul Mackerras [Fri, 4 Nov 2005 23:36:59 +0000 (10:36 +1100)]
powerpc: Fix vmlinux.lds.S for 32-bit
We can't currently use asm-ppc/page.h in vmlinux.lds.S, so until
we have a merged page.h, define PAGE_SIZE and KERNELBASE locally.
Also gets rid of some dynamic executable cruft that we had for
32-bit. With -Ttext=$(KERNELBASE) this didn't cause any problem,
but when we changed to putting . = KERNELBASE in the vmlinux.lds.S
this cruft caused the text to get linked at 0xa0 instead of
0xc0000000. Oops.