linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] MTD: atmel_nand: modify test case for using DMA operations
@ 2011-03-30  8:26 Hong Xu
  2011-03-30  8:26 ` [PATCH 2/3] MTD: atmel_nand: trivial: change DMA usage information trace Hong Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Hong Xu @ 2011-03-30  8:26 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Ferre <nicolas.ferre@atmel.com>

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>
---
 drivers/mtd/nand/atmel_nand.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 6fae04b..9acecdc 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -280,7 +280,7 @@ static void atmel_read_buf(struct mtd_info *mtd, u8 *buf, int len)
 	struct nand_chip *chip = mtd->priv;
 	struct atmel_nand_host *host = chip->priv;
 
-	if (use_dma && len >= mtd->oobsize)
+	if (use_dma && len > mtd->oobsize)
 		if (atmel_nand_dma_op(mtd, buf, len, 1) == 0)
 			return;
 
@@ -295,7 +295,7 @@ static void atmel_write_buf(struct mtd_info *mtd, const u8 *buf, int len)
 	struct nand_chip *chip = mtd->priv;
 	struct atmel_nand_host *host = chip->priv;
 
-	if (use_dma && len >= mtd->oobsize)
+	if (use_dma && len > mtd->oobsize)
 		if (atmel_nand_dma_op(mtd, (void *)buf, len, 0) == 0)
 			return;
 
-- 
1.7.3.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-04-01 14:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30  8:26 [PATCH 1/3] MTD: atmel_nand: modify test case for using DMA operations Hong Xu
2011-03-30  8:26 ` [PATCH 2/3] MTD: atmel_nand: trivial: change DMA usage information trace Hong Xu
2011-04-01 12:51   ` Artem Bityutskiy
2011-03-30  8:26 ` [PATCH 3/3] MTD/atmel_nand: Fix support for CPUs that do not support DMA access Hong Xu
2011-04-01 12:54   ` Artem Bityutskiy
2011-04-01 13:37     ` Nicolas Ferre
2011-04-01 13:37       ` Artem Bityutskiy
2011-04-01 14:17       ` Artem Bityutskiy
2011-04-01 12:49 ` [PATCH 1/3] MTD: atmel_nand: modify test case for using DMA operations Artem Bityutskiy
2011-04-01 14:40   ` [PATCH 1/3 v2] " Nicolas Ferre
2011-04-01 13:36     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).