Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb457a4d authored by Hong Xu's avatar Hong Xu Committed by Artem Bityutskiy
Browse files

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: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: default avatarHong Xu <hong.xu@atmel.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 042bc9c0
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -599,7 +599,10 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
		nand_chip->options |= NAND_USE_FLASH_BBT;
		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_mask_t mask;


		dma_cap_zero(mask);
		dma_cap_zero(mask);