aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-12-03[MTD] [NAND] fix OOPS accessing flash operations over STM flash on PXADenis V. Lunev1-0/+1
STM 2Gb flash is a large-page NAND flash. Set operations accordingly. This field is dereferenced without a check in several places resulting in OOPS. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Eric Miao <ymiao3@marvell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-02[MTD] [NAND] drivers/mtd/nand/pasemi_nand.c: Add missing pci_dev_putJulia Lawall1-0/+1
pci_get_device increments a reference count that should be decremented using pci_dev_put. The semantic patch that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S,S1; position p1,p2,p3; expression E,E1; type T,T1; expression *ptr != NULL; @@ ( if ((x@p1 = pci_get_device(...)) == NULL) S | x@p1 = pci_get_device(...); ) ... when != pci_dev_put(...,(T)x,...) when != if (...) { <+... pci_dev_put(...,(T)x,...) ...+> } when != true x == NULL || ... when != x = E when != E = (T)x when any ( if (x == NULL || ...) S1 | if@p2 (...) { ... when != pci_dev_put(...,(T1)x,...) when != if (...) { <+... pci_dev_put(...,(T1)x,...) ...+> } when != x = E1 when != E1 = (T1)x ( return \(0\|<+...x...+>\|ptr\); | return@p3 ...; ) } ) @ script:python @ p1 << r.p1; p3 << r.p3; @@ print "* file: %s pci_get_device: %s return: %s" % (p1[0].file,p1[0].line,p3[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-11-27[MTD] [NAND] fsl_upm: fix build problem with 2.6.28-rc2Wolfgang Grandegger1-3/+5
The patch fixes following build error: CC drivers/mtd/nand/fsl_upm.o drivers/mtd/nand/fsl_upm.c: In function 'fun_chip_init': drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 2 of 'of_mtd_parse_partitions' from incompatible pointer type drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 3 of 'of_mtd_parse_partitions' from incompatible pointer type drivers/mtd/nand/fsl_upm.c:168: error: too many arguments to function 'of_mtd_parse_partitions' make[1]: *** [drivers/mtd/nand/fsl_upm.o] Error 1 The breakage was introduced in 69fd3a8d098faf41a04930afa83757c0555ee360 ("[MTD] remove unused mtd parameter in of_mtd_parse_partitions()"). While at it, also add a check for the of_mtd_parse_partitions() return value. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-20Merge git://git.infradead.org/mtd-2.6Linus Torvalds14-499/+2932
* git://git.infradead.org/mtd-2.6: (69 commits) Revert "[MTD] m25p80.c code cleanup" [MTD] [NAND] GPIO driver depends on ARM... for now. [MTD] [NAND] sh_flctl: fix compile error [MTD] [NOR] AT49BV6416 has swapped erase regions [MTD] [NAND] GPIO NAND flash driver [MTD] cmdlineparts documentation change - explain where mtd-id comes from [MTD] cfi_cmdset_0002.c: Add Macronix CFI V1.0 TopBottom detection [MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.c [JFFS2] Write buffer offset adjustment for NOR-ECC (Sibley) flash [MTD] mtdoops: Fix a bug where block may not be erased [MTD] mtdoops: Add a magic number to logged kernel oops [MTD] mtdoops: Fix an off by one error [JFFS2] Correct parameter names of jffs2_compress() in comments [MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTL [MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly written [MTD] [MAPS] Remove unused variable after ROM API cleanup. [MTD] m25p80.c extended jedec support (v2) [MTD] remove unused mtd parameter in of_mtd_parse_partitions() [MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGE [MTD] [NAND] driver extension to support NAND on TQM85xx modules ...
2008-10-20[MTD] [NAND] GPIO driver depends on ARM... for now.David Woodhouse1-1/+1
Not all architectures provide readsb(). We should probably move to using ioread8_rep() instead. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-20[MTD] [NAND] sh_flctl: fix compile errorYoshihiro Shimoda1-0/+577
Fix compile error because the first patch was broken -- the file got truncated. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-18[MTD] [NAND] GPIO NAND flash driverMike Rapoport3-0/+382
The patch adds support for NAND flashes connected to GPIOs. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-18[MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.cManish Katiyar1-0/+2
Below patch fixes the following compilation warnings. drivers/mtd/nand/cs553x_nand.c:293: warning: unused variable 'mtd_parts' drivers/mtd/nand/cs553x_nand.c:292: warning: unused variable 'mtd_parts_nb' Signed-off-by: Manish Katiyar <mkatiyar@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-17USB: remove info() macro from usb mtd driversGreg Kroah-Hartman1-2/+2
USB should not be having it's own printk macros, so remove info() and use the system-wide standard of dev_info() wherever possible. Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16omap drivers: switch to standard GPIO callsDavid Brownell1-2/+2
This updates most of the OMAP drivers which are in mainline to switch to using the cross-platform GPIO calls instead of the older OMAP-specific ones. This is all fairly brainless/obvious stuff. Probably the most interesting bit is to observe that the omap-keypad code seems to now have a portable core that could work with non-OMAP matrix keypads. (That would improve with hardware IRQ debouncing enabled, of course...) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Antonino Daplas <adaplas@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-14[MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTLYoshihiro Shimoda3-0/+309
Several Renesas SuperH CPU has FLCTL. The FLCTL support NAND Flash. This driver support SH7723. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-14[MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly writtenRichard Genoud1-52/+6
The functions that write the OOB info (on hardware ECC only) use the HW_SYNDROME method. This is not correct : the start position is "pos = eccsize + chunk" and should be eccsize. So, the standard (nand_write_oob_std) function should be used. This patch corrects this by using NAND_ECC_HW instead of NAND_ECC_HW_SYNDROME. This has only been tested on small pages nand flash. (if anyone can test it on large pages that would be great). kernel version : 2.6.27-rc2 (current git mtd-2.6) Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-13Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6David Woodhouse3-5/+8
Conflicts: include/asm-x86/statfs.h
2008-10-13[MTD] remove unused mtd parameter in of_mtd_parse_partitions()Sebastian Andrzej Siewior1-2/+1
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-10[MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGEKumar Gala1-7/+0
Removed the Kconfig associated with 'NDFC NanD Flash Controller'. We can't enable !CONFIG_PPC_MERGE so there is no way to enable this. Additionally the code needs to get updated for arch/powerpc. For the time being lets just remove the Kconfig option so we can actually remove CONFIG_PPC_MERGE. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-10[MTD] [NAND] driver extension to support NAND on TQM85xx modulesWolfgang Grandegger2-5/+14
This patch extends the FSL UPM NAND driver from Anton Vorontsov to support hardware which does not have the R/B pin of the NAND chip connected, like the TQM8548 module: - The OF_GPIO dependency has been removed from the Kconfig option because GPIO is not needed. The relevant gpio_* function are then stubbed out in <linux/gpio.h>. - It re-introduces the chip-delay property to define an appropriate maximum delay time (tR) required for read operations. The binding will be documented in a separate patch. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-10[MTD] [NAND] fsl_upm: update driver for the new OF bindingsAnton Vorontsov1-24/+33
- Get rid of fsl,wait-pattern and fsl,wait-write. I think this isn't chip-specific, and we should always do waits. I saw one board that didn't need fsl,wait-pattern, but I assume this was the exception that proves the rule; - Get rid of chip-delay. Today there are no users for this, and if anyone really need this they should push the OF bindings beforehand; - Now flash chips should be child nodes of the FSL UPM NAND controller; - Implement OF partition parsing. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-09Merge branch 'pxa-all' into develRussell King1-1/+1
Conflicts: arch/arm/mach-pxa/Kconfig arch/arm/mach-pxa/corgi.c arch/arm/mach-pxa/include/mach/hardware.h arch/arm/mach-pxa/spitz.c
2008-10-07Merge branches 'metronomefb', 'pxa-cm2xx', 'pxa-gumstix', 'pxa-misc', 'pxa-mitac', 'pxa-mp900', 'pxa-zylonite' and 'pxa-zaurus' into pxa-machinesRussell King2-5/+5
Conflicts: arch/arm/mach-pxa/poodle.c
2008-10-07[ARM] 5282/1: pxa: add CM-X255 supportMike Rapoport1-1/+1
Signed-off-by: Russ Dill <russ.dill@gmail.com> Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-21[ARM] 5265/3: [AT91] Add copyright infoAndrew Victor1-0/+3
Add copyright information for some of the AT91 header files. Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-16[MTD] [NAND] nand_base.c: reset chip firstKarl Beldan1-0/+8
Some chips require a RESET after power-up (e.g. Micron MT29FxGxxxxx). The first command sent is NAND_CMD_READID. Issue a NAND_CMD_RESET in nand_scan_ident before reading the device id. Tested with an MT29F4G08AAC. Signed-off-by: Karl Beldan <karl.beldan@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-05[MTD] [NAND] tmio_nand: fix base address programmingDmitry Baryshkov1-4/+4
Fix offset of second word used for programming base address of memory window. Also program tmio with offset of the FCR, not with physical memory location. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Cc: Ian Molton <spyro@f2s.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-04[MTD] [NAND] Define and use PCI_DEVICE_ID_MARVELL_88ALP01_NAND for CAFÉDavid Woodhouse1-1/+5
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-02[MTD] [NAND] Freescale i.MX2 NAND driverSascha Hauer3-0/+1085
This patch adds support for the integrated NAND flash controller of the i.MX2 and i.MX3 family. It is tested on MX27 but should work on MX3 aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Juergen Beisert <j.beisert@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01[MTD] [NAND] pxa3xx_nand: added warning which tells id of detected NANDEnrico Scholz1-1/+4
Minor patch to help debugging of NAND detection. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01[MTD] [NAND] pxa3xx_nand: moved some helper variables out from platform dataEnrico Scholz1-18/+25
This patch moves some attributes out from the platform data into the dynamically created nand device. This results into a cleaner interface and allows to use constant pxa3xx_nand_flash definitions. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01[MTD] [NAND] pxa3xx_nand: added some 'const' annotations to the exported APIEnrico Scholz1-5/+5
This patch marks some attributes as 'const' which are set only once and never be modified by the driver. There are some changes in parameter list and variable declarations too which mark them as 'const'. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01[MTD] [NAND] pxa3xx_nand: allow to disable builtin flash-type tableEnrico Scholz2-0/+11
This patch adds a MTD_NAND_PXA3xx_BUILTIN configuration variables which allows to disable usage of builtin flash-type table. Not enabling this option saves some space in the generated driver. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01[MTD] [NAND] pxa3xx_nand: allow to define flash types in the platform dataEnrico Scholz1-2/+16
This patch adds 'flash' and 'num_flash' attributes to the platform data. There was added code in the driver to iterate across these attributes in the detect-flash routine. This is done similarly to the existing method which uses a 'builtin_flash_types' field. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01[MTD] [NAND] pxa3xx_nand: moved nand definitions into shared platform headerEnrico Scholz1-44/+0
This patch moves the exported datastructures from the pxa3xx_nand.c driver into the <mach/pxa3xx_nand.h> header. This is a plain movement without any modification of the attributes. This is the first one of a set of patches which: * allows to specify used NAND flash in the platform code and allows to turn off the old way to specify NAND characteristics in the driver. This way did not worked well as these characteristics depend on the platform and can not be derived from NAND id alone. E.g. some NAND chips share the same ID (e.g. K9K8G08U0A and K9NBG08U5A) but have different timings (which are written in the common driver currently and must be modified there). * adds 'const' annotations at various places Further patches will be sent to the mtd-list. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01[MTD] [NAND] pxa3xx_nand_flash: Add definition of STM2GbX16 NAND flashesSemun Lee1-0/+23
Signed-off-by: Semun Lee <semun.lee@samsung.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-01Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6David Woodhouse1-1/+1
2008-08-25[MTD] [NAND] nand_ecc.c: adding support for 512 byte eccSingh, Vimal1-24/+62
Support 512 byte ECC calculation [FM: updated two comments] Signed-off-by: Vimal Singh <vimalsingh@ti.com> Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-25[MTD] [NAND] au1550nd.c: remove unused #include <version.h>Huang Weiyi1-1/+0
It doesn't use LINUX_VERSION_CODE nor KERNEL_VERSION. This patch removes the said #include <version.h>. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-23removed unused #include <linux/version.h>'sAdrian Bunk1-1/+0
This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-20[MTD] [NAND] Fix missing kernel-docAlexey Korolev2-6/+6
[Reported by Randy Dunlap] Signed-off-by: Alexey Korolev <akorolev@infradead.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-20[MTD] [NAND] nand_ecc.c: fix big endian, strengthen test, add printkfrans1-11/+33
This patch for nand_ecc.c fixes three issues - fix code so it also works on big endian architectures - added a printk in case of an uncorrectable ecc error - strengthen the test for correctable errors (decreasing the chance that multiple bit faults by accident will be seen as correctable) Note: the big endian code is only tested in a testbed (running on big endian hardware) as I cannot rebuild and test a big endian kernel at the moment. However the only thing that can go wrong is if <asm/byteorder.h> does not give __BIG_ENDIAN in that case. In my eyes very unlikely. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-16Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds1-1/+1
* master.kernel.org:/home/rmk/linux-2.6-arm: (38 commits) [ARM] 5191/1: ARM: remove CVS keywords [ARM] pxafb: fix the warning of incorrect lccr when lcd_conn is specified [ARM] pxafb: add flag to specify output format on LDD pins when base is RGBT16 [ARM] pxafb: fix the incorrect configuration of GPIO77 as ACBIAS for TFT LCD [ARM] 5198/1: PalmTX: PCMCIA fixes [ARM] Fix a pile of broken watchdog drivers [ARM] update mach-types [ARM] 5196/1: fix inline asm constraints for preload [ARM] 5194/1: update .gitignore [ARM] add proc-macros.S include to proc-arm940 and proc-arm946 [ARM] 5192/1: ARM TLB: add v7wbi_{possible,always}_flags to {possible,always}_tlb_flags [ARM] 5193/1: Wire up missing syscalls [ARM] traps: don't call undef hook functions with spinlock held [ARM] 5183/2: Provide Poodle LoCoMo GPIO names [ARM] dma-mapping: provide sync_range APIs [ARM] dma-mapping: improve type-safeness of DMA translations [ARM] Kirkwood: instantiate the orion_spi driver in the platform code [ARM] prevent crashing when too much RAM installed [ARM] Kirkwood: Instantiate mv_xor driver [ARM] Orion: Instantiate mv_xor driver for 5182 ...
2008-08-16[MTD] [NAND] Minor cleanup of nand_ecc.cDavid Woodhouse1-11/+9
Make the standalone stuff a little cleaner, fix some checkpatch warnings. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-16[MTD] [NAND] nand_ecc.c: rewrite for improved performancefrans1-124/+372
This patch improves the performance of the ecc generation code by a factor of 18 on an INTEL D920 CPU, a factor of 7 on MIPS and a factor of 5 on ARM (NSLU2) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-12Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6David Woodhouse13-18/+582
Conflicts: include/asm-arm/arch-omap/onenand.h
2008-08-12[MTD] Define and use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffffAdrian Hunter1-1/+1
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-11[MTD] [NAND] drivers/mtd/nand/nandsim.c: remove duplicated #includeHuang Weiyi1-1/+0
Removed duplicated include <asm/div64.h> in drivers/mtd/nand/nandsim.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-10mfd: have TMIO drivers and subdevices depend on ARMSamuel Ortiz1-1/+1
The TMIO chips are only found (and thus tested) on ARM machines. Moreover, we don't want the TMIO cells to be built if one of the TMIO driver is not selected (which indirectly make the TMIO cells drivers depend on ARM as well). Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-08-10mfd: driver for the TMIO NAND controllerIan Molton3-0/+564
This patch adds support for the NAND controller commonly found in TMIO based MFDs. Signed-off-by: Ian Molton <spyro@f2s.com> Acked-By: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-08-09[ARM] Move include/asm-arm/plat-orion to arch/arm/plat-orion/include/platLennert Buytenhek1-1/+1
This patch performs the equivalent include directory shuffle for plat-orion, and fixes up all users. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
2008-08-07[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King10-18/+18
This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixesRussell King5-58/+146
2008-08-07[ARM] Remove asm/hardware.h, use asm/arch/hardware.h insteadRussell King1-1/+1
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h. Then, since asm/hardware.h only exists to include asm/arch/hardware.h, update everything to directly include asm/arch/hardware.h and remove asm/hardware.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>