mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
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: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
cb457a4ddd
commit
9d51567e47
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user