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 <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
A new module parameter 'rptwear' specifies how many erases between
reporting wear information. Zero means never.
Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
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 <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
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 <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
There is a slight bug in nand_default_block_markbad, where the offset is
cast to an integer, prior to being shifted. This means that on large
offsets, it is incorrectly doing a signed shift & losing bits. Fixed
this by doing the cast after the shift (as is done elsewhere in the code).
Signed-off-by: Andre Renaud <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Add support for AT26Fxxx dataflash devices. These devices have a quite different
commandset than the AT45xxx chips, which are handled by at91_dataflash.c, so a
combined driver turned out to be more ugly than useful.
Tested only on AT26F004.
Signed-off-by: Hans-Jürgen Koch <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
The ops.len member is not initialized, because it is unused for this
operation. The length check needs to use ops.ooblen instead
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
The support for obsolete ancient NAND chips adds .data size and one
of the old ids conflicts with a modern one. Make the support for
such chips depending on a config option.
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Use the functions in the ecc structure instead of the default ones,
so the override by the board driver is effective also for software ecc
code paths.
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
o A dependency on the processor architecture does not make sense;
delete it.
o The Alchemy and MTX drivers requires MTD_PARTITIONS and MTD_CFI to work,
make those dependencies.
Signed-off-by: Ralf Baechle <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Auto unlock sectors on resume for auto locking flash on power up.
Signed-off-by: Rodolfo Giometti <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Add flash and rootfs mappings for the PMC-Sierra MSP71xx devices.
This patch references some platform support files previously submitted to
the [email protected] list.
Signed-off-by: Marc St-Jean <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Classify the page data and oob buffer
and it prevents the memory fragementation (writesize + oobsize)
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
When transferring/filling of the oob is finished in OOB_AUTO, we exit the loop
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
In oob functions, it is used main buffer instead of oob one. So fix it.
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
If an erase operation fails, the address at which the
failure occurred is returned by the driver. The MTD
partition must adjust this address (by subtracting the
partition offset) before returning to the caller.
This was not happening, which caused JFFS2 to mark
the wrong block bad!
Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Replace the apparently misspelled preprocessor variable
"MTD_NAND_DISKONCHIP_BBTWRITE" with the correct form
"CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE".
Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
The type of a resource could be 32 or 64bit depending upon platform or
option so cast it explicitly.
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
The files cfi_cmdset_0002.c and cfi_cmdset_0020.c do not initialize their
wait queues like is done in cfi_cmdset_0001.c. This causes an oops when
the wait queue is accessed. I have copied the code from cfi_cmdset_0001.c
that is pertinent to initialization of the wait queue.
Signed-off-by: Vijay Sampath <[email protected]>
Acked-by: Joern Engel <[email protected]>
Acked-by: Josh Boyer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Add checking for closed ROM window on Intel ESB2 Southbridge.
Signed-off-by: Cyrill Gorcunov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
During the MTD rework the oobavail parameter of mtd_info structure has become
private. This is not quite correct in terms of integrity and logic. If we have
means to write to OOB area, then we'd like to know upfront how many bytes out
of OOB are spare per page to be able to adapt to specific cases.
The patch inlined adds the public oobavail parameter.
Signed-off-by: Vitaly Wool <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Noticed while building a s3c2410 kernel :
drivers/mtd/nand/s3c2410.c: In function 's3c2440_nand_calculate_ecc':
drivers/mtd/nand/s3c2410.c:476: warning: format '%06x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
This patch fixes it.
Signed-off-by: Arnaud Patard <[email protected]>
Signed-off-by: Russell King <[email protected]>
Over the years there was a slow trickle of complaints against the readahead
code. Most of them concerned performance, Peter Zijlstra stumbled over it
when working unrelated changes and I believe there was an actual bug report.
Oh, Andrew Morton also complained about duplicating code from mm/readahead.c.
It is just not worth it. On flash media like usb sticks, readahead will
make things go slow - very slow. On spinning disks, readahead may be a
win, but this is definitely not the place to add it.
Signed-off-by: Jörn Engel <[email protected]>
drivers/mtd/devices/block2mtd.c:311:9: warning: symbol 'dev' shadows an earlier one
drivers/mtd/devices/block2mtd.c:294:23: originally declared here
Signed-off-by: Jörn Engel <[email protected]>
Remove two casts - they were not only pointless, but outright harmful.
Spotted by Felix Fietkau <[email protected]>
Signed-off-by: Jörn Engel <[email protected]>
S3C2412 use differents registers than s3c2440 for hw ecc handling.
Signed-off-by: Matthieu CASTET <[email protected]>
Acked-by: Ben Dooks <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/nand/cafe.c: In function 'cafe_nand_cmdfunc':
drivers/mtd/nand/cafe.c:269: warning: 'irqs' may be used uninitialized in this function
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/maps/ichxrom.c: In function 'ichxrom_init_one':
drivers/mtd/maps/ichxrom.c:231: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
drivers/mtd/maps/ichxrom.c:231: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/maps/amd76xrom.c: In function 'amd76xrom_init_one':
drivers/mtd/maps/amd76xrom.c:209: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/maps/esb2rom.c: In function 'esb2rom_init_one':
drivers/mtd/maps/esb2rom.c:293: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/maps/ck804xrom.c: In function 'ck804xrom_init_one':
drivers/mtd/maps/ck804xrom.c:211: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
drivers/mtd/maps/ck804xrom.c:211: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t'
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/maps/netsc520.c: In function 'init_netsc520':
drivers/mtd/maps/netsc520.c:97: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/maps/sc520cdp.c:241: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t'
drivers/mtd/maps/netsc520.c: In function 'init_netsc520':
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/onenand/onenand_base.c: In function 'onenand_bbt_read_oob':
drivers/mtd/onenand/onenand_base.c:1033: warning: format '%i' expects type 'int', but argument 3 has type 'size_t'
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
The obsolete SA_xxx interrupt flags have been used despite the scheduled
removal. Fixup the remaining users in -mm.
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.
To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.
Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).
Signed-off-by: Tim Schmielau <[email protected]>
Acked-by: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.
Signed-off-by: Arjan van de Ven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Convert all calls to invalidate_inode_pages() into open-coded calls to
invalidate_mapping_pages().
Leave the invalidate_inode_pages() wrapper in place for now, marked as
deprecated.
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This is a nand flash driver for the eXcite series of intelligent
cameras manufactured by Basler Vision Technologies AG.
Signed-off-by: Thomas Koeller <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Correct the location of the recalculation of the FIS directory size,
and also add the same recalculation for the byte-swapped case.
Signed-off-by: Rod Whitby <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Add support for correcting errors detected by the
hardware ECC.
Signed-off-by: Ben Dooks <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Remove unused and broken mtd->ecctype and mtd->eccsize fields
from struct mtd_info. Do not remove them from userspace API
data structures (don't want to breake userspace) but mark them
as obsolete by a comment. Any userspace program which uses them
should be half-broken anyway, so this is more about saving
data structure size.
Signed-off-by: Artem Bityutskiy <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>