aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/atmel_nand.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-05-25mtd: atmel_nand: convert to mtd_device_register()Jamie Iles1-11/+1
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS preprocessor conditionals as partitioning is always available. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2011-05-25mtd: atmel_nand: add missing include of linux/dmaengine.hHans-Christian Egtvedt1-0/+1
Including linux/dmaengine.h fixes the missing definition of the enum dma_ctrl_flags type used in atmel_nand_dma_op function. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2011-04-01mtd: atmel_nand: use CPU I/O when buffer is in vmalloc(ed) regionHong Xu1-16/+2
The previous way of dealing with vmalloc(ed) region by walking though the pages can not work well actually. We just fall back to CPU I/O when the buffer address is higher than `high_memory'. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Hong Xu <hong.xu@atmel.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-01mtd: atmel_nand: modify test case for using DMA operationsNicolas Ferre1-2/+4
We have better performances not using DMA for oob operations. Modify size test so that it is using DMA for size greater than oobsize. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-01mtd: atmel_nand: fix support for CPUs that do not support DMA accessHong Xu1-1/+4
use_dma was always "1" even if the CPU does not support DMA Tested on AT91SAM9261EK by Jean-Christophe PLAGNIOL-VILLARD Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Hong Xu <hong.xu@atmel.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-01mtd: atmel_nand: trivial: change DMA usage information traceNicolas Ferre1-1/+2
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-03-11mtd: atmel_nand: Add DMA support to access NandflashHong Xu1-9/+157
Some SAM9 chips have the ability to perform DMA between CPU and SMC controller. This patch adds DMA support for SAM9RL, SAM9G45, SSAM9G46,AM9M10, SAM9M11. Signed-off-by: Hong Xu <hong.xu@atmel.com> Tested-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-08-06mtd: atmel_nand: fix warning: 'part_probes' defined but not usedAndreas Bießmann1-1/+1
This patch fixes drivers/mtd/nand/atmel_nand.c:372: warning: 'part_probes' defined but not used which is issued when CONFIG_MTD_PARTITIONS is defined but CONFIG_MTD_CMDLINE_PARTS not. Signed-off-by: Andreas Bießmann <biessmann@corscience.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-02-26mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident()David Woodhouse1-1/+1
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-11-30mtd: error return -EIO instead of EIORoel Kluin1-2/+2
Return a negative error value instead of a positive Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-10-08mtd: atmel_nand: unused variable removedClaudio Scordino1-1/+0
Unused variable "eccpos" removed from atmel_nand driver. Signed-off-by: Claudio Scordino <claudio@evidence.eu.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-09-19mtd: nand: add "page" parameter to all read_page/read_page_raw APIsSneha Narnakaje1-1/+1
This patch adds a new "page" parameter to all NAND read_page/read_page_raw APIs. The read_page API for the new mode ECC_HW_OOB_FIRST requires the page information to send the READOOB command and read the OOB area before the data area. Reviewed-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-06-25mtd: atmel_nand: Fix typo s/parititions/partitions/Thadeu Lima de Souza Cascardo1-1/+1
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-06-05mtd: add on-flash BBT support for Atmel NAND driverSimon Polette1-1/+10
Just add a new on-flash-bbt module parameter. Signed-off-by: Simon Polette <spolette@adetelgroup.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-02-16[ARM] 5400/1: Add support for inverted rdy_busy pin for Atmel nand device controllerGregory CLEMENT1-1/+2
Add support for inverted rdy_busy pin for Atmel nand device controller It will fix building error on NeoCore926 board. Acked-by: Andrew Victor <linux@maxim.org.za> Acked-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Gregory CLEMENT <gclement@adeneo.adetelgroup.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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-08-07[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King1-2/+2
This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-11[MTD] [NAND] atmel_nand: Work around AT32AP7000 ECC erratumHaavard Skinnemoen1-2/+23
The ALE signal isn't correctly wired up to the ECC controller on the AP7000, so it starts calculating ECC during the address cycles. Work around this by resetting the ECC controller between the address and data cycles. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11[MTD] [NAND] atmel_nand speedup via {read,write}s{b,w}()David Brownell1-5/+41
This uses __raw_{read,write}s{b,w}() primitives to access data on NAND chips for more efficient I/O. On an arm926 with memory clocked at 100 MHz, this reduced the elapsed time for a 64 MiB read by 16%. ("dd" /dev/mtd0 to /dev/null, with an 8-bit NAND using hardware ECC and 128KiB blocksize.) Also some minor section tweaks: - Use platform_driver_probe() so no pointer to probe() lingers after that code has been removed at run-time. - Use __exit and __exit_p so the remove() code will normally be removed by the linker. Since these buffer read/write calls are new, this increases the runtime code footprint (by 88 bytes on my build, after the section tweaks). [haavard.skinnemoen@atmel.com: rebase onto atmel_nand rename] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-06-07[MTD] [NAND] Fix checkpatch warnings which showed up when atmel_nand.c movedDavid Woodhouse1-3/+3
Some of them, at least. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] atmel_nand: Clean up and fix probe() error pathHåvard Skinnemoen1-19/+22
This fixes several bugs in the atmel_nand_probe() error path, including at least one memory leak. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] rename at91_nand -> atmel_nand: internal symbolsHåvard Skinnemoen1-76/+76
This is basically s/at91_nand/atmel_nand/g with some manual inspection. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-06-07[MTD] [NAND] rename at91_nand -> atmel_nand: file names and KconfigHåvard Skinnemoen1-0/+590
The AT91 NAND driver needs just a few tiny modifications to work on AVR32 as well. Rename it atmel_nand to reflect this. Also move the ECC register definitions into drivers/mtd/nand since they are only useful to the atmel_nand driver, and get rid of the useless filename at the top of each file. Signed-off-by: Håvard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>