aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2007-02-18[MTD] [MAPS] ichxrom warning fixAndrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-18[MTD] [MAPS] amd76xrom warning fixAndrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-18[MTD] [MAPS] esb2rom warning fixesAndrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-18[MTD] [MAPS] ck804xrom warning fixAndrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-18[MTD] [MAPS] netsc520 warning fixAndrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-18[MTD] [MAPS] sc520cdp warning fixAndrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-18[MTD] [ONENAND] onenand_base warning fixAndrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-14[PATCH] Scheduled removal of SA_xxx interrupt flags fixups 2Thomas Gleixner
The obsolete SA_xxx interrupt flags have been used despite the scheduled removal. Fixup the remaining users in -mm. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14[PATCH] remove many unneeded #includes of sched.hTim Schmielau
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 <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12[PATCH] mark struct file_operations const 5Arjan van de Ven
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 <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] remove invalidate_inode_pages()Andrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[MTD] [NAND] eXcite nand flash driverThomas Koeller
This is a nand flash driver for the eXcite series of intelligent cameras manufactured by Basler Vision Technologies AG. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-10[MTD] Improve heuristic for detecting wrong-endian RedBoot partition tableDavid Woodhouse
Also limit the amount we scan to one eraseblock. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-10[MTD] Fix RedBoot partition parsing regression harder.Rod Whitby
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 <rod@whitby.id.au> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] [NAND] S3C2410: Hardware ECC correction codeBen Dooks
Add support for correcting errors detected by the hardware ECC. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] remove unused ecctype,eccsize fields from struct mtd_infoArtem Bityutskiy
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 <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] [NOR] Intel: remove ugly PROGREGION macrosArtem Bityutskiy
Remove ugly and weird MTD_PROGREGION_CTRLMODE_VALID() and MTD_PROGREGION_CTRLMODE_INVALID() macros. There is only one user of them and they are used locally just for printing. Anyway, this patch is a preparation for removing mtd->ecctype and mtd->eccsize, but these macros use them. Fix this. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] [NOR] STAA: use writesize instead off eccsize to represent ECC blockArtem Bityutskiy
The cfi_staa_write_buffers() uses mtd->eccsize but means mtd->writesize. BTW, mtd-eccsize is broken and is not initialized, which means the code fixed by this patch is broken/unused anyway. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] OneNAND: Invalidate bufferRAM after eraseAdrian Hunter
OneNAND has internal bufferRAMs. The driver keeps track of what is in the bufferRAM to save having to load from the NAND core. After an erase operation, the driver must mark bufferRAM invalid if it refers to the erased block. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] Don't oops when the RedBoot partition table is emptyMartin Michlmayr
This fixes a regression with the RedBoot parsing code introduced by commit 0b47d654089c5ce3f2ea26a4485db9bcead1e515 Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] [NAND] Fix an off-by-one in a BUG_ON in CAFÉ ECC correction.Adrian Bunk
err_pos_lut[4096] of an array with 4096 elements is a bug. Spotted by the Coverity checker. While I was at it, I also converted it to ARRAY_SIZE(). Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] [NAND] Correctly validate out-of-band offset and lengthAdrian Hunter
Add checks to ensure that out-of-band reads and writes are not attempted with an invalid offset or length. Specifically, the offset must be less than the size of oob for a page and the length must not go beyond the size of the device. Additionally the checks must adjust for auto-placement (MTD_OOB_AUTO) of oob data. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] Fix default timeouts for Intel NOR flashDavid Woodhouse
In commit c172471b78255a5cf6d05383d9ebbf0c6683167a Nico switched to using common code for polling for command completion. Unfortunately he also used a common default timeout for both write and erase commands, despite the fact that erases can take a _whole_ lot longer. Use a more sensible default for erase timeout. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09Merge branch 'master' of git://git.infradead.org/~kmpark/onenand-mtd-2.6David Woodhouse
2007-02-09[MTD] CK804XROM must depend on PCIakpm@osdl.org
CONFIG_MTD_CK804XROM=y, CONFIG_PCI=n results in the following compile error: CC drivers/mtd/maps/ck804xrom.o ck804xrom.c: In function 'ck804xrom_init_one': ck804xrom.c:114: error: implicit declaration of function 'pci_dev_get' ck804xrom.c:114: warning: assignment makes pointer from integer without a cast make[4]: *** [drivers/mtd/maps/ck804xrom.o] Error 1 Considering what hardware this driver is driving, a dependency on PCI also seems logical. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Ryan Jackson <rjackson@lnxi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-09[MTD] OneNAND: Select correct chip's bufferRAM for DDPAdrian Hunter
OneNAND double-density package (DDP) has two chips, each with their own bufferRAM. The driver will skip loading data from the NAND core if the data can be found in a bufferRAM, however in that case, the correct chip's bufferRAM must be selected before reading from bufferRAM. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-02-07[MTD] OneNAND: Error message printing and bad block scan errosKyungmin Park
Provide the bad block scan with its own read function so that important error messages that are not from the the bad block scan, can always be printed. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-02-07[MTD] OneNAND: Subpage write returned incorrect length writtenAdrian Hunter
When a write is done, the length written is returned. When a single subpage is written the length returned should be the subpage size, however the page size was being returned. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-02-06[MTD] OneNAND: Do not allow oob write past end of pageAdrian Hunter
OneNAND can write oob to successive pages, but NAND does not do that. For compatibility, disallow OneNAND from writing past the end of the page. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-02-05[MTD NAND] CAFÉ controller depends, perhaps unsurprisingly, on NANDDavid Woodhouse
Noticed by Ingo. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-02-05Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2007-02-02[MTD] OneNAND: Fix typo and remove unnecessary goto statementKyungmin Park
In previos patch, there's typo so fix it Remove unnecessary goto statement Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-02-02[MTD] OneNAND: Reduce internal BufferRAM operationsKyungmin Park
It use blockpage instead of a pair (block, page). It can also cover a small chunk access. 0x00, 0x20, 0x40 and so on. And in JFFS2 behavior, sometimes it reads two pages alternatively. e.g., It first reads A page, B page and A page. So we check another bufferram to find requested page. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-02-02[MTD] OneNAND: Remove line of code that was meant to be deleted in OOB_AUTOKyungmin Park
- Iterations of the patch to add oob auto-placement support to OneNAND left a line of code that was meant to have been deleted. - read mtd->oobsize in onenand_transfer_auto_oob to optimized memcpy Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-02-01[MTD] OneNAND: Add support for auto-placement of out-of-band dataAdrian Hunter
Enable the use of oob operation mode MTD_OOB_AUTO with OneNAND. Note that MTD_OOB_RAW is still not supported. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-31[MTD] ck804xrom: fix a pci_find_deviceAlan
Going over the bugs and warnings I found this one left over. The other changes have already been correctly done for this driver but the actual switch to pci_get_device that they assume has not. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-01-31[MTD] OneNAND: Remove unused fieldsKyungmin Park
- Remove unused fields - Fix typo Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-30[PATCH] mtd/nand/cafe.c missing include of dma-mapping.hAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-25[MTD] OneNAND: Amend write-verify to compare to original bufferAdrian Hunter
When write-verify is enabled (CONFIG_MTD_ONENAND_VERIFY_WRITE), the data written is read back and compared. The comparison was being made between dataRAM buffers, but this does not verify that the data made it to the dataRAM correctly in the first place. This patch amends write-verify to compare back to the original buffer. It also now verifies sub-page writes. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-23[MTD] [NAND] Remove debugging cruft from CAFÉ NAND driver.David Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-01-23[MTD] [NAND] Inherit CAFÉ NAND timing setup from firmwareDavid Woodhouse
The precise timings are board-specific (or NAND chip specific) and don't belong here. If they're set already, then use what we find there. Otherwise, revert to the most conservative default values (and whinge). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-01-22[MTD] OneNAND: Check first or second pages for bad block informationAdrian Hunter
OneNAND records bad block information in the out-of-band area of either the first or second page of a block. Due to a logic error, only the first page was being checked. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-22[MTD] OneNAND: Free the bad block table when the device is releasedAdrian Hunter
OneNAND does 2 memory allocations for bad block information. Only one of them was being freed. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-18[MTD] OneNAND: Update copyrights and code cleanupKyungmin Park
Update copyrights and code cleanup Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-18[MTD] OneNAND: Reduce Double Density Package (DDP) operationsKyungmin Park
- DDP code clean-up - Reduce block & bufferram operations in DDP Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-18[MTD] OneNAND: Return an error if a read timeout occursAdrian Hunter
If OneNAND is operating within specification, all operations should easily be completed within the 20 millisecond timeout. This patch faithlessly adds a check for the timeout and returns an error in that case. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-18[MTD] OneNAND: Fix unlock all status errorKyungmin Park
We have to set ONENAND_REG_START_BLOCK_ADDRESS to avoid status error Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-18Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2007-01-10[MTD] OneNAND: Handle DDP chip boundary during read-while-loadAdrian Hunter
The read-while-load method of reading from OneNAND needs to allow for the change of bufferRAM address at the boundary between the two chips in a double density (DDP) device. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2007-01-10[MTD] OneNAND: return ecc error code only when 2-bit ecc occursKyungmin Park
we don't need to return ecc error when 1-bit ecc. We only return error code when 2-bit ecc error Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>