Skip to content

Commit

Permalink
mtd: atmel_nand: fix support for CPUs that do not support DMA access
Browse files Browse the repository at this point in the history
use_dma was always "1" even if the CPU does not support DMA

Tested on AT91SAM9261EK by Jean-Christophe PLAGNIOL-VILLARD

Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Hong Xu authored and Artem Bityutskiy committed Apr 1, 2011
1 parent 042bc9c commit cb457a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/mtd/nand/atmel_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,10 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
nand_chip->options |= NAND_USE_FLASH_BBT;
}

if (cpu_has_dma() && use_dma) {
if (!cpu_has_dma())
use_dma = 0;

if (use_dma) {
dma_cap_mask_t mask;

dma_cap_zero(mask);
Expand Down

0 comments on commit cb457a4

Please sign in to comment.