diff options
author | Hong Xu <hong.xu@atmel.com> | 2011-03-30 04:26:41 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-04-01 09:44:32 -0400 |
commit | cb457a4ddd4eeac9c81792a1e6a5d59b1b44abe1 (patch) | |
tree | 804630a6dd6919fb0fb5d7835f4bfdb480c81c6b /drivers/mtd | |
parent | 042bc9c0c434b61241ceda1d332e3076e2571859 (diff) |
mtd: atmel_nand: fix support for CPUs that do not support DMA access
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 7e88a801669c..f254fa636afc 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
@@ -599,7 +599,10 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
599 | nand_chip->options |= NAND_USE_FLASH_BBT; | 599 | nand_chip->options |= NAND_USE_FLASH_BBT; |
600 | } | 600 | } |
601 | 601 | ||
602 | if (cpu_has_dma() && use_dma) { | 602 | if (!cpu_has_dma()) |
603 | use_dma = 0; | ||
604 | |||
605 | if (use_dma) { | ||
603 | dma_cap_mask_t mask; | 606 | dma_cap_mask_t mask; |
604 | 607 | ||
605 | dma_cap_zero(mask); | 608 | dma_cap_zero(mask); |