|
@@ -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;
|
|
|
|