History log of /drivers/mtd/nand/nandsim.c
Revision Date Author Comments
5942ddbc500d1c9b75e571b656be97f65b26adfe 23-Dec-2011 Artem Bityutskiy <artem.bityutskiy@linux.intel.com> mtd: introduce mtd_block_markbad interface

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
bb9ebd4e714385a2592a482845865ef2d58b2868 01-Jun-2011 Brian Norris <computersforpeace@gmail.com> mtd: nand: rename NAND_USE_FLASH_BBT

Recall the recently added prefix requirements:
* "NAND_" for flags in nand.h, used in nand_chip.options
* "NAND_BBT_" for flags in bbm.h, used in nand_chip.bbt_options
or in nand_bbt_descr.options

Thus, I am changing NAND_USE_FLASH_BBT to NAND_BBT_USE_FLASH.

Again, this flag is found in bbm.h and so should NOT be used in the
"nand_chip.options" field.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
a40f73419f02e40555f692785ea1c1813d5b4c12 01-Jun-2011 Brian Norris <computersforpeace@gmail.com> mtd: nand: consolidate redundant flash-based BBT flags

This patch works with the following three flags from two headers (nand.h
and bbm.h):
(1) NAND_USE_FLASH_BBT (nand.h)
(2) NAND_USE_FLASH_BBT_NO_OOB (nand.h)
(3) NAND_BBT_NO_OOB (bbm.h)

These flags are all related and interdependent, yet they were in
different headers. Flag (2) is simply the combination of (1) and (3) and
can be eliminated.

This patch accomplishes the following:
* eliminate NAND_USE_FLASH_BBT_NO_OOB (i.e., flag (2))
* move NAND_USE_FLASH_BBT (i.e., flag (1)) to bbm.h

It's important to note that because (1) and (3) are now both found in
bbm.h, they should NOT be used in the "nand_chip.options" field.

I removed a small section from the mtdnand DocBook because it referes to
NAND_USE_FLASH_BBT in nand.h, which has been moved to bbm.h.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
ee0e87b174bb41f0310cf089262bf5dd8f95a212 23-May-2011 Jamie Iles <jamie@jamieiles.com> mtd: convert remaining users to mtd_device_register()

The older add_mtd_device()/add_mtd_partitions() and their removal
counterparts will soon be gone. Replace uses with mtd_device_register()
and mtd_device_unregister().

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
fc2ff592b5b41f3f32e790dd124eeb3bc80706c8 11-Mar-2011 Ivan Djelic <ivan.djelic@parrot.com> mtd: nand: enable software BCH ECC in nand simulator

This patch adds option 'bch' to nandsim, which can be used to enable
software BCH ECC (introduced in previous patches) and select BCH error
correction capability.

Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
309b5e4e4154721f8079bc250d2233fd4b3aa039 05-Nov-2010 Joe Perches <joe@perches.com> mtd: use vzalloc

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
daf05ec00c6e60a2c705820e7f93cbd31c804fe3 12-Nov-2010 srimugunthan <srimugunthan.dhandapani@gmail.com> mtd: nandsim: spell fixes in comments

Signed-off-by: srimugunthan <srimugunthan.dhandapani@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
ce85b79fe809eaf34b84a9ebf4ac37ee37b3455b 29-Sep-2010 Sebastian Andrzej Siewior <bigeasy@linutronix.de> mtd: nandsim: add module param for BBT handling

I used this to check the BBT on flash together with a hack in mtdchar in
order to read bad blocks.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
7b8516b780ec639f26a4c6cdb51e342d8feecd44 29-Jun-2010 Kulikov Vasiliy <segooon@gmail.com> mtd: nandsim: remove casts from void

Remove unnesessary casts from void*.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
0bfa4df2b65a94ce761306ab53447010b928b7dd 01-Apr-2010 Artem Bityutskiy <Artem.Bityutskiy@nokia.com> mtd: nandsim: make some structures anonymous

We do not need these names. Moreover, there are spelling typos
there: "nansin" instead of "nandsim".

This patch is just a clean up, no functional changes.

Reported-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
e99e90aef17517d99be8e049b2f5cc563cd6862a 29-Jan-2010 Ben Hutchings <bhutchings@solarflare.com> mtd: nandsim: Define CONFIG_NANDSIM_MAX_PARTS and use it instead of MAX_MTD_DEVICES

MAX_MTD_DEVICES is about to be removed.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
6029a3a4625e485e01cf9a024d190c9d4e6b6681 17-Dec-2009 Andrey Yurovsky <andrey@slug.(none)> mtd: nandsim: fix spelling

s/nanodeconds/nanoseconds

Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
75352662c54421b48ed58200565395b123952748 29-Nov-2009 Sebastian Andrzej Siewior <sebastian@breakpoint.cc> mtd: nandsim: add support for 4KiB pages

I was going to play with a faulty nand image from real flash and noticed
that nandsim does not work with:
first_id_byte=0xec second_id_byte=0xd5 third_id_byte=0x51 fourth_id_byte=0xa6

This patch seems to fix it.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
a5cce42f357b3106fb0eacd85edec5ae31288956 17-Dec-2008 Randy Dunlap <randy.dunlap@oracle.com> [MTD] [NAND] fix nandsim sched.h references

Fix sched.h references:

build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1326: error: dereferencing pointer to incomplete type
build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1326: error: 'PF_MEMALLOC' undeclared (first use in this function)
build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1328: error: dereferencing pointer to incomplete type
build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1335: error: dereferencing pointer to incomplete type
build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1335: error: 'PF_MEMALLOC' undeclared (first use in this function)
build-r7149.out:make[4]: *** [drivers/mtd/nand/nandsim.o] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
0f07a0be39735651091418c09b257785d12fbc59 10-Dec-2008 David Woodhouse <David.Woodhouse@intel.com> [MTD] [NAND] Remove strange u_int64_t types from nandsim

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
8a4c2495b142fe612b291a810d9e695f269c26db 13-Nov-2008 Alexey Korolev <akorolev@infradead.org> MTD: nandsim: use less RAM

Nandsim consumes ~2x more RAM than the density of simulated device.
It becomes critical if we need to simulate 256MB NAND and run stress tests
on it.

We investigated the reasons. nandsim allocates space for pages using kmalloc
function. The size of LP nand page is 2112 bytes.
kmalloc gets space from slab pools by chunks 2^n. So if we need to kmalloc
2112 bytes, 4096 bytes will be consumed by system.
The best way to avoid this issue would be using kmem_cache allocations. AFAIK
this mechanism specially designed to handle cases when arrays of allocations
are used.

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
a9fc8991883cdf029bd373a82cbc2d12a10799dd 12-Nov-2008 Adrian Hunter <ext-adrian.hunter@nokia.com> MTD: nandsim: add option to use a file to cache pages

Add a new module parameter 'cache_file' which causes nandsim
to use that file instead of memory to cache nand data.
Using a file allows the simulation of NAND that is bigger
than the available memory.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
9359ea461b382de3249469d2165da45f4762b910 12-Nov-2008 Adrian Hunter <ext-adrian.hunter@nokia.com> MTD: nandsim: suppress unnecessary warning

nand_base sometimes reads only 2 bytes of a 4 byte id.
It is OK. Do not print a warning in that case.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
d483492cb5401283b3c6e46b829fec0b42297e68 10-Aug-2008 Huang Weiyi <weiyi.huang@gmail.com> [MTD] [NAND] drivers/mtd/nand/nandsim.c: remove duplicated #include

Removed duplicated include <asm/div64.h> in
drivers/mtd/nand/nandsim.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
e4c094a595ba8ea402e6b2153f7bbf6ef039eea0 30-Jul-2008 Andrew Morton <akpm@linux-foundation.org> [MTD] [NAND] drivers/mtd/nand/nandsim.c: fix printk warnings

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
fc1f397b2c7ef1c9bad58778e4041dfabf20c71c 30-Jul-2008 Andrew Morton <akpm@linux-foundation.org> [MTD] [NAND] drivers/mtd/nand/nandsim.c needs div64.h

drivers/mtd/nand/nandsim.c: In function 'divide':
drivers/mtd/nand/nandsim.c:462: error: implicit declaration of function 'do_div'

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
74216be41a61a809ad17b091068307e3d89f4a2f 30-Jul-2008 Artem Bityutskiy <Artem.Bityutskiy@nokia.com> [MTD] [NAND] nandsim: support random page read command

Commit 3d45955962496879dead8d4dd70bb9a23b07154b ("subpage read feature
as a way to improve performance") broke nandsim because nandsim does not
support the "random page read" NAND command. This patch adds
corresponding support.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
4474573a90bae41351fad576fa80c424d62be567 05-Jun-2008 Randy Dunlap <randy.dunlap@oracle.com> [MTD] [NAND] nandsim: missing header for do_div

Fix nandsim build error, missing #include:

linux-next-20080605/drivers/mtd/nand/nandsim.c: In function 'divide':
linux-next-20080605/drivers/mtd/nand/nandsim.c:462: error: implicit declaration of function 'do_div'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
59018b6d2acabb114ab58637e6ab95ba424a89d0 20-May-2008 Adrian Bunk <bunk@kernel.org> MTD/JFFS2: remove CVS keywords

Once upon a time, the MTD repository was using CVS.

This patch therefore removes all usages of the no longer updated CVS
keywords from the MTD code.

This also includes code that printed them to the user.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6eda7a55f786b75e7d3d636a9431e6c850b20d72 30-May-2008 Adrian Hunter <ext-adrian.hunter@nokia.com> [MTD] [NAND] nandsim: allow for 64-bit size

Amend nandsim so that it does not assume 32-bit flash size.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
07293b20083cb66df35bf2041f0c554eaac43e8c 30-May-2008 Adrian Hunter <ext-adrian.hunter@nokia.com> [MTD] [NAND] nandsim: fix overridesize

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
af3deccfa67341a9df39b6f734afcc85998ad4b7 30-May-2008 Adrian Hunter <ext-adrian.hunter@nokia.com> [MTD] [NAND] nandsim: fix size bug

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8e87d7820a6362b6304924befb22d1ee79b754f3 03-Feb-2008 Joe Perches <joe@perches.com> drivers/mtd/: Spelling fixes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
39e73fc10e916db93c8a2c622f0315d296e66cf4 19-Sep-2007 Artem Bityutskiy <Artem.Bityutskiy@nokia.com> [MTD] [NAND] nandsim: bugfix in initialization

NAND of > 32MiB in size use 4 bytes in address cycle, not 3.

Reported-by: bhsong <bhsong@augustatek.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
98b830d26095007aeb04041147b93d2b74e0a0c0 28-Aug-2007 Artem Bityutskiy <Artem.Bityutskiy@nokia.com> [MTD] [NAND] nandsim: avoid deadlocking FS

Make nandsim use GFP_NOFS when allocating memory, because it might
be used by a file-system (e.g. UBIFS2) which means, if we are short
of memory, we may deadlock. Indee, UBIFS is holding a lock, writes
to the media, reaches this place in NANDsim, kmalloc does not find
the requested amount of RAM, calls memory shrinker, which decides
to writeback inodes, calls FS, and it deadlocks on the lock which
is already being held. Below is the UBIFS backtrace which
demonstrates that:

[<c03717dc>] __mutex_lock_slowpath+0xc8/0x2e6
[<c0371a16>] mutex_lock+0x1c/0x1f
[<f8b9d076>] reserve_space+0x3d/0xa9 [ubifs]
[<f8b9d1bd>] make_one_reservation+0x2b/0x86 [ubifs]
[<f8b9d3fc>] ubifs_jrn_write_block+0xda/0x12f [ubifs]
[<f8b9ff3a>] ubifs_writepage+0x11d/0x1ec [ubifs]
[<c015d6ab>] shrink_inactive_list+0x7fa/0x969
[<c015d8c8>] shrink_zone+0xae/0x10c
[<c015e3b4>] try_to_free_pages+0x159/0x251
[<c015980a>] __alloc_pages+0x125/0x2f0
[<c016ff6a>] cache_alloc_refill+0x380/0x6ba
[<c01703f3>] __kmalloc+0x14f/0x157
[<f885722a>] do_state_action+0xab7/0xc74 [nandsim]
[<f885760c>] switch_state+0x225/0x402 [nandsim]
[<f8857e7e>] ns_hwcontrol+0x3e2/0x620 [nandsim]
[<f8862f53>] nand_command+0x2e/0x1a5 [nand]
[<f8861ad8>] nand_write_page+0x4a/0x9a [nand]
[<f88617b4>] nand_do_write_ops+0x1cf/0x343 [nand]
[<f8861a70>] nand_write+0x88/0xa6 [nand]
[<f8850b0e>] part_write+0x72/0x8b [mtd]
[<f88e19c5>] ubi_io_write+0x189/0x29c [ubi]
[<f88dfb98>] ubi_eba_write_leb+0xb6/0x699 [ubi]
[<f88def93>] ubi_leb_write+0xe4/0xe9 [ubi]
[<f8ba3b82>] ubifs_wbuf_write_nolock+0x333/0x4c9 [ubifs]
[<f8b9d28c>] write_node+0x74/0x8e [ubifs]
[<f8b9d422>] ubifs_jrn_write_block+0x100/0x12f [ubifs]
[<f8b9ff3a>] ubifs_writepage+0x11d/0x1ec [ubifs]
[<c0159e5b>] __writepage+0xb/0x26
[<c015a318>] write_cache_pages+0x203/0x2d9
[<c015a411>] generic_writepages+0x23/0x2d
[<c015a452>] do_writepages+0x37/0x39
[<c018e24a>] __writeback_single_inode+0x96/0x399
[<c018e903>] sync_sb_inodes+0x1a3/0x274
[<c018ebf3>] writeback_inodes+0xa6/0xd8
[<c015a9dd>] background_writeout+0x86/0x9e
[<c015ae9c>] pdflush+0xfb/0x1b6
[<c01387d7>] kthread+0x37/0x59
[<c0104dc3>] kernel_thread_helper+0x7/0x14

The deadlock is funny because it starts in pdflush/writeback,
and comes back to writeback, then deadlocks. It seems we should look
carefully for other places in UBI and MTD and use GFP_NOFS instead
of GFP_KERNEL.

Caught-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
a5ac8aeb29000fcab8d91848273a6616fcd039ee 18-Mar-2007 Adrian Hunter <ext-adrian.hunter@nokia.com> [MTD] nandsim: enhance nandsim to allow arbitrary NAND size

A new module parameter has been added called 'overridesize',
which overrides the size that would be determined by the
ID bytes. 'overridesize' is specified in erase blocks and
as the exponent of a power of two e.g. 5 means a size of
32 erase blocks.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
57aa6b545f6f772dd317ccd29bdada999b16a13d 18-Mar-2007 Adrian Hunter <ext-adrian.hunter@nokia.com> [MTD] nandsim: Enhance nandsim optionally to report wear information

A new module parameter 'rptwear' specifies how many erases between
reporting wear information. Zero means never.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
514087e74fb401a6621e8c836f4eaab87c269f24 18-Mar-2007 Adrian Hunter <ext-adrian.hunter@nokia.com> [MTD] nandsim: enhance nandsim to simulate flash errors

New module parameters have been added to nandsim to
simulate:

bitflips random bit flips
badblocks blocks that are initially marked bad
weakblocks blocks that fail to erase after a
small number of erase cycles
weakpages pages that fail to write after a
small number of successful writes
gravepages pages that fail to read after a
small number of successful reads

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2b77a0ed54eeea61937e7f71b0487b815edfbcdf 18-Mar-2007 Adrian Hunter <ext-adrian.hunter@nokia.com> [MTD] nandsim: add partition capability to nandsim

Enhance nandsim to be able to create more than 1 partition.
A new module parameter 'parts' may be used to specify partition
sizes.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4a0c50c07a6100ca58d465bac951533347e18d71 06-Dec-2006 Artem Bityutskiy <dedekind@infradead.org> [MTD] nandsim: bugfix in page addressing

Number of address bytes for 64-128 MiB NANDs is 4, not 5.

Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
95b93a0cd46682c6d9e8eea803fda510cb6b863a 15-Nov-2006 Burman Yan <yan_952@hotmail.com> [MTD] replace kmalloc+memset with kzalloc

Signed-off-by: Yan Burman <yan_952@hotmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
82810b7b6cc7a74c68881a13b0eb66c7a6370fcc 20-Oct-2006 Artem Bityutskiy <dedekind@infradead.org> [MTD] NAND: nandsim: support subpage write

As flash cannot do 0->1 bit transitions when programming, do not do this in
the simulator too. This makes nandsim able to accept subpage writes.

Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
a5602146c5abea7dfb0c9f4fe6f5870ebdafbc9f 14-Oct-2006 Vijay Kumar <vijaykumar@bravegnu.org> [MTD] NAND: nandsim coding style fix

Removes line break after return type in function definitions, to be
consistent with the Linux coding style.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
d086d43640a40dda7783f3c56724048685586d17 08-Oct-2006 Vijay Kumar <vijaykumar@bravegnu.org> [MTD] NAND: nandsim page-wise allocation (2/2)

For page wise allocation, an array of flash page pointers is allocated
during initialization. The flash pages are themselves allocated when a
write occurs to the page. The flash pages are deallocated when they
are erased.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
47e37743381823a5c2d51ef88cfc3d6cff1f8580 08-Oct-2006 Vijay Kumar <vijaykumar@bravegnu.org> [MTD] NAND: nandsim page-wise allocation (1/2)

This patch removes code that does chip mapping. The chip mapping code
is no longer used.

Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
cad74f2c380411ae7bee997f3ba18834cfe313a2 23-May-2006 Thomas Gleixner <tglx@cruncher.tec.linutronix.de> [MTD] NAND remove write_byte/word function from nand_chip

The previous change of the command / hardware control allows to
remove the write_byte/word functions completely, as their only
user were nand_command and nand_command_lp.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
7abd3ef9875eb2afcdcd4f450680298a2983a55e 23-May-2006 Thomas Gleixner <tglx@cruncher.tec.linutronix.de> [MTD] Refactor NAND hwcontrol to cmd_ctrl

The hwcontrol function enforced a step by step state machine
for any kind of hardware chip access. Let the hardware driver
know which control bits are set and inform it about a change
of the control lines. Let the hardware driver write out the
command and address bytes directly. This gives a peformance
advantage for address bus controlled chips and simplifies the
quirks in the hardware drivers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
6dfc6d250d0b7ebaa6423c44dcd09fcfe68deabd 23-May-2006 Thomas Gleixner <tglx@cruncher.tec.linutronix.de> [MTD] NAND modularize ECC

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>
28318776a80bc3261f9af91ef79e6e38bb9f5bec 22-May-2006 Joern Engel <joern@wh.fh-wedel.de> [MTD] Introduce writesize

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>
552d9205186428a1e2a49ed577bcbba9f777af37 14-May-2006 David Woodhouse <dwmw2@infradead.org> [MTD] Fix module refcounting in NAND board drivers.

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>
2b9175c174b83b8d97db9398efe948fa9092938f 29-Nov-2005 Adrian Bunk <bunk@stusta.de> [MTD] Make functions static, include header files with prototypes

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>
61b03bd7c3b55498c6180d43bf71b7bf49114b64 07-Nov-2005 Thomas Gleixner <tglx@linutronix.de> [MTD] NAND: Clean up trailing white spaces

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
515022870f0f648b9c506a285b1c7e92901dd37f 19-Mar-2005 Artem B. Bityuckiy <dedekind@infradead.org> [MTD] NAND nandsim: Use NAND_SKIP_BBT option

Use the new NAND_SKIP_BBT option instead of defining a fake scan_bbt
handler.

Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!