summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeFilesLines
...
| * | [MTD] Remove dead mapsKumar Gala2007-08-224-383/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tqm834x map Kconfig options depends on TQM834x which does not exist anywhere else in the kernel. The pq2fads map Kconfig/makefile support was removed a while ago but the actual file persisted. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * | [MTD] 4xx: Don't build arch/ppc dependent drivers in arch/powerpcJosh Boyer2007-08-222-3/+3
| |/ | | | | | | | | | | | | | | These drivers are specific to 4xx support in arch/ppc at the moment. Make sure they don't get built on arch/powerpc. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Merge branch 'master' of ↵David Woodhouse2007-08-233-5/+2
|\ \ | |/ | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * mtdchar build fixAndrew Morton2007-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | sh: drivers/mtd/mtdchar.c: In function `mtd_mmap': drivers/mtd/mtdchar.c:817: error: dereferencing pointer to incomplete type drivers/mtd/mtdchar.c:817: error: `VM_SHARED' undeclared (first use in this function) drivers/mtd/mtdchar.c:817: error: (Each undeclared identifier is reported only once Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [MTD] Makefile fix for mtdsuperSatyam Sharma2007-08-032-5/+1
| | | | | | | | | | | | | | | | | | We want drivers/mtd/{mtdcore, mtdsuper, mtdpart}.c to be built and linked into the same mtd.ko module. Fix the Makefile to ensure this, and remove duplicate MODULE_ declarations in mtdpart.c, as mtdcore.c already has them. Signed-off-by: Satyam Sharma <satyam@infradead.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] [NAND] nand_base.c: fix type of eccpos pointerBen Dooks2007-08-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The nand_base.c driver implicitly casts the uint32_t eccpos array to 'int *', which is not only not guaranteed to be the same sign as the source, but is not guaranteed to be the same size. Fix by changing nand_base.c to use uint32_t referencing the eccpos fields. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] [NAND] at91_nand rdy_pin fixIvan Kuten2007-08-021-1/+4
| | | | | | | | | | | | | | | | | | The patch below fixes nand driver for AT91 boards which do not have NAND R/B signal connected to gpio (rdy_pin is not connected). Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com> Acked-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] [NAND] fix race in nand_base.cArtem Bityutskiy2007-08-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When we mark block bad we have to get chip because this involves writing to the page's OOB. We hit this bug in UBI - we observed random obscure crashes when it marks block bad from the background thread and there is some parallel task which utilizes flash. This patch also adds a TODO note about BBT table protection which it seems does not exist. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function.Roland Stigge2007-08-021-5/+5
| | | | | | | | | | | | | | | | | | The patch ensures that the current code (kernel 2.6.22) uses the bits like the code prior to the refactoring. The variable "bits" is employed in a useful way now. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [MTD] Fix potential leak in rfd_ftl_add_mtdFlorin Malita2007-08-021-0/+1
| | | | | | | | | | | | | | This fixes a leak in the !mtd->erasesize error path (Coverity 1765). Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] mtdoops printk warning fixesAndrew Morton2007-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | drivers/mtd/mtdoops.c: In function 'mtdoops_inc_counter': drivers/mtd/mtdoops.c:109: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' drivers/mtd/mtdoops.c: In function 'mtdoops_console_sync': drivers/mtd/mtdoops.c:277: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' someone buy Dave an x86_64 box. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Revert "[MTD] Driver for AT26Fxxx dataflash devices"David Woodhouse2007-08-033-494/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 340ea370c2ce89d1c15fbf785460f2f74314ce58. It's not needed given the other m25p80 patch (which now handles at26 "dataflash" as well as most other standard SPI flash chips), and requires a controller driver that won't be merged upstream (supplanted by drivers/spi/atmel_spi.c) ... the submitter of that at91_dataflash26.c driver concurred. Requested by David Brownell <david-b@pacbell.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Merge branch 'master' of ↵David Woodhouse2007-08-013-8/+2
|\ \ | |/ | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * [MIPS] Remove Momentum Ocelot support.Ralf Baechle2007-07-312-6/+0
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * sun userflash is PCI-dependentAl Viro2007-07-261-1/+1
| | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | [MTD] [NAND] nand_base.c fix broken linkmaximilian attems2007-08-011-1/+1
| | | | | | | | | | | | | | | | replace with working link from nand Kconfig help text fixes bugzilla 7815 Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [ONENAND] onenand_sim.c: make struct info staticAdrian Bunk2007-08-011-1/+1
| | | | | | | | | | | | | | This patch makes the needlessly global struct info static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [UBI] drivers/mtd/ubi/scan.c: kmalloc + memset conversion to kzallocMariusz Kozlowski2007-08-011-9/+8
| | | | | | | | | | | | | | | | To be able to convert kmalloc + memset(..., 1, ...) to kzalloc this patch reverses the logic around 'buf'. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] pmcmsp-flash.c: kmalloc + memset conversion to k[cz]allocMariusz Kozlowski2007-08-011-10/+12
| | | | | | | | | | Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcallocMariusz Kozlowski2007-08-011-2/+1
| | | | | | | | | | Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] remove redundant/dead code from physmap_of.cMariusz Kozlowski2007-08-011-5/+0
| | | | | | | | | | | | | | | | This patch removes redundant memset() and dead return line from of_physmap_probe(). No functional change. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [NAND] fix race in nand_base.cArtem Bityutskiy2007-07-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When we mark block bad we have to get chip because this involves writing to the page's OOB. We hit this bug in UBI - we observed random obscure crashes when it marks block bad from the background thread and there is some parallel task which utilizes flash. This patch also adds a TODO note about BBT table protection which it seems does not exist. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Fix do_div() type warning in mtdconcatDavid Woodhouse2007-07-231-1/+1
| | | | | | | | | | | | It expects a uint64_t; give it one. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Remove useless references to MIPS_HYDROGEN3 and MIPS_MIRAGE_WHY.Robert P. J. Day2007-07-231-14/+0
| | | | | | | | | | | | Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function.Roland Stigge2007-07-231-5/+5
| | | | | | | | | | | | | | | | | | The patch ensures that the current code (kernel 2.6.22) uses the bits like the code prior to the refactoring. The variable "bits" is employed in a useful way now. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Remove embedded return in RFD FTL.akpm@linux-foundation.org2007-07-231-5/+3
| | | | | | | | | | | | | | embedded returns are evil. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Fix potential leak in rfd_ftl_add_mtdFlorin Malita2007-07-231-0/+1
| | | | | | | | | | | | | | This fixes a leak in the !mtd->erasesize error path (Coverity 1765). Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] Clean up duplicate includes in drivers/mtd/Jesper Juhl2007-07-232-2/+0
| | | | | | | | | | | | | | | | This patch cleans up duplicate includes in drivers/mtd/ Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [NAND] Add NAND manufacturer AMD.Steven J. Hill2007-07-231-0/+1
| | | | | | | | | | | | | | This patch adds the manufacturer ID for AMD flash. Signed-off-by: Steven J. Hill <sjhill1@rockwellcollins.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Merge branch 'master' of ↵David Woodhouse2007-07-2317-339/+373
|\ \ | |/ | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * mm: Remove slab destructors from kmem_cache_create().Paul Mundt2007-07-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * UBI: fix compile warningPaul Mundt2007-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | cdev.c whines in current git: drivers/mtd/ubi/cdev.c: In function `major_to_device': drivers/mtd/ubi/cdev.c:67: warning: control reaches end of non-void function Shut it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix error handling in erase workerArtem Bityutskiy2007-07-181-41/+48
| | | | | | | | | | | | | | | | | | Do not switch to read-only mode in case of -EINTR and some other obvious cases. Switch to RO mode only when we do not know what is the error. Reported-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix commentsArtem Bityutskiy2007-07-181-3/+3
| | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: remove unneeded error checksArtem Bityutskiy2007-07-182-13/+2
| | | | | | | | | | | | Pointed to by viro. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: cleanup usage of try_module_getFernando Luis Vázquez Cao2007-07-181-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | The use of try_module_get(THIS_MODULE) in ubi_get_device_info does not offer real protection against unexpected driver unloads, since we could be preempted before try_modules_get gets executed. It is the caller who should manipulate the refcounts. Besides, ubi_get_device_info is an exported symbol which guarantees protection when accessed through symbol_get. Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix overflow bugVinit Agnihotri2007-07-182-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was experiencing overflows in multiplications for volume->used_bytes in vmt.c & vtbl.c, while creating & resizing large volumes. vol->used_bytes is long long however its 2 operands vol->used_ebs & vol->usable_leb_size are int. So their multiplication for larger values causes integer overflows. Typecasting them solves the problem. My machine & flash details: 64Bit dual-core AMD opteron, 1 GB RAM, linux 2.6.18.3. mtd size = 6GB, volume size= 5GB, peb_size = 4MB. heres patch which does the fix. Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in max_sqnum calculationArtem Bityutskiy2007-07-181-1/+0
| | | | | | | | | | | | Do not zero max_sqnum after a new volume has been found. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in sqnum calculationBrijesh Singh2007-07-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Hi,I came across problem of having two leb with same sequence no.This happens when we continuously write one block again and again and reboot machine before background thread erases those blocks. The problem here was,when we find two blocks with same sequence no,we take the higher one,but we were not updating max seq no,so next block may have the same seqnum. This patch solves this problem. Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix signed-unsigned multiplicationBrijesh Singh2007-07-181-1/+1
| | | | | | | | | | | | | | | | | | There is signed multiplication assigned to unsigned ei.addr in io.c. This causes wrong addresses for big multiplication.This patch solves the problem. Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix bug in atomic_leb_change()Artem Bityutskiy2007-07-181-1/+1
| | | | | | | | | | | | | | atomic_leb_change() is only allowed for dynamic volumes, so set the volume type correctly. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix messageVinit Agnihotri2007-07-181-2/+1
| | | | | | | | | | | | | | Increase UBI devices couter after the message, not before. Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix debugging stuffArtem Bityutskiy2007-07-181-4/+16
| | | | | | | | | | | | | | Do not check volumes which are currently in use because thay may be in inconsistent state. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in error pathArtem Bityutskiy2007-07-184-10/+7
| | | | | | | | | | | | | | | | | | When volume creation fails, we have to set ubi->volumes[vol_id] back to NULL. This patch also tweaks some debugging stuff. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: use is_power_of_2()Vignesh Babu2007-07-181-2/+2
| | | | | | | | | | | | | | | | Replacing (n & (n-1)) in the context of power of 2 checks with is_power_of_2 Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix freeing ubi->vtbl while unloadingVinit Agnihotri2007-07-181-2/+2
| | | | | | | | | | | | | | | | ubi->vtbl is allocated using vmalloc() in vtbl.c empty_create_lvol(), but it is freed in build.c with kfree() Signed-off-by: Vinit Agnihotri <vinit.agnihotri@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix in ubi_leb_change()Artem Bityutskiy2007-07-181-5/+7
| | | | | | | | | | | | | | Do not call 'ubi_wl_put_peb()' if the LEB was unmapped. Reported-by: Gabor Loki <loki@inf.u-szeged.hu> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: kill homegrown endian macrosChristoph Hellwig2007-07-187-132/+132
| | | | | | | | | | | | | | | | Kill UBI's homegrown endianess handling and replace it with the standard kernel endianess handling. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: cleanup ioctl handlingChristoph Hellwig2007-07-181-28/+5
| | | | | | | | | | | | | | | | - don't do access_ok + get/put user but use the proper macro - remove useless checks Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: error path bugfixArtem Bityutskiy2007-07-181-1/+0
| | | | | | | | | | | | No need to unlock the lock, this will be done at out_unlock. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
OpenPOWER on IntegriCloud