Commit 9d51567e authored by Nicolas Ferre's avatar Nicolas Ferre Committed by Artem Bityutskiy

mtd: atmel_nand: modify test case for using DMA operations

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: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent cb457a4d
...@@ -280,7 +280,8 @@ static void atmel_read_buf(struct mtd_info *mtd, u8 *buf, int len) ...@@ -280,7 +280,8 @@ static void atmel_read_buf(struct mtd_info *mtd, u8 *buf, int len)
struct nand_chip *chip = mtd->priv; struct nand_chip *chip = mtd->priv;
struct atmel_nand_host *host = chip->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) if (atmel_nand_dma_op(mtd, buf, len, 1) == 0)
return; return;
...@@ -295,7 +296,8 @@ static void atmel_write_buf(struct mtd_info *mtd, const u8 *buf, int len) ...@@ -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 nand_chip *chip = mtd->priv;
struct atmel_nand_host *host = chip->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) if (atmel_nand_dma_op(mtd, (void *)buf, len, 0) == 0)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment