mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: franck.jullien@gmail.com
To: barebox@lists.infradead.org
Subject: [PATCH 5/5] [Nios2]: Fix dma mapping end address
Date: Sun, 15 May 2011 21:34:32 +0200	[thread overview]
Message-ID: <1305488072-1765-6-git-send-email-franck.jullien@gmail.com> (raw)
In-Reply-To: <1305488072-1765-1-git-send-email-franck.jullien@gmail.com>

From: Franck JULLIEN <franck.jullien@gmail.com>

The flush_dcache_range function takes an absolute end address
so we have to add start address to the second parameter.

Signed-off-by: Franck JULLIEN <franck.jullien@gmail.com>
---
 arch/nios2/include/asm/dma-mapping.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h
index 49ebf79..5b70f4c 100644
--- a/arch/nios2/include/asm/dma-mapping.h
+++ b/arch/nios2/include/asm/dma-mapping.h
@@ -15,7 +15,7 @@ static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
 	void *addr = malloc(len + DCACHE_LINE_SIZE);
 	if (!addr)
 		return 0;
-	flush_dcache_range((unsigned long)addr, len + DCACHE_LINE_SIZE);
+	flush_dcache_range((unsigned long)addr,(unsigned long)addr + len + DCACHE_LINE_SIZE);
 	*handle = ((unsigned long)addr +
 		   (DCACHE_LINE_SIZE - 1)) &
 		~(DCACHE_LINE_SIZE - 1) & ~(IO_REGION_BASE);
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2011-05-15 19:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-15 19:34 [PATCH 0/5] [Nios2]: Differents fixes franck.jullien
2011-05-15 19:34 ` [PATCH 1/5] [Nios2]: Update generic env/config franck.jullien
2011-05-15 19:34 ` [PATCH 2/5] [Nios2]: Fix typo in generic.c franck.jullien
2011-05-15 19:34 ` [PATCH 3/5] [Nios2]: Change system frequency in generic board franck.jullien
2011-05-15 19:34 ` [PATCH 4/5] [Nios2]: Fix compiler warning franck.jullien
2011-05-15 19:34 ` franck.jullien [this message]

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=1305488072-1765-6-git-send-email-franck.jullien@gmail.com \
    --to=franck.jullien@gmail.com \
    --cc=barebox@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