summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeFilesLines
* [MTD] replace kmalloc+memset with kzallocBurman Yan2006-11-2840-123/+52
| | | | | Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] Fix printk format warning in physmap. (resources again)Randy Dunlap2006-11-281-1/+1
| | | | | | | | | Fix printk format warning: drivers/mtd/maps/physmap.c:93: warning: long long unsigned int format, long unsigned int arg (arg 2) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Merge git://git.infradead.org/~dwmw2/cafe-2.6David Woodhouse2006-11-284-1/+2162
|\
| * [MTD] NAND: Fix ECC settings in CAFÉ controller driver.David Woodhouse2006-11-011-7/+3
| | | | | | | | | | | | | | | | We were resetting cafe->ctl2 to zero after an erase (and also during a write, but it was correctly reset after that). This meant that ECC reads after an erase were failing. Doh. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Add register debugging spew option to CAFÉ driverDavid Woodhouse2006-10-311-13/+13
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Use register #defines throughout CAFÉ driver, not numbersDavid Woodhouse2006-10-311-55/+63
| | | | | | | | | | | | | | Also use cafe_readl() and cafe_writel() abstraction to make code slightly cleaner -- especially if we want to use it in PIO mode. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Fix timing calculation in CAFÉ debugging messageDavid Woodhouse2006-10-281-1/+2
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Remove empty block ECC workaroundDavid Woodhouse2006-10-271-27/+1
| | | | | | | | | | | | | | They fixed the hardware so that ECC doesn't fail on reading an empty block. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Add ECC debugging for CAFÉDavid Woodhouse2006-10-271-3/+36
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] CAFÉ NAND: Add 'slowtiming' parameter, default usedma and checkecc onDavid Woodhouse2006-10-271-11/+15
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Reset Café controller before initialising.David Woodhouse2006-10-271-0/+4
| | | | | | | | | | | | Fixes http://dev.laptop.org/ticket/237 Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Café ECC -- remove spurious BUG_ON() in err_pos()David Woodhouse2006-10-271-1/+0
| | | | | | | | | | | | | | | | Being a value which isn't in the table is a case we explicitly check for in the caller. Don't BUG_ON() because it does actually happen in practice. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Disable ECC checking on CAFÉ since it's broken for nowDavid Woodhouse2006-10-231-2/+5
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: CAFÉ NAND driver cleanup, fix ECC on reading empty flashDavid Woodhouse2006-10-223-48/+109
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] NAND: Add hardware ECC correction support to CAFÉ NAND driverDavid Woodhouse2006-10-222-13/+1385
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * Merge git://git.infradead.org/~dwmw2/cafe-2.6David Woodhouse2006-10-223-0/+706
| |\ | | | | | | | | | | | | | | | Conflicts: drivers/mtd/nand/Kconfig
| | * [MTD NAND] OLPC CAFÉ driver updateDavid Woodhouse2006-10-201-36/+99
| | | | | | | | | | | | | | | | | | | | | | | | - Fix OOB handling, bad block table marker placement - Some cleanups, enable runtime-optional debugging - Allow BBT stuff to be skipped Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| | * [MTD NAND] Initial import of CAFÉ NAND driver.David Woodhouse2006-10-063-0/+643
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] [NAND] remove len/ooblen confusion.Vitaly Wool2006-11-288-54/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As was discussed between Ricard Wanderlöf, David Woodhouse, Artem Bityutskiy and me, the current API for reading/writing OOB is confusing. The thing that introduces confusion is the need to specify ops.len together with ops.ooblen for reads/writes that concern only OOB not data area. So, ops.len is overloaded: when ops.datbuf != NULL it serves to specify the length of the data read, and when ops.datbuf == NULL, it serves to specify the full OOB read length. The patch inlined below is the slightly updated version of the previous patch serving the same purpose, but with the new Artem's comments taken into account. Artem, BTW, thanks a lot for your valuable input! Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] Allow variable block sizes in mtd_blkdevsRichard Purdie2006-11-287-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, mtd_blkdevs enforces a block size of 512, even if the drivers can seemingly request a different size. This patch fixes mtd_blkdevs so block sizes other than 512 work correctly. Signed-off-by: Richard Purdie <rpurdie@openedhand.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] [MAPS] Support for BIOS flash chips on the nvidia ck804 southbridgeDave Olsen2006-11-283-0/+366
| | | | | | | | | | | | | | | | | | | | | Add support for accessing BIOS flash chips connected to the NVIDIA ck804 southbridge. Signed-off-by: Ryan Jackson <rjackson@lnxi.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] [NAND] Fix endianess bug in ndfc.cStefan Roese2006-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The writel() call accidentally clears all bits in the NDFC_CCR register (endianess problem). Now __raw_writel() is used instead. Tested on Bamboo with NAND on chip select 0 and chip select 1. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] make drivers/mtd/cmdlinepart.c:mtdpart_setup() staticAdrian Bunk2006-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | This patch makes the needlessly global mtdpart_setup() static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] [NAND] rtc_from4.c: use lib/bitrev.cAdrian Bunk2006-11-282-42/+3
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts drivers/mtd/nand/rtc_from4.c to use the new lib/bitrev.c Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] NAND: Fix nand_default_mark_blockbad() when flash-based BBT disabledRicard Wanderlöf2006-10-261-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a flash-based BBT is not used, nand_default_mark_blockbad() is supposed to mark the block bad in the oob. However, it sets the wrong length variable so that no bad block marker is in fact written. This patch attempts to rectify that. (As note, it seems to be that logically, it shouldn't be necessary to set both length variables, as one appears to be for the main buffer, and one for the oob buffer, but this is how it is done in several places, including the code for the mtd character device MEMWRITEOOB and MEMREADOOB ioctls. I'm not sure if this is a temporary solution during some rework of the mtd infrastructure, or whether there is a deeper thought here.) Signed-off-by: Ricard Wanderlöf <ricardw@axis.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] NAND: Correct setting of chip->oob_poi OOB bufferDavid Woodhouse2006-10-221-1/+1
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] NAND: Combined oob buffer so it's contiguous with dataDavid Woodhouse2006-10-211-10/+5
| | | | | | | | | | | | | | | | | | | | Ditch the separate oobrbuf and oobwbuf fields from the chip buffers, and use only a single buffer immediately after the data. This accommodates NAND controllers such as the OLPC CAFÉ chip, which can't do scatter/gather DMA so needs the OOB buffer to be contiguous with the data, for both read and write. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Merge branch 'master' of ↵David Woodhouse2006-10-212-2/+2
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * | [PATCH] mtd: remove several bogus casts to void * in iounmap() argumentAl Viro2006-10-102-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | | [MTD] NAND: nandsim: support subpage writeArtem Bityutskiy2006-10-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [MTD] NOR: leave Intel chips in read-array mode on suspendDavid Anders2006-10-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During some testing with several samsung s3c24xx based devices it was discovered that often the cfi_cmdset_0001.c would not leave the chip in read-array mode on suspend. this is an issue if the same flash chip is used for the bootloader that needs to be read on resume. Signed-off-by: David Anders <danders@amltd.com> Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] core: trivial comments fixArtem Bityutskiy2006-10-211-6/+6
| | | | | | | | | | | | | | | Signed-off-by: Artem Bityutskiy <dedekind@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] NAND: nandsim coding style fixVijay Kumar2006-10-211-38/+19
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [MTD] NAND: nandsim page-wise allocation (2/2)Vijay Kumar2006-10-211-24/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [MTD] NAND: nandsim page-wise allocation (1/2)Vijay Kumar2006-10-211-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [MTD] MAPS: Remove ITE 8172G and Globespan IVR MTD supportYoichi Yuasa2006-10-211-120/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has removed ITE 8172G and Globespan IVR MTD support. These boards support have already been removed. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Acked-by: Ralf Bächle <ralf@linux-mips.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] mtdchar: Fix MEMGETOOBSEL and ECCGETLAYOUT ioctlsRicard Wanderlöf2006-10-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The ECCGETLAYOUT ioctl copy_to_user() call has a superfluous '&' causing the resulting information to be garbage rather than the intended mtd->ecclayout. 2. The MEMGETOOBSEL misses copying mtd->ecclayout->eccbytes so the resulting field of the returned structure contains garbage. Signed-off-by: Ricard Wanderlöf <ricardw@axis.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] NAND: AT91 NAND driverAndrew Victor2006-10-213-0/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version only differs from version posted by Savin Zlobec (20 Jun 2006) in that the AT91RM9200-specific chip-select / bus setup code has been moved from the at91_nand.c driver into the processor-specific file. From: Savin Zlobec <savin@epico.si> Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] MAPS: esb2rom: use hotplug safe interfacesAlan Cox2006-10-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fairly self explanatory. Keep a reference initially, drop it when we free up the driver resources. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] JEDEC probe: fix comment typo (devic)Alexey Dobriyan2006-10-211-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] MAPS: Support for BIOS flash chips on Intel ESB2 southbridgeLew Glendenning2006-10-213-0/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add MTD map driver for BIOS flash chips connected to the Intel ESB2 southbridge. [akpm@osdl.org: coding-style fixes, build fix] Signed-off-by: Ryan Jackson <rjackson@lnxi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] CHIPS: Support for SST 49LF040B flash chipRyan Jackson2006-10-212-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | Add chip driver and JEDEC probe support for the SST 49LF040B flash chip. Signed-off-by: Ryan Jackson <rjackson@lnxi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] MAPS: Add parameter to amd76xrom to override rom window sizeRyan Jackson2006-10-211-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 2 bits controlling the window size are often set to allow reading the BIOS, but too small to allow writing, since the lock registers are 4MiB lower in the address space than the data. This is intended to prevent flashing the bios, perhaps accidentally. The bits are 6 and 7. If both bits are set, it is a 5MiB window. If only the 7 Bit is set, it is a 4MiB window. Otherwise, it is a 64KiB window. This parameter allows the driver to override the BIOS settings. Signed-off-by: Ryan Jackson <rjackson@lnxi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | | [MTD] SSFDC must depend on BLOCKAdrian Bunk2006-10-091-2/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following compile error with CONFIG_SSFDC=m, CONFIG_BLOCK=n: <-- snip --> ... CC [M] drivers/mtd/mtd_blkdevs.o /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mtd/mtd_blkdevs.c:40: warning: ‘struct request’ declared inside parameter list /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mtd/mtd_blkdevs.c:40: warning: its scope is only this definition or declaration, which is probably not what you want /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mtd/mtd_blkdevs.c: In function ‘do_blktrans_request’: /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mtd/mtd_blkdevs.c:45: error: dereferencing pointer to incomplete type ... make[3]: *** [drivers/mtd/mtd_blkdevs.o] Error 1 <-- snip --> Bug report by Jesper Juhl. This patch also removes a pointless "default n" from the SSFDC option. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | fix file specification in commentsUwe Zeisberger2006-10-032-2/+2
| | | | | | | | | | | | | | Many files include the filename at the beginning, serveral used a wrong one. Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* | Fix several typos in drivers/Matt LaPlante2006-10-033-3/+3
| | | | | | | | Signed-off-by: Adrian Bunk <bunk@stusta.de>
* | [MTD] Cleanup of 'ioremap balanced with iounmap for drivers/mtd subsystem'Amol Lad2006-10-026-13/+13
| | | | | | | | | | | | | | | | | | | | Updated version of patch, in response to comments from Francois Romieu <romieu@fr.zoreil.com> Remove gratuitous casts from iounmap and initialisation of variables. Signed-off-by: Amol Lad <amol@verismonetworks.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] fix nftl_write warningFrederik Deweerdt2006-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Building 2.6.18-mm2 issues the following warning if CONFIG_NFTL_RW is not set: CC [M] drivers/mtd/nftlcore.o drivers/mtd/nftlcore.c:183: warning: 'nftl_write' defined but not used The following patch only compiles nftl_write if CONFIG_NFTL_RW is set. Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] fix printk warningJeff Garzik2006-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc spits out this warning: drivers/mtd/mtd_blkdevs.c: In function ‘do_blktrans_request’: drivers/mtd/mtd_blkdevs.c:72: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘unsigned int’ This could be fixed any number of ways, including use of BUG(). rq_data_dir() only returns 0 or 1, so this entire case is superfluous. I did the most simple fix. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Merge branch 'master' of ↵David Woodhouse2006-10-013-8/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Manually resolve conflict in include/mtd/Kbuild Signed-off-by: David Woodhouse <dwmw2@infradead.org>
OpenPOWER on IntegriCloud