summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.infradead.org/mtd-2.6Linus Torvalds2009-04-0678-996/+4080
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: (53 commits) [MTD] struct device - replace bus_id with dev_name(), dev_set_name() [MTD] [NOR] Fixup for Numonyx M29W128 chips [MTD] mtdpart: Make ecc_stats more realistic. powerpc/85xx: TQM8548: Update DTS file for multi-chip support powerpc: NAND: FSL UPM: document new bindings [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delays [MTD] [NAND] FSL-UPM: add multi chip support [MTD] [NOR] Add device parent info to physmap_of [MTD] [NAND] Add support for NAND on the Socrates board [MTD] [NAND] Add support for 4KiB pages. [MTD] sysfs support should not depend on CONFIG_PROC_FS [MTD] [NAND] Add parent info for CAFÉ controller [MTD] support driver model updates [MTD] driver model updates (part 2) [MTD] driver model updates [MTD] [NAND] move gen_nand's probe function to .devinit.text [MTD] [MAPS] move sa1100 flash's probe function to .devinit.text [MTD] fix use after free in register_mtd_blktrans [MTD] [MAPS] Drop now unused sharpsl-flash map [MTD] ofpart: Check name property to determine partition nodes. ... Manually fix trivial conflict in drivers/mtd/maps/Makefile
| * [MTD] struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2009-04-061-1/+1
| | | | | | | | | | | | Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NOR] Fixup for Numonyx M29W128 chipsDarius Augulis2009-04-061-0/+11
| | | | | | | | | | | | | | | | Prevent NUMONYX M29W128G memories from using write buffer, because it doesn't work properly. Signed-off-by: Darius Augulis <augulis.darius@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] mtdpart: Make ecc_stats more realistic.Yauhen Kharuzhy2009-04-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | In the existing implementation, ecc_stats fields are incremented only by one, regardless of master mtd errors number. For example, if there are N errors were corrected by ECC, partition ecc_stats.corrected will be incremented by one. This commit changes simple increment to sum of old value and parent mtd error count. Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * powerpc/85xx: TQM8548: Update DTS file for multi-chip supportWolfgang Grandegger2009-04-062-4/+10
| | | | | | | | | | | | | | | | This patch adds multi-chip support for the Micron MT29F8G08FAB NAND flash memory on the TQM8548 modules. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * powerpc: NAND: FSL UPM: document new bindingsWolfgang Grandegger2009-04-061-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds documentation for the new NAND FSL UPM bindings for: NAND: FSL-UPM: add multi chip support NAND: FSL-UPM: Add wait flags to support board/chip specific delays It also documents the old binding for "chip-delay". Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delaysWolfgang Grandegger2009-04-061-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The NAND flash on the TQM8548_BE modules requires a short delay after running the UPM pattern. The TQM8548_BE requires a further short delay after writing out a buffer. Normally the R/B pin should be checked, but it's not connected on the TQM8548_BE. The existing driver uses similar fixed delay points. To manage these extra delays in a more general way, I introduced the "fsl,ump-wait-flags" property allowing the board- specific driver to specify various types of extra delay. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] FSL-UPM: add multi chip supportWolfgang Grandegger2009-04-062-24/+77
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for multi-chip NAND devices to the FSL-UPM driver. This requires support for multiple GPIOs for the RNB pins. The NAND chips are selected through address lines defined by the FDT property "fsl,upm-addr-line-cs-offsets". Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NOR] Add device parent info to physmap_ofDavid Woodhouse2009-04-061-0/+1
| | | | | | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] Add support for NAND on the Socrates boardWolfgang Grandegger2009-04-063-0/+332
| | | | | | | | | | | | Signed-off-by: Ilya Yanok <yanok@emcraft.com> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] Add support for 4KiB pages.Thomas Gleixner2009-04-062-2/+20
| | | | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] sysfs support should not depend on CONFIG_PROC_FSKevin Cernekee2009-04-041-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Move the driver model init code out of the "#ifdef CONFIG_PROC_FS" block. Tested with both values of CONFIG_PROC_FS . Tested with CONFIG_MTD=m . Issue was reported here: http://lkml.org/lkml/2009/4/4/107 Signed-off-by: Kevin Cernekee <kpc.mtd@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] Add parent info for CAFÉ controllerDavid Woodhouse2009-04-041-0/+1
| | | | | | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] support driver model updatesDavid Brownell2009-04-048-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Follow-on patch to the previous driver model patch for the MTD framework. This one makes various MTD drivers connect to the driver model tree, so /sys/devices/virtual/mtd/* nodes are no longer present ... mostly drivers used on boards I have handy. Based on a patch from Kay Sievers. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] driver model updates (part 2)Kevin Cernekee2009-04-041-21/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Add more sysfs attributes: flags, size, erasesize, writesize, oobsize, numeraseregions, name 2) Move core_initcall() code into init_mtd(). The original approach does not work if CONFIG_MTD=m . 3) Add device_unregister() in del_mtd_device() so that devices get removed from sysfs as each driver is unloaded. Signed-off-by: Kevin Cernekee <kpc.mtd@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] driver model updatesDavid Brownell2009-04-045-42/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update driver model support in the MTD framework, so it fits better into the current udev-based hotplug framework: - Each mtd_info now has a device node. MTD drivers should set the dev.parent field to point to the physical device, before setting up partitions or otherwise declaring MTDs. - Those device nodes always map to /sys/class/mtdX device nodes, which no longer depend on MTD_CHARDEV. - Those mtdX sysfs nodes have a "starter set" of attributes; it's not yet sufficient to replace /proc/mtd. - Enabling MTD_CHARDEV provides /sys/class/mtdXro/ nodes and the /sys/class/mtd*/dev attributes (for udev, mdev, etc). - Include a MODULE_ALIAS_CHARDEV_MAJOR macro. It'll work with udev creating the /dev/mtd* nodes, not just a static rootfs. So the sysfs structure is pretty much what you'd expect, except that readonly chardev nodes are a bit quirky. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] move gen_nand's probe function to .devinit.textUwe Kleine-König2009-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A pointer to plat_nand_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Hamish Moffatt <hamish@cloud.net.au> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Vitaly Wool <vitalywool@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [MAPS] move sa1100 flash's probe function to .devinit.textUwe Kleine-König2009-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A pointer to sa1100_mtd_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Nicolas Pitre <nico@marvell.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] fix use after free in register_mtd_blktransMarcin Slusarz2009-04-031-1/+2
| | | | | | | | | | | | | | Reported-by: Dan Carpenter <error27@gmail.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [MAPS] Drop now unused sharpsl-flash mapDmitry Eremin-Solenikov2009-03-253-123/+0
| | | | | | | | | | | | | | | | Now as all PXA Zaurii are converted to use the physmap map, drop the sharpsl-flash map completely. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] ofpart: Check name property to determine partition nodes.Benjamin Krill2009-03-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | SLOF has a further node which could not be evaluated by the current routine. The current routine returns because the node hasn't the required reg property. As fix this patch adds a check to determine the partition child nodes. If the node is not a partition the number of total partitions will be decreased and loop continues with the next nodes. Signed-off-by: Benjamin Krill <ben@codiert.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] sh_flctl: fix hardware ecc handling for 2048 byte pageYoshihiro Shimoda2009-03-241-6/+12
| | | | | | | | | | | | Signed-off-by: Jeremy Baker <Jeremy.Baker@renesas.com> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] Fix a bad dependency in the Blackfin codeBernd Schmidt2009-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | Fix a bad dependency in the Blackfin code on a RomFS config symbol that doesn't exist upstream. Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * NOMMU: Fix the RomFS Kconfig to ensure at least one backing store is selectedDavid Howells2009-03-241-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | Fix the configuration of the RomFS to make sure that at least one backing store method is always selected. This is done by rendering it down to a choice item that selects between Block, MTD and both. This also works correctly in the case that CONFIG_MTD=m: MTD cannot be selected as a backing store unless CONFIG_ROMFS_FS is also 'm'. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * NOMMU: Make it possible for RomFS to use MTD devices directlyDavid Howells2009-03-247-667/+1062
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change RomFS so that it can use MTD devices directly - without the intercession of the block layer - as well as using block devices. This permits RomFS: (1) to use the MTD direct mapping facility available under NOMMU conditions if the underlying device is directly accessible by the CPU (including XIP); (2) and thus to be used when the block layer is disabled. RomFS can be configured with support just for MTD devices, just for Block devices or for both. If RomFS is configured for both, then it will treat mtdblock device files as MTD backing stores, not block layer backing stores. I tested this using a CONFIG_MMU=n CONFIG_BLOCK=n kernel running on my FRV board with a RomFS image installed on the mtdram test device. I see my test program being run XIP: # cat /proc/maps ... c0c000b0-c0c01f8c r-xs 00000000 1f:00 144 /mnt/doshm ... GDB on the kernel can be used to show that these addresses are within the set-aside RAM space. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * NOMMU: Add support for direct mapping through mtdconcat if possibleDavid Howells2009-03-241-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for direct mapping through mtdconcat, if possible, by attaching the samebacking_dev_info structure to the master. It has some restrictions: (1) It won't permit direct mapping of concatenated devices that have differing BDIs. (2) It doesn't support maps that span the 'gap' between devices, although it possibly could if the devices spanned across return compatible (ie. contiguous) addresses from their get_unmapped_area() ops. Signed-off-by: Gavin Lambert <gavinl@compacsort.com> Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * NOMMU: Present backing device capabilities for MTD chardevsDavid Howells2009-03-2410-2/+215
| | | | | | | | | | | | | | | | | | Present backing device capabilities for MTD character device files to allow NOMMU mmap to do direct mapping where possible. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [OneNAND] Add write-while-program supportKyungmin Park2009-03-231-49/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | OneNAND write-while-program method of writing improves performance, compared with ordinary writes, by transferring data to OneNAND's RAM buffers atthe same time as programming the NAND core. When writing several NAND pages at a time, an improvement of 12% to 25% is seen. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [OneNAND] omap2: panic_write may be in an interrupt contextAdrian Hunter2009-03-231-0/+4
| | | | | | | | | | | | | | panic_write may read in an interrupt context. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] mtdpart: Make all partition parsers return allocated arrayAtsushi Nemoto2009-03-202-3/+9
| | | | | | | | | | | | | | | | | | | | | | Currently redboot and afx parser return allocated mtd_partition array and cmdlinepart and ar7 return persistent array. This patch make cmdlinepart and ar7 also return allocated array, so that all users can free it regardless of parser type. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [CHIPS] Add JEDEC probe support for the SST 39VF3201 flash chipYegor Yefremov2009-03-201-0/+16
| | | | | | | | | | | | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] mtdoops: fix a bit of spin lock usageAdrian Hunter2009-03-201-1/+4
| | | | | | | | | | | | | | | | | | - do not leave spin lock locked - initialise spin lock Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] mtdoops: allow MTD selection by nameAdrian Hunter2009-03-201-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MTD's have both an index number and a name. Formerly, the MTD selected for mtdoops was done only by index number. With this patch, a name can be used instead. For example, the kernel command line: console=ttyMTD5 selects MTD 5 for mtdoops. But now this is also possible: console=ttyMTD,log which selects the MTD named "log" for mtdoops. This has the advantage that partitions can be added or removed that would affect the MTD index number but not the name, without having to then change the kernel command line. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] pxa3xx_nand: add ability to keep controller settings defined by ↵Mike Rapoport2009-03-202-1/+105
| | | | | | | | | | | | | | | | OBM/bootloader Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] pxa3xx_nand: allow building as moduleMike Rapoport2009-03-202-1/+11
| | | | | | | | | | Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] pxa3xx_nand: use resource_size instead of 'r->end - r->start + 1'Mike Rapoport2009-03-201-3/+3
| | | | | | | | | | Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] Auto-load nftl module when device opened.Scott James Remnant2009-03-201-0/+2
| | | | | | | | | | | | | | | | | | | | The nftl module is missing the block-major-93-* alias that would cause it to be auto-loaded when a nftl of that type is opened. This patch adds the alias. Signed-off-by: Scott James Remnant <scott@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] Auto-load mtdchar module when device opened.Scott James Remnant2009-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | The mtdchar module is missing the char-major-90-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alia.. Signed-off-by: Scott James Remnant <scott@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [CHIPS] cfi_cmdset_0001.c: Fix a bug in ↵Graff Yang2009-03-201-2/+6
| | | | | | | | | | | | | | | | | | | | | | inval_cache_and_wait_for_operation(). If the inval_cache_and_wait_for_operation() is re-entered by write operation when erase operation is in progress, the chip->erase_suspended will be cleared, this cause the erase timeo is not reset and will result time out error for erase. Signed-off-by: Graff Yang <graff.yang@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] RBTX4939 map driverAtsushi Nemoto2009-03-203-0/+215
| | | | | | | | | | | | | | | | | | This is a map driver for NOR flash chips on RBTX4939 board. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Ralf Bächle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] TXx9 SoC NAND Flash Memory Controller driverAtsushi Nemoto2009-03-203-0/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the integrated NAND flash controller of the TXx9 family. Once upon a time there were tx4925ndfmc and tx4938ndfmc driver. They were removed due to bitrot in 2005. This new driver is completely rewritten based on a driver in CELF patch archive. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Ralf Bächle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] RBTX4939: add MTD supportAtsushi Nemoto2009-03-202-0/+166
| | | | | | | | | | | | | | | | | | | | | | Add platform support for NOR flash chips on RBTX4939 board. This board has complex flash mappings, controlled by its DIPSW setting. [akpm@linux-foundation.org: Use min_t] Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Ralf Bächle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] TXx9: add NDFMC supportAtsushi Nemoto2009-03-208-0/+98
| | | | | | | | | | | | | | | | | | Add platform support for NAND Flash Memory Controller of TXx9 SoCs. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-By: Ralf Bächle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [JFFS2] jffs2_acl_count() tests < 0 on unsignedRoel Kluin2009-03-201-2/+2
| | | | | | | | | | | | | | | | size_t s is unsigned and cannot be less than 0. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] partitioning utility predicatesDavid Brownell2009-03-204-34/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move mtd_has_partitions() and mtd_has_cmdlinepart() inlines from a DaVinci-specific driver to the <linux/mtd/partitions.h> header. Use those to eliminate #ifdefs in two drivers which had their own definitions of mtd_has_partitions(). Quite a lot of other MTD drivers could benefit from using use one or both of these to remove #ifdeffery. Maybe some Janitors would like to help. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] we don't need no misc devicesDavid Brownell2009-03-206-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove <linux/miscdevice.h> from various drivers which don't actually use any of its contents. There are still a number of these left in arch-specific bits of the tree. (Found by diffing results of "grep -rl" for linux/miscdevice.h and for misc_register, examining the differences, and verifying removals with a build test.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] davinci: drop usage of cpu_is_* macroKevin Hilman2009-03-201-3/+0
| | | | | | | | | | | | | | | | | | | | Usage of davinci-specific cpu_is macros is not allowed in drivers. These options should be passed in through platform_data. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] fix broken debug messagesDavid Brownell2009-03-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix incorrect debug messages (*write* not read); someone committed some cut'n'paste bugs.  There might be more, I only noticed these since I was looking for nand_read usage and landed in some very wrong functions. IMO all MTD debugging message framework is goofed, anyway. It uses "DEBUG" in a way that's incompatible with usage most everywhere else in the kernel, and which prevents normal pr_dbg() and dev_dbg() calls from working right. [True. It predates those by a long way, and should probably be updated to use them. dwmw2] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] davinci_nand driverDavid Brownell2009-03-204-0/+672
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a device driver for the NAND flash controller found on the various DaVinci family chips. It handles up to four SoC chipselects, and some flavors of secondary chipselect (e.g. based on upper bits of the address bus) as used with some multichip packages. (Including the 2 GiB chips used on some TI devel boards.) The 1-bit ECC hardware is supported (3 bytes ECC per 512 bytes data); but not yet the newer 4-bit ECC (10 bytes ECC per 512 bytes data), as available on chips like the DM355 or OMAP-L137 and needed with the more error-prone MLC NAND chips. This is a cleaned-up version of code that's been in use for several years now; sanity checked with the new drivers/mtd/tests. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] fix "raw" reads with ECC syndrome layoutsDavid Brownell2009-03-201-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The syndrome based page read/write routines store ECC, and possibly other "OOB" data, right after each chunk of ECC'd data. With ECC chunk size of 512 bytes and a large page (2KiB) NAND, the layout is: data-0 OOB-0 data-1 OOB-1 data-2 OOB-2 data-3 OOB-3 OOB-leftover Where OOBx is (prepad, ECC, postpad). However, the current "raw" routines use a traditional layout -- data OOB, disregarding the prepad and postpad values -- so when they're used with that type of ECC hardware, those calls mix up the data and OOB. Which means, in particular, that bad block tables won't be found on startup, with data corruption and related chaos ensuing. The current syndrome-based drivers in mainline all seem to use one chunk per page; presumably they haven't noticed such bugs. Fix this, by adding read/write page_raw_syndrome() routines as siblings of the existing non-raw routines; "raw" just means to bypass the ECC computations, not change data and OOB layout. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
OpenPOWER on IntegriCloud