summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeFilesLines
* driver-core: Add attribute argument to class_attribute show/storeAndi Kleen2010-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | Passing the attribute to the low level IO functions allows all kinds of cleanups, by sharing low level IO code without requiring an own function for every piece of data. Also drivers can extend the attributes with own data fields and use that in the low level function. This makes the class attributes the same as sysdev_class attributes and plain attributes. This will allow further cleanups in drivers. Full tree sweep converting all users. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge git://git.infradead.org/ubi-2.6Linus Torvalds2010-03-065-87/+198
|\ | | | | | | | | | | | | | | | | * git://git.infradead.org/ubi-2.6: UBI: add write checking UBI: simplify debugging return codes UBI: fix attaching error path UBI: support attaching by MTD character device name UBI: mark few variables as __initdata
| * UBI: add write checkingArtem Bityutskiy2010-02-012-0/+74
| | | | | | | | | | | | | | | | | | | | Add an extra debugging check function which validates writes. After every write it reads the data back, compares it with the original data, and complains if they mismatch. Useful for debugging. No-op if extra debugging checks are disabled. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: simplify debugging return codesArtem Bityutskiy2010-02-013-41/+37
| | | | | | | | | | | | | | | | | | | | | | UBI debugging functions were a little bit over-engineered and returned more error codes than needed, and the callers had to do useless checks. Simplify the return codes. Impact: only debugging code is affected, which means that for non-developers this is a no-op patch. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix attaching error pathArtem Bityutskiy2010-02-011-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the error path of 'ubi_attach_mtd_dev()' we have a tricky situation: we have to release things differently depending on at which point the failure happening. Namely, if @ubi->dev is not initialized, we have to free everything ourselves. But if it was, we should not free the @ubi object, because it will be freed in the 'dev_release()' function. And we did not get this situation right. This patch introduces additional argument to the 'uif_init()' function. On exit, this argument indicates whether the final 'free(ubi)' will happen in 'dev_release()' or not. So the caller always knows how to properly release the resources. Impact: all memory is now correctly released when UBI fails to attach an MTD device. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: support attaching by MTD character device nameArtem Bityutskiy2010-02-011-11/+55
| | | | | | | | | | | | | | | | | | | | | | This patch adds a capability to attach MTD devices by their character device paths. For example, one can do: $ modprobe ubi mtd=/dev/mtd0 to attach /dev/mtd0. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: mark few variables as __initdataArtem Bityutskiy2010-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The @mtd_devs and @mtd_dev_param variables are used only during the initialization, and all functions that use the variables have the __init prefix. This means we can safely mark the variables as __initdata, which is a tiny optimization. Impact: tiny RAM consumption optimization when UBI is used as a kernel module. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* | Merge with mainline to remove plat-omap/Kconfig conflictTony Lindgren2010-03-016-196/+54
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/plat-omap/Kconfig
| * | MIPS: Alchemy: physmap-flash for all devboardsManuel Lauss2010-02-273-173/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the devboard NOR MTD mapping driver with physmap-flash support. Also honor the "swapboot" switch settings wrt. to the layout of the NOR partitions. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Cc: Linux-MIPS <linux-mips@linux-mips.org> Acked-By: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | MIPS: Alchemy: devboard register abstractionManuel Lauss2010-02-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All Alchemy development boards have external CPLDs with a few registers in them. They all share an identical register layout with only a few minor differences (except the PB1000) in bit functions and base addresses. This patch - adds a primitive facility to initialize and use these external registers, - replaces all occurrences of bcsr->xxx accesses with calls to the new functions (the pb1200 cascade irq handling code is special). - collects BCSR register information scattered throughout the board headers in a central place. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | mtd: sh_flctl SHBUSSEL and SEL_16BIT supportMagnus Damm2010-02-021-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends the sh_flctl driver with support for 16-bit bus configuration using SEL_16BIT and support for multiplexed pins using SHBUSSEL. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | mtd: trivial sh_flctl changesMagnus Damm2010-02-022-21/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | This patch contains a few changes for the sh_flctl driver: - not sh7723-only driver - get rid of kconfig dependency - use dev_err() instead of printk() - use __devinit and __devexit for probe()/remove() - fix probe() return values Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | omap2/3/4: Introducing 'gpmc-nand.c' for GPMC specific NAND initVimal Singh2010-02-151-31/+4
| | | | | | | | | | | | | | | | | | | | Introducing 'gpmc-nand.c' for GPMC specific NAND init. For example: GPMC timing parameters and all. This patch also migrates gpmc related calls from 'nand/omap2.c' to 'gpmc-nand.c'. Signed-off-by: Vimal Singh <vimalsingh@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* | MTD: remove no longer used OMAP flash mapLadislav Michl2010-02-153-198/+0
|/ | | | | | | | All OMAP boards are now using physmap-flash. Cc: linux-mtd@lists.infradead.org Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
* Merge branch 'for-linus' of git://git.infradead.org/ubi-2.6Linus Torvalds2010-01-281-1/+0
|\ | | | | | | | | * 'for-linus' of git://git.infradead.org/ubi-2.6: UBI: fix volume creation input checking
| * UBI: fix volume creation input checkingMika Westerberg2010-01-271-1/+0
| | | | | | | | | | | | | | | | Do not use an unchecked variable UBI_IOCMKVOL ioctl. Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Cc: stable@vger.kernel.org
* | Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6Linus Torvalds2010-01-253-8/+9
|\ \ | | | | | | | | | | | | | | | | | | * 'linux-next' of git://git.infradead.org/ubi-2.6: UBI: fix memory leak in update path UBI: add more checks to chdev open UBI: initialise update marker
| * | UBI: fix memory leak in update pathArtem Bityutskiy2010-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When truncating an UBI volume, UBI should allocates a PEB-sized buffer but does not release it, which leads to memory leaks. This patch fixes the issue. Reported-by: Marek Skuczynski <mareksk7@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Tested-by: Marek Skuczynski <mareksk7@gmail.com> Cc: stable@kernel.org
| * | UBI: add more checks to chdev openArtem Bityutskiy2010-01-121-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | When opening UBI volumes by their character device names, make sure we are opening character devices, not block devices or any other inode type. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | UBI: initialise update markerPeter Horton2010-01-121-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | The in kernel copy of a volume's update marker is not initialised from the volume table. This means that volumes where an update was unfinnished will not be treated as "forbidden to use". This is basically that the update functionality was broken. Signed-off-by: Peter Horton <zero@colonel-panic.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Cc: stable@kernel.org
* | Merge git://git.infradead.org/~dwmw2/mtd-2.6.33Linus Torvalds2010-01-246-4/+354
|\ \ | |/ |/| | | | | | | | | * git://git.infradead.org/~dwmw2/mtd-2.6.33: mtd: tests: fix read, speed and stress tests on NOR flash mtd: Really add ARM pismo support kmsg_dump: Dump on crash_kexec as well
| * mtd: tests: fix read, speed and stress tests on NOR flashMorten Thunberg Svendsen2010-01-133-3/+16
| | | | | | | | | | | | | | | | | | | | Before using block_isbad() check if mtd->block_isbad() is defined. Calculating pgcnt must be done using pgsize defined to 512 on NOR and mtd->writesize for NAND, not using mtd->writesize directly. Signed-off-by: Morten Thunberg Svendsen <mts.doredevelopment@gmail.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: Really add ARM pismo supportRussell King - ARM Linux2010-01-132-0/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Commit 7cb777a3d71f9d1f7eb149c7a504d21f24219ae8 (mtd: add ARM pismo support) intended to add this, but seems only to have patched the Makefile without touching Kconfig or providing any code...) The following patch adds support for PISMO modules found on ARM Ltd development platforms. These are MTD modules, and can have a selection of SRAM, flash or DOC devices as described by an on-board I2C EEPROM. We support SRAM and NOR flash devices only by registering appropriate conventional MTD platform devices as children of the 'pismo' device. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * kmsg_dump: Dump on crash_kexec as wellKOSAKI Motohiro2009-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crash_kexec gets called before kmsg_dump(KMSG_DUMP_OOPS) if panic_on_oops is set, so the kernel log buffer is not stored for this case. This patch adds a KMSG_DUMP_KEXEC dump type which gets called when crash_kexec() is invoked. To avoid getting double dumps, the old KMSG_DUMP_PANIC is moved below crash_kexec(). The mtdoops driver is modified to handle KMSG_DUMP_KEXEC in the same way as a panic. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds2009-12-173-257/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (71 commits) MIPS: Lasat: Fix botched changes to sysctl code. RTC: rtc-cmos.c: Fix warning on MIPS MIPS: Cleanup random differences beween lmo and Linus' kernel. MIPS: No longer hardwire CONFIG_EMBEDDED to y MIPS: Fix and enhance built-in kernel command line MIPS: eXcite: Remove platform. MIPS: Loongson: Cleanups of serial port support MIPS: Lemote 2F: Suspend CS5536 MFGPT Timer MIPS: Excite: move iodev_remove to .devexit.text MIPS: Lasat: Convert to proc_fops / seq_file MIPS: Cleanup signal code initialization MIPS: Modularize COP2 handling MIPS: Move EARLY_PRINTK to Kconfig.debug MIPS: Yeeloong 2F: Cleanup reset logic using the new ec_write function MIPS: Yeeloong 2F: Add LID open event as the wakeup event MIPS: Yeeloong 2F: Add basic EC operations MIPS: Move several variables from .bss to .init.data MIPS: Tracing: Make function graph tracer work with -mmcount-ra-address MIPS: Tracing: Reserve $12(t0) for mcount-ra-address of gcc 4.5 MIPS: Tracing: Make ftrace for MIPS work without -fno-omit-frame-pointer ...
| * | MIPS: eXcite: Remove platform.Ralf Baechle2009-12-173-257/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The platform has never been fully merged Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: Thomas Koeller <thomas.koeller@baslerweb.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: linux-kernel@vger.kernel.org Cc: linux-mtd@lists.infradead.org Acked-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Wim Van Sebroeck <wim@iguana.be>
* | Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2009-12-171-2/+11
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: PCMCIA: fix pxa2xx_lubbock modular build error [ARM] Update mach-types [ARM] pxa: fix no reference of cpu_is_pxa25x() in devices.c [ARM] pxa/cm-x300: add PWM backlight support revert "[ARM] pxa/cm-x300: add PWM backlight support" ARM: use flush_kernel_dcache_area() for dmabounce ARM: add size argument to __cpuc_flush_dcache_page ARM: 5848/1: kill flush_ioremap_region() ARM: cache-l2x0: make better use of background cache handling ARM: cache-l2x0: avoid taking spinlock for every iteration [ARM] Kirkwood: Add LaCie Network Space v2 support ARM: dove: fix the mm mmu flags of the pj4 procinfo
| * Merge branch 'cache' (early part)Russell King2009-12-171-2/+11
| |\
| | * ARM: 5848/1: kill flush_ioremap_region()Nicolas Pitre2009-12-141-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is not enough users to warrant its existence, and it is actually an obstacle to progress with the new DMA API which cannot cover this case properly. To keep backward compatibility, let's perform the necessary custom cache maintenance locally in the only driver affected. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | Merge git://git.infradead.org/mtd-2.6Linus Torvalds2009-12-1641-1595/+3040
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: (90 commits) jffs2: Fix long-standing bug with symlink garbage collection. mtd: OneNAND: Fix test of unsigned in onenand_otp_walk() mtd: cfi_cmdset_0002, fix lock imbalance Revert "mtd: move mxcnd_remove to .exit.text" mtd: m25p80: add support for Macronix MX25L4005A kmsg_dump: fix build for CONFIG_PRINTK=n mtd: nandsim: add support for 4KiB pages mtd: mtdoops: refactor as a kmsg_dumper mtd: mtdoops: make record size configurable mtd: mtdoops: limit the maximum mtd partition size mtd: mtdoops: keep track of used/unused pages in an array mtd: mtdoops: several minor cleanups core: Add kernel message dumper to call on oopses and panics mtd: add ARM pismo support mtd: pxa3xx_nand: Fix PIO data transfer mtd: nand: fix multi-chip suspend problem mtd: add support for switching old SST chips into QRY mode mtd: fix M29W800D dev_id and uaddr mtd: don't use PF_MEMALLOC mtd: Add bad block table overrides to Davinci NAND driver ... Fixed up conflicts (mostly trivial) in drivers/mtd/devices/m25p80.c drivers/mtd/maps/pcmciamtd.c drivers/mtd/nand/pxa3xx_nand.c kernel/printk.c
| * | mtd: OneNAND: Fix test of unsigned in onenand_otp_walk()Roel Kluin2009-12-161-2/+2
| | | | | | | | | | | | | | | | | | | | | mtd->writesize and len are unsigned so the test does not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * | mtd: cfi_cmdset_0002, fix lock imbalanceJiri Slaby2009-12-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stanse found a double unlock in get_chip. get_chip is called with chip->mutex held and caller is responsible for unlocking it too. Do not unlock the lock in get_chip on a fail path. This would mean a double unlock. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * | Revert "mtd: move mxcnd_remove to .exit.text"Uwe Kleine-König2009-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 82613b0da622efbd24cb7b23eb349966802310f1, because commit daa0f15 (mtd: don't use __exit_p to wrap mxcnd_remove) is a better solution. Not having a remove callback breaks rebinding because resources are not freed on remove. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * | mtd: m25p80: add support for Macronix MX25L4005ASimon Guinot2009-12-051-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Simon Guinot <sguinot@lacie.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * | mtd: nandsim: add support for 4KiB pagesSebastian Andrzej Siewior2009-12-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was going to play with a faulty nand image from real flash and noticed that nandsim does not work with: first_id_byte=0xec second_id_byte=0xd5 third_id_byte=0x51 fourth_id_byte=0xa6 This patch seems to fix it. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * | Merge branch 'mxc-nand' of git://git.pengutronix.de/git/imx/linux-2.6David Woodhouse2009-11-301-475/+298
| |\ \
| | * | mxc_nand: use DRIVER_NAME where appropriateSascha Hauer2009-11-121-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc_nand: remove TROP_US_DELAYSascha Hauer2009-11-121-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | wait_op_done is only called with the same timeout, so code the timeout into the function itself. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc_nand: Allow flash based bbtSascha Hauer2009-11-121-0/+34
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc_nand: disable sp_en bit only onceSascha Hauer2009-11-121-12/+3
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc_nand: Add NFC V2 supportSascha Hauer2009-11-121-13/+68
| | | | | | | | | | | | | | | | | | | | | | | | The v2 version of this controller is used on i.MX35/25 SoCs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc_nand: Get rid of pagesize_2k flagSascha Hauer2009-11-121-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Later versions of this controller also allow 4k pagesize, so use mtd->writesize instead of a flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc_nand: Make main/spare areas runtime configurableSascha Hauer2009-11-121-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The main/spare areas are on different addresses on later versions of the controller, so make them configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc_nand: remove unused definesSascha Hauer2009-11-121-7/+0
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc nand: modify send_page to send all pages, not only oneSascha Hauer2009-11-121-25/+20
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc nand: simplify command processingSascha Hauer2009-11-121-46/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having two switch/case with other operations in between, use only one switch/case Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc nand: use buffersSascha Hauer2009-11-121-233/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NAND controller has some limitations how to access the internal buffers. It only allows 32 bit accesses. The driver used to work around this by having special alignment aware copy routines. We now copy the whole page to a buffer in memory and let the access functions use this buffer. This simplifies the driver. A bonnie++ test showed that this has no negative performance impact on the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc nand: use resource_size()Sascha Hauer2009-11-121-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc nand: remove dead codeSascha Hauer2009-11-121-17/+0
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | mxc nand: remove debug paramSascha Hauer2009-11-121-8/+8
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
OpenPOWER on IntegriCloud