aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2006-11-28[MTD] [NAND] rtc_from4.c: use lib/bitrev.cAdrian Bunk
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>
2006-11-16[MTD] OneNAND: Single bit error detectionKyungmin Park
Idea from Jarkko Lavinen Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-11-16[MTD] OneNAND: lock supportKyungmin Park
Now you can use mtd lock inferface on OneNAND The idea is from Nemakal, Vijaya, thanks Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2006-11-16MTD: OneNAND: interrupt based wait supportKyungmin Park
We can use the two methods to wait. 1. polling: read interrupt status register 2. interrupt: use kernel ineterrupt mechanism To use interrupt method, you first connect onenand interrupt pin to your platform and configure interrupt properly Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
2006-11-01[MTD] NAND: Fix ECC settings in CAFÉ controller driver.David Woodhouse
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>
2006-10-31[MTD] NAND: Add register debugging spew option to CAFÉ driverDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-31[MTD] NAND: Use register #defines throughout CAFÉ driver, not numbersDavid Woodhouse
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>
2006-10-28[MTD] NAND: Fix timing calculation in CAFÉ debugging messageDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[PATCH] silence 'make xmldocs' warning by adding missing description of ↵Jesper Juhl
'raw' in nand_base.c:1485 Add description of 'raw' in comments for drivers/mtd/nand/nand_base.c::nand_write_page_syndrome() so 'make xmldocs' will not spew a warning at us. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-27[MTD] NAND: Remove empty block ECC workaroundDavid Woodhouse
They fixed the hardware so that ECC doesn't fail on reading an empty block. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[MTD] NAND: Add ECC debugging for CAFÉDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[MTD] CAFÉ NAND: Add 'slowtiming' parameter, default usedma and checkecc onDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[MTD] NAND: Reset Café controller before initialising.David Woodhouse
Fixes http://dev.laptop.org/ticket/237 Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-27[MTD] NAND: Café ECC -- remove spurious BUG_ON() in err_pos()David Woodhouse
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>
2006-10-26[MTD] NAND: Fix nand_default_mark_blockbad() when flash-based BBT disabledRicard Wanderlöf
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>
2006-10-23[MTD] NAND: Disable ECC checking on CAFÉ since it's broken for nowDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-22[MTD] NAND: CAFÉ NAND driver cleanup, fix ECC on reading empty flashDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-22[MTD] NAND: Add hardware ECC correction support to CAFÉ NAND driverDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-22Merge git://git.infradead.org/~dwmw2/cafe-2.6David Woodhouse
Conflicts: drivers/mtd/nand/Kconfig
2006-10-22[MTD] NAND: Correct setting of chip->oob_poi OOB bufferDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-21[MTD] NAND: Combined oob buffer so it's contiguous with dataDavid Woodhouse
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>
2006-10-21Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2006-10-21[MTD] NAND: nandsim: support subpage writeArtem Bityutskiy
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>
2006-10-21[MTD] NOR: leave Intel chips in read-array mode on suspendDavid Anders
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>
2006-10-21[MTD] core: trivial comments fixArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <dedekind@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-21[MTD] NAND: nandsim coding style fixVijay Kumar
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>
2006-10-21[MTD] NAND: nandsim page-wise allocation (2/2)Vijay Kumar
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>
2006-10-21[MTD] NAND: nandsim page-wise allocation (1/2)Vijay Kumar
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>
2006-10-21[MTD] MAPS: Remove ITE 8172G and Globespan IVR MTD supportYoichi Yuasa
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>
2006-10-21[MTD] mtdchar: Fix MEMGETOOBSEL and ECCGETLAYOUT ioctlsRicard Wanderlöf
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>
2006-10-21[MTD] NAND: AT91 NAND driverAndrew Victor
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>
2006-10-21[MTD] MAPS: esb2rom: use hotplug safe interfacesAlan Cox
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>
2006-10-21[MTD] JEDEC probe: fix comment typo (devic)Alexey Dobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-21[MTD] MAPS: Support for BIOS flash chips on Intel ESB2 southbridgeLew Glendenning
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>
2006-10-21[MTD] CHIPS: Support for SST 49LF040B flash chipRyan Jackson
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>
2006-10-21[MTD] MAPS: Add parameter to amd76xrom to override rom window sizeRyan Jackson
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>
2006-10-20[MTD NAND] OLPC CAFÉ driver updateDavid Woodhouse
- 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>
2006-10-10[PATCH] mtd: remove several bogus casts to void * in iounmap() argumentAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-09[MTD] SSFDC must depend on BLOCKAdrian Bunk
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>
2006-10-06[MTD NAND] Initial import of CAFÉ NAND driver.David Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-10-03fix file specification in commentsUwe Zeisberger
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>
2006-10-03Fix several typos in drivers/Matt LaPlante
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-02[MTD] Cleanup of 'ioremap balanced with iounmap for drivers/mtd subsystem'Amol Lad
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>
2006-10-02[MTD] fix nftl_write warningFrederik Deweerdt
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>
2006-10-01[MTD] fix printk warningJeff Garzik
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>
2006-10-01Merge branch 'master' of ↵David Woodhouse
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>
2006-09-30[PATCH] BLOCK: Make it possible to disable the block layer [try #6]David Howells
Make it possible to disable the block layer. Not all embedded devices require it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require the block layer to be present. This patch does the following: (*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev support. (*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls an item that uses the block layer. This includes: (*) Block I/O tracing. (*) Disk partition code. (*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS. (*) The SCSI layer. As far as I can tell, even SCSI chardevs use the block layer to do scheduling. Some drivers that use SCSI facilities - such as USB storage - end up disabled indirectly from this. (*) Various block-based device drivers, such as IDE and the old CDROM drivers. (*) MTD blockdev handling and FTL. (*) JFFS - which uses set_bdev_super(), something it could avoid doing by taking a leaf out of JFFS2's book. (*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is, however, still used in places, and so is still available. (*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and parts of linux/fs.h. (*) Makes a number of files in fs/ contingent on CONFIG_BLOCK. (*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK. (*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK is not enabled. (*) fs/no-block.c is created to hold out-of-line stubs and things that are required when CONFIG_BLOCK is not set: (*) Default blockdev file operations (to give error ENODEV on opening). (*) Makes some /proc changes: (*) /proc/devices does not list any blockdevs. (*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK. (*) Makes some compat ioctl handling contingent on CONFIG_BLOCK. (*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if given command other than Q_SYNC or if a special device is specified. (*) In init/do_mounts.c, no reference is made to the blockdev routines if CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2. (*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return error ENOSYS by way of cond_syscall if so). (*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if CONFIG_BLOCK is not set, since they can't then happen. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30[PATCH] Split struct request ->flags into two partsJens Axboe
Right now ->flags is a bit of a mess: some are request types, and others are just modifiers. Clean this up by splitting it into ->cmd_type and ->cmd_flags. This allows introduction of generic Linux block message types, useful for sending generic Linux commands to block devices. Signed-off-by: Jens Axboe <axboe@suse.de>
2006-09-26[MTD ONENAND] Check OneNAND lock scheme & all block unlock command supportKyungmin Park
OneNAND lock scheme depends on density and process of chip. Some OneNAND chips support all block unlock Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-26[MTD ONENAND] Remove unused MTD_ONENAND_SYNC_READ configurationKyungmin Park
Now the bootloader configures the OneNAND sync. burst mode. So we don't access Sync. burst mode related registers in kernel. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>