aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2008-04-22[MTD] [NAND] S3C2410 Allow unset ecc to be ignored for ecc correctionBen Dooks
If a block's ecc field is all 0xff, then ignore the ECC correction. This is for systems where some of the blocks, such as the initial cramfs are written without ECC and need to be loaded on start. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] S3C2410 Large page NAND supportBen Dooks
This adds support for using large page NAND devices with the S3C24XX NAND controller. This also adds the file Documentation/arm/Samsung-S3C24XX/NAND.txt to describe the differences. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] S3C2410 Fix previous nFCE suspend save patchBen Dooks
Commit 03680b1e00d146df718c8a4eac34438566b70c85 incorrectly was assuming S3C2410_NFCONF was being used to select the NAND chip. Fix this error by ising the sel_reg. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [OneNAND] Allow for controller errors when readingAdrian Hunter
A power loss while writing can result in a page becoming unreadable. When the device is mounted again, reading that page gives controller errors. Upper level software like JFFS2 treat -EIO as fatal, refusing to mount at all. That means it is necessary to treat the error as an ECC error to allow recovery. Note that typically in this case, the eraseblock can still be erased and rewritten i.e. it has not become a bad block. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [MAPS] omap_nor section fixesDavid Brownell
Minor tweaks to omap_nor ... as with most platform drivers, its probe and remove logic can (and should!) safely vanish in most configs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NOR] Fixup for incorrect CFI data in Spansion S29GL064/32N flash chipsTrent Piepho
This is a known erratum confirmed by Spansion. I have an errata document, but I can't find a link to it anywhere on their site to include here. Some of the S29GL064N chips report 64 sectors when they should report 128, and some of S29GL032N chips report 127 sectors when they should report 63. Note that when the chip dies are fixed by Spansion, they will still have the same id. The fix is done in such a way that it won't affect corrected chips. The fixups use the extended id made available by a previous patch. Without that, virtually all newer AMD/Spansion chips will have the same ID (0x227e) and it's not possible to apply the fixup to the correct chips. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NOR] Read extended device ID from AMD/Spansion CFI flash chipsTrent Piepho
AMD/Spansion use a device id of 0x7e to indicate an extended device is present at offset 0xe and 0xf in the query data. I've verified with Spansion that all their chips (mfr == 0x01) with an id of 0x7e use it to indicate an extended id is present. What's more, there are no chips with a NON-extended id that is the same as a different chip's extended id. In other words, when the extended ID is present, one can replace the normal id with the extended id without losing any information. Which is what I've done. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] fsl_elbc_nand: workaround for hangs during nand writeAnton Vorontsov
Using current driver elbc sometimes hangs during nand write. Reading back last byte helps though (thanks to Scott Wood for the idea). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] plat_nand: set mtd->nameHamish Moffatt
This patch sets mtd->name to the platform bus ID in the plat_nand driver, so that you can specify partitions readily with mtdparts=. Currently it relies on nand_base filling in the name from the device, which results in names like "NAND 256MiB 3,3V 8-bit", that you can't use with cmdlineparts. Signed-off-by: Hamish Moffatt <hamish@cloud.net.au> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] corrected MPC8313 NAND fixesMike Hench
Fix a race condition in fsl_elbc_run_command Fix incorrect usage of clearbits32 that bashed option register Remove work around for bashed register Signed-off-by: Mike Hench <mhench@elutions.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] fsl_elbc_nand: fix mtd nameAnton Vorontsov
Currently fsl_elbc_nand doesn't initialize mtd->name, and this causes nand_get_flash_type() to assign name that is equal to chip type, like this: root@b1:~# cat /proc/mtd dev: size erasesize name mtd0: 00800000 00010000 "fe000000.flash" mtd1: 02000000 00004000 "NAND 32MiB 3,3V 8-bit" mtd0 is physmap_of flash (normal name), and mtd1 is fsl_elbc_nand. Despite inconsistency, with mtd name like this specifying paritions from the kernel command line becomes a torture (though, I didn't tried and not sure if mtdparts= can handle spaces at all). Plus, this causes real bugs when multiple fsl_elbc_nand chips registered. With this patch applied fsl_elbc_nand chip will have proper name: root@b1:~# cat /proc/mtd dev: size erasesize name mtd0: 00800000 00010000 "fe000000.flash" mtd1: 02000000 00004000 "e0600000.flash" p.s. We can't use priv->dev->bus_id as in physmap_of, because fsl_elbc_nand pretends to be a localbus controller, so its bus_id is "address.localbus", which is incorrect and thus will also not work for multiple chips. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] AR7 mtd partition mapMatteo Croce
Signed-off-by: Matteo Croce <technoboy85@gmail.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Eugene Konev <ejka@imfi.kspu.ru> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] FSL UPM NAND driverAnton Vorontsov
This is very simple driver, NAND is connected through localbus, and User-Programmable Machine is doing various adjustments to speak NAND. No special efforts needed to do read and write cycles, though to control ALE and CLE phases, we ask UPM to generate exact pre-programmed signals on the localbus lines. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] Fix checkpatch errors in pxa3xx_nandDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NOR] Add JEDEC support for the SST 36VF3203 flash chipAndrei Dolnikov
Add support for the SST 36VF3203 flash chip. It is used on Emerson KSI8560 board. Signed-off-by: Andrei Dolnikov <adolnikov@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [MAPS] Extend plat-ram to support a supplied probe typeFlorian Fainelli
This enhances plat-ram to take a map_probes argument in the platform_data structure which allow plat-ram to support any direct-mapped device that MTD supports (jedec, cfi, amd ..) A few items are also fixed: - Don't panic if probes is 0 - Actually use the partition list that is passed in Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] XIP: Use generic xip_iprefetch() instead of asm volatile (...)Paulius Zaleckas
Untested, but shouldn't break anything... Makes MTD_XIP arch independent. I guess this is why xip_iprefetch() was made for. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] support for pxa3xxeric miao
This is preliminary since: 1. It supports only _one_ chip select at the moment. As there is no existing platforms available using two chip selects of the NAND controller, it shall really not include code for supporting the 2nd chip select for now, as such code cannot be verified. 2. It resorts to the default and simpliest memory based badblock table 3. Only limited types of nand flash are currently supported. Most PXA3xx processors come with on-chip NAND flash dies, so there isn't much flexibility for other types of NAND. 4. The NAND controller should be configured to detect the device's ID, thus making it difficult to use nand_scan_ident() to assist the detection process (though it's not impossible) TODO: fix all the above limitations of cuz :-) Signed-off-by: eric miao <eric.miao@marvell.com> Cc: Sergey Podstavin <spodstavin@ru.mvista.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [OneNAND] unlikely(x) || unlikely(y) => unlikely(x || y)Roel Kluin
Acked-By: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] fix minor typo in the MTD map driver for SHARP SL seriesThomas Petazzoni
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] cmdlinepart: Missing partition info is not an errorPeter Korsgaard
Return 0 partitions instead of -EINVAL on no mtdpart= argument in kernel cmdline or missing partition info for device. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [MAPS] add support for Nvidia MCP55 to ck804xromCarl-Daniel Hailfinger
This patch extends the existing MAPS driver for the Nvidia CK804 chipset (ck804xrom.c) to also work on the Nvidia MCP55 chipset. As both chipsets are rather similar, suporting them both with the same driver is easy. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] make struct rfd_ftl_tr staticAdrian Bunk
This patch makes the needlessly global struct rfd_ftl_tr static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [OneNAND] proper onenand_bbt_read_oob() prototypeAdrian Bunk
This patch adds a proper prototype for onenand_bbt_read_oob() in include/linux/mtd/onenand.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NOR] cfi_cmdset_0020.c: make a function staticAdrian Bunk
This patch makes the needlessly global cfi_staa_erase_varsize() static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] ftl.c: make code staticAdrian Bunk
This patch makes the following needlessly global code static: - ftl_freepart() - struct ftl_tr Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] cmdlinepart.c: don't compare pointers with 0Adrian Bunk
Sparse spotted that 0 was compared to pointers. While I was at it, I also moved the assignments out of the if's. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] mtdram.c should #include <linux/mtd/mtdram.h>Adrian Bunk
Every file should include the headers containing the externs for its global functions (in this case for mtdram_init_device()). Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] proper prototypes for nftl_{read,write}_oob()Adrian Bunk
This patch adds proper prototypes for nftl_{read,write}_oob() in include/linux/mtd/nftl.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] proper prototypes for inftl_{read,write}_oob()Adrian Bunk
This patch adds proper prototypes for inftl_{read,write}_oob() in include/linux/mtd/inftl.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] mtd/ofpart.c: add MODULE_LICENSEAdrian Bunk
This patch adds the missing MODULE_LICENSE("GPL"). Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] fsl_elbc_nand: Fix SEQIN handling for large pages.Scott Wood
Previously, a READ command was erroneously issued rather than SEQIN. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] Correct phram module param descriptionMark Hindley
Signed-off-by: Mark Hindley <mark@hindley.org.uk> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] at91_nand: Make part_probes[] staticAtsushi Nemoto
The part_probes[] should be static. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Jörn Engel <joern@logfs.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] fix platform driver hotplug/coldplugKay Sievers
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable MTD NAND platform drivers, to re-enable auto loading. NOTE: at91_nand for some reason disallows modular builds. I'm assuming that's just an oversight that will be fixed. [dbrownell@users.sourceforge.net: minor fix] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [MAPS] fix platform driver hotplug/coldplugKay Sievers
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable MTD mapping platform drivers, to re-enable auto loading. NOTE oddness with physmap ... it's a legacy driver in some configs, which means it can't always support hotplugging. (Not that most of these mapping drivers would often be used as modules...) [dbrownell@users.sourceforge.net: bugfix, more drivers, registration fixes] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] fix possible Ooops in rfc_from4Sebastian Siewior
I found this while I was looking how the rs_lib is working. The rs_decoder is initialized _after_ the nand core code read the BBT table and _after_ the partition table has been added. The driver has a private BBT description which is in located in flash data so we Ooops if there is a bit flip _or_ if a bit flips while reading the partition table. This patch moves the initialization of the rs_lib before the first possible access by nand core. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jörn Engel <joern@wh.fh-wedel.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [JEDEC] Fix whitespace noise in chip tableDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [JEDEC] add support for the ST M29W400DB flash chipGordon Farquharson
Add support for the ST M29W400DB flash chip. which is used on the GLAN Tank NAS. Signed-off-by: Gordon Farquharson <gordonfarquharson@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] block2mtd: logging typo fixesStephane Chazelas
Address a number of small issues mainly regarding the output made by this driver to dmesg: - Some of the blkmtd's had not been changed to block2mtd which caused display problem - the parse_err() macro was displaying "block2mtd: " twice Signed-off-by: Stéphane Chazelas <stephane.chazelas@emerson.com> Acked-by: Jörn Engel <joern@lazybastard.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [NAND] mtd/nand/cs553x_nand.c:part_probes[] staticAdrian Bunk
Make the needlessly global part_probes[] static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] mtdoops.c: make struct oops_cxt static againAdrian Bunk
struct oops_cxt needlessly became global. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] [MAPS] Document MTD_PHYSMAP module name in kconfigMike Frysinger
Help out users by telling them the module name in the Kconfig help when using the MTD_PHYSMAP option. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2008-04-21IB/ipath: Correct capitalization "IntX" -> "INTx"Roland Dreier
Match what the PCI specification uses. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-21IB/ipath: Remove tests of PCI_MSI in ipath_iba7220.cRoland Dreier
The PCI MSI interface is stubbed out properly so that all the functions just return failure if PCI_MSI=n, so there's no reason to have "#ifdef CONFIG_PCI_MSI" blocks in ipath_iba7220.c. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-21IB/ipath: Remove dependency on PCI_MSI || HT_IRQRoland Dreier
Before IBA7220 support was added, the ipath driver didn't support any hardware unless PCI_MSI and/or HT_IRQ was enabled. However, the IBA7220 can generate INTx interrupts, so it makes sense to allow the driver to be build even if PCI_MSI=n and HT_IRQ=n. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-21IB/ipath: Build IBA7220 code unconditionallyRoland Dreier
The new IBA7220 code added a call to ipath_init_iba7220_funcs() that is compiled unconditionally, but only built the IBA7220 code if PCI_MSI is enabled. Fix this by building the IBA7220 file unconditonally. This fixes build breakage when PCI_MSI=n, HT_IRQ=y and INFINIBAND_IPATH=y reported by Ingo Molnar <mingo@elte.hu>: drivers/built-in.o: In function `ipath_init_one': ipath_driver.c:(.devinit.text+0x1e5bc): undefined reference to `ipath_init_iba7220_funcs' Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-21IB/ipath: Remove reference to dev->class_dev ↵Roland Dreier
Commit 124b4dcb ("IB/ipath: add calls to new 7220 code and enable in build") inadvertently added core to set dev->class_dev.dev back into ib_ipath. This is completely redundant since commit 1912ffbb ("IB: Set class_dev->dev in core for nice device symlink"), which removed class_dev setting from low-level drivers, and also will break the build when class_dev is removed completely from struct ib_device. Signed-off-by: Roland Dreier <rolandd@cisco.com>