linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hong.xu@atmel.com (Hong Xu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] MTD/atmel_nand: Fix support for CPUs that do not support DMA access
Date: Wed, 30 Mar 2011 16:26:41 +0800	[thread overview]
Message-ID: <1301473601-29570-3-git-send-email-hong.xu@atmel.com> (raw)
In-Reply-To: <1301473601-29570-1-git-send-email-hong.xu@atmel.com>

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>
---
 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 c36ea50..1b43654 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)
 		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);
-- 
1.7.3.3

  parent reply	other threads:[~2011-03-30  8:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30  8:26 [PATCH 1/3] MTD: atmel_nand: modify test case for using DMA operations Hong Xu
2011-03-30  8:26 ` [PATCH 2/3] MTD: atmel_nand: trivial: change DMA usage information trace Hong Xu
2011-04-01 12:51   ` Artem Bityutskiy
2011-03-30  8:26 ` Hong Xu [this message]
2011-04-01 12:54   ` [PATCH 3/3] MTD/atmel_nand: Fix support for CPUs that do not support DMA access Artem Bityutskiy
2011-04-01 13:37     ` Nicolas Ferre
2011-04-01 13:37       ` Artem Bityutskiy
2011-04-01 14:17       ` Artem Bityutskiy
2011-04-01 12:49 ` [PATCH 1/3] MTD: atmel_nand: modify test case for using DMA operations Artem Bityutskiy
2011-04-01 14:40   ` [PATCH 1/3 v2] " Nicolas Ferre
2011-04-01 13:36     ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301473601-29570-3-git-send-email-hong.xu@atmel.com \
    --to=hong.xu@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).