summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
Commit message (Collapse)AuthorAgeFilesLines
* [MTD] [NAND] add cmdline parsing (mtdparts=) support to cafe_nandPhilip Rakity2009-01-091-2/+5
| | | | | | [dwmw2: updated and made to still register whole device first] Signed-off-by: Philip Rakity <pakity@yahoo.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [NAND] ndfc driverSean MacLennan2009-01-052-136/+140
| | | | | | | | | | | | | | | | | The current ndfc driver only compiles under arch/ppc. This arch was removed from the kernel. I notice the event entry for the ndfc in Kconfig has been removed in 2.6.28. This patch converts the ndfc to a proper OF (OpenFirmware) driver. I can give a working example of the DTS if needed. The patch has been in production use on the PIKA Warp Appliance and is in use by others. The Warp basically boots from NAND, so the ndfc driver is very important to us. Signed-off-by: Sean MacLennan <smaclennan@pikatech.com> Acked-By: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [NAND] pxa3xx: convert from ns to clock ticks more accuratelyMatt Reimer2009-01-051-1/+1
| | | | | | | | | | The various fields in NDTR{01} are in units of clock ticks minus one, but the ns2cycle macro mistakenly adds one, inflating the number of clock ticks and making it impossible to set any of these fields to zero. Signed-off-by: Matt Reimer <mreimer@vpop.net> Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [NAND] pxa3xx: fix non-page-aligned readsMatt Reimer2009-01-051-2/+2
| | | | | | | | | | | | | | | | | Reads from non-page-aligned addresses were broken because while the address to read from was correctly written to NDCB*, a full page was always read. Fix this by ignoring the column and only using the page address. I suspect this whole-page behavior is due to the controller's need to read the entire page in order to generate correct ECC. In the non-ECC case this could be optimized to use the column address, and to set the read length to what is being requested rather than the length of an entire page. Signed-off-by: Matt Reimer <mreimer@vpop.net> Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [NAND] fix nandsim sched.h referencesRandy Dunlap2009-01-051-0/+1
| | | | | | | | | | | | | | | Fix sched.h references: build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1326: error: dereferencing pointer to incomplete type build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1326: error: 'PF_MEMALLOC' undeclared (first use in this function) build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1328: error: dereferencing pointer to incomplete type build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1335: error: dereferencing pointer to incomplete type build-r7149.out:/local/linsrc/linux-next-20081215/drivers/mtd/nand/nandsim.c:1335: error: 'PF_MEMALLOC' undeclared (first use in this function) build-r7149.out:make[4]: *** [drivers/mtd/nand/nandsim.o] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [NAND] alauda: use USB API functions rather than constantsJulia Lawall2009-01-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This set of patches introduces calls to the following set of functions: usb_endpoint_dir_in(epd) usb_endpoint_dir_out(epd) usb_endpoint_is_bulk_in(epd) usb_endpoint_is_bulk_out(epd) usb_endpoint_is_int_in(epd) usb_endpoint_is_int_out(epd) usb_endpoint_num(epd) usb_endpoint_type(epd) usb_endpoint_xfer_bulk(epd) usb_endpoint_xfer_control(epd) usb_endpoint_xfer_int(epd) usb_endpoint_xfer_isoc(epd) In some cases, introducing one of these functions is not possible, and it just replaces an explicit integer value by one of the following constants: USB_ENDPOINT_XFER_BULK USB_ENDPOINT_XFER_CONTROL USB_ENDPOINT_XFER_INT USB_ENDPOINT_XFER_ISOC An extract of the semantic patch that makes these changes is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r1@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) == - \(USB_ENDPOINT_XFER_CONTROL\|0\)) + usb_endpoint_xfer_control(epd) @r5@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == - \(USB_DIR_IN\|0x80\)) + usb_endpoint_dir_in(epd) @inc@ @@ #include <linux/usb.h> @depends on !inc && (r1||r5)@ @@ + #include <linux/usb.h> #include <linux/usb/...> // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Merge branch 'master' of ↵David Woodhouse2009-01-053-7/+7
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: arch/arm/mach-pxa/corgi.c arch/arm/mach-pxa/poodle.c arch/arm/mach-pxa/spitz.c
| * [ARM] MX3: add NAND supportSascha Hauer2008-12-161-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Merge branch 'omap3-upstream' of ↵Russell King2008-12-153-3/+7
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel
| * \ Merge branch 'for-rmk' of ↵Russell King2008-12-021-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel Conflicts: arch/arm/mach-pxa/pxa25x.c
| | * | [ARM] pxa: explicit #include <mach/dma.h> in various driversEric Miao2008-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Where 'pxa_dma_desc' and 'pxa_{request,free}_dma' are referenced. Signed-off-by: Eric Miao <eric.miao@marvell.com>
| * | | Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into develRussell King2008-11-291-2/+2
| |\ \ \
| | * | | [ARM] S3C: Move nand headers to arch/arm/plat-s3c/include/platBen Dooks2008-10-301-2/+2
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Move nand headers to arch/arm/plat-s3c/include/plat ready to clean out the old include directories. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| * | | Merge branches 'core' and 'clks' into develRussell King2008-11-271-1/+1
| |\ \ \
| | * | | [ARM] pxa: don't pass a consumer clock name for devices with unique clocksRussell King2008-11-271-1/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Where devices only have one consumer, passing a consumer clock ID has no real benefit. Remove it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * / / [ARM] remove memzero()Russell King2008-11-271-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | As suggested by Andrew Morton, remove memzero() - it's not supported on other architectures so use of it is a potential build breaking bug. Since the compiler optimizes memset(x,0,n) to __memzero() perfectly well, we don't miss out on the underlying benefits of memzero(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | [MTD] struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2008-12-233-3/+3
| | | | | | | | | | | | | | | | | | Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | | [MTD] [NAND] Set the fsl elbc ECCM according the settings in bootloader.Jason Jin2008-12-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ECCM maybe set in bootloader, Get ECCM settings from the bootloader, can avoid the image written by bootloader cannot read out by kernel. But the limitation of doing it this way is that, it could break large page NAND if it is written with NAND disabled in u-boot and read with NAND enabled, or vice versa. Signed-off-by: Jason Jin <Jason.jin@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | | [MTD] [NAND] remove excess kernel-doc notationRandy Dunlap2008-12-101-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete extra kernel-doc notation for struct fields and function parameters that don't exist: Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'wq' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'datbuf' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'oobbuf' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'oobdirty' description in 'nand_chip' Warning(include/linux/mtd/nand.h:428): Excess struct/union/enum/typedef member 'data_poi' description in 'nand_chip' Warning(drivers/mtd/nand/nand_base.c:2527): Excess function parameter 'maxchips' description in 'nand_scan_tail' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | | Merge branch 'misc/mtd/sharpsl-nand' of ↵David Woodhouse2008-12-101-125/+122Star
|\ \ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lumag/tosa-2.6
| * | | [MTD] sharpsl-nand: move registration to board codeDmitry Baryshkov2008-10-291-86/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally move registration of sharpsl-nand device to board-specific code. sharpsl nand driver is now clean and simple. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | [MTD] sharpsl-nand: use platform_data for model-specific valuesDmitry Baryshkov2008-10-291-74/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add platform_data which holds all model-specific values, like badblocks pattern, oobinfo, partitions. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | [MTD] sharpsl-nand: cleanup partitions supportDmitry Baryshkov2008-10-291-4/+18
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | [MTD] sharpsl_nand: move io addr to struct sharpsl_nandDmitry Baryshkov2008-10-291-27/+32
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | [MTD] sharpsl_nand: make drvdata non-staticDmitry Baryshkov2008-10-291-24/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge mtd_info and nand_chip info special struct and make it drvdata instead of plain static variable. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | [MTD] sharpsl_nand: switch to driver model usage.Dmitry Baryshkov2008-10-291-7/+56
| |/ / | | | | | | | | | | | | | | | | | | | | | Start cleanup of sharpsl_nand driver. Convert it to platform driver. Corresponding device is temprorary registered in sharpsl.c but will be later moved to corresponding board files. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* | | [MTD] [NAND] Remove strange u_int64_t types from nandsimDavid Woodhouse2008-12-101-5/+5
| | | | | | | | | | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | | [MTD] update internal API to support 64-bit device sizeAdrian Hunter2008-12-102-25/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. Extending the external API is a separate issue for several reasons. First, no one needs it at the moment. Secondly, whether the implementation is done with IOCTLs, sysfs or both is still debated. Thirdly external API changes require the internal API to be accepted first. Note that although the MTD API will be able to support 64-bit device sizes, existing drivers do not and are not required to do so, although NAND base has been updated. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats - division and modulus of 64-bit values - NAND base support - 32-bit local variables used by mtdpart and mtdconcat - naughtily assuming one structure maps to another in MEMERASE ioctl Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | | MTD: nandsim: use less RAMAlexey Korolev2008-12-101-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nandsim consumes ~2x more RAM than the density of simulated device. It becomes critical if we need to simulate 256MB NAND and run stress tests on it. We investigated the reasons. nandsim allocates space for pages using kmalloc function. The size of LP nand page is 2112 bytes. kmalloc gets space from slab pools by chunks 2^n. So if we need to kmalloc 2112 bytes, 4096 bytes will be consumed by system. The best way to avoid this issue would be using kmem_cache allocations. AFAIK this mechanism specially designed to handle cases when arrays of allocations are used. Signed-off-by: Alexey Korolev <akorolev@infradead.org> Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | | MTD: nandsim: add option to use a file to cache pagesAdrian Hunter2008-12-101-24/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new module parameter 'cache_file' which causes nandsim to use that file instead of memory to cache nand data. Using a file allows the simulation of NAND that is bigger than the available memory. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | | MTD: nandsim: suppress unnecessary warningAdrian Hunter2008-12-101-7/+11
| |/ |/| | | | | | | | | | | | | | | nand_base sometimes reads only 2 bytes of a 4 byte id. It is OK. Do not print a warning in that case. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | [MTD] [NAND] fix OOPS accessing flash operations over STM flash on PXADenis V. Lunev2008-12-031-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>
* | [MTD] [NAND] drivers/mtd/nand/pasemi_nand.c: Add missing pci_dev_putJulia Lawall2008-12-021-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>
* | [MTD] [NAND] fsl_upm: fix build problem with 2.6.28-rc2Wolfgang Grandegger2008-11-271-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>
* Merge git://git.infradead.org/mtd-2.6Linus Torvalds2008-10-2014-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 ...
| * [MTD] [NAND] GPIO driver depends on ARM... for now.David Woodhouse2008-10-201-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>
| * [MTD] [NAND] sh_flctl: fix compile errorYoshihiro Shimoda2008-10-201-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>
| * [MTD] [NAND] GPIO NAND flash driverMike Rapoport2008-10-183-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>
| * [MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.cManish Katiyar2008-10-181-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>
| * [MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTLYoshihiro Shimoda2008-10-143-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>
| * [MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly writtenRichard Genoud2008-10-141-52/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [MTD] remove unused mtd parameter in of_mtd_parse_partitions()Sebastian Andrzej Siewior2008-10-131-2/+1Star
| | | | | | | | | | Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * [MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGEKumar Gala2008-10-101-7/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [MTD] [NAND] driver extension to support NAND on TQM85xx modulesWolfgang Grandegger2008-10-102-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>
| * [MTD] [NAND] fsl_upm: update driver for the new OF bindingsAnton Vorontsov2008-10-101-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>
| * [MTD] [NAND] nand_base.c: reset chip firstKarl Beldan2008-09-161-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>
| * [MTD] [NAND] Freescale i.MX2 NAND driverSascha Hauer2008-09-023-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>
| * [MTD] [NAND] pxa3xx_nand: added warning which tells id of detected NANDEnrico Scholz2008-09-011-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>
| * [MTD] [NAND] pxa3xx_nand: moved some helper variables out from platform dataEnrico Scholz2008-09-011-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>
| * [MTD] [NAND] pxa3xx_nand: added some 'const' annotations to the exported APIEnrico Scholz2008-09-011-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>