* Re: [PATCH 1/3 v2] MTD: atmel_nand: modify test case for using DMA operations
2011-04-01 14:40 ` [PATCH 1/3 v2] MTD: atmel_nand: modify test case for using DMA operations Nicolas Ferre
@ 2011-04-01 13:36 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2011-04-01 13:36 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: linux-mtd, linux-arm-kernel, linux-kernel, hong.xu
On Fri, 2011-04-01 at 16:40 +0200, Nicolas Ferre wrote:
> 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>
Pushed to l2-mtd-2.6.git, thank you!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/3 v2] MTD: atmel_nand: modify test case for using DMA operations
[not found] <1301662188.2789.57.camel@localhost>
@ 2011-04-01 14:40 ` Nicolas Ferre
2011-04-01 13:36 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Ferre @ 2011-04-01 14:40 UTC (permalink / raw)
To: dedekind1, linux-mtd, linux-arm-kernel
Cc: linux-kernel, hong.xu, Nicolas Ferre
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>
---
Artem,
Here is the v2 version with embedded comment as you suggested.
Best regards,
drivers/mtd/nand/atmel_nand.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 6fae04b..5872f2a 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -280,7 +280,8 @@ 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)
+ /* only use DMA for bigger than oob size: better performances */
if (atmel_nand_dma_op(mtd, buf, len, 1) == 0)
return;
@@ -295,7 +296,8 @@ 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)
+ /* only use DMA for bigger than oob size: better performances */
if (atmel_nand_dma_op(mtd, (void *)buf, len, 0) == 0)
return;
--
1.7.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-01 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1301662188.2789.57.camel@localhost>
2011-04-01 14:40 ` [PATCH 1/3 v2] MTD: atmel_nand: modify test case for using DMA operations 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