diff mbox

[U-Boot] blackfin: Add more dcache functions

Message ID 1404122412-4996-1-git-send-email-vvv444@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Vasili Galka June 30, 2014, 10 a.m. UTC
Add invalidate_dcache_range() and flush_dcache_range() for the blackfin
architecture. Such functions already exist on this arch with different
names, so just forward the call.

This fixes the build of bf609-ezkit board as it uses
drivers/net/designware.c which requires the above functions.

Cc: Sonic Zhang <sonic.adi@gmail.com>, Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vasili Galka <vvv444@gmail.com>
---
 arch/blackfin/lib/cache.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Comments

Tom Rini July 8, 2014, 1:38 a.m. UTC | #1
On Mon, Jun 30, 2014 at 01:00:12PM +0300, Vasili Galka wrote:

> Add invalidate_dcache_range() and flush_dcache_range() for the blackfin
> architecture. Such functions already exist on this arch with different
> names, so just forward the call.
> 
> This fixes the build of bf609-ezkit board as it uses
> drivers/net/designware.c which requires the above functions.
> 
> Cc: Sonic Zhang <sonic.adi@gmail.com>, Alexey Brodkin <abrodkin@synopsys.com>
> Signed-off-by: Vasili Galka <vvv444@gmail.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/blackfin/lib/cache.c b/arch/blackfin/lib/cache.c
index 0a321a4..e8a0cb5 100644
--- a/arch/blackfin/lib/cache.c
+++ b/arch/blackfin/lib/cache.c
@@ -111,3 +111,13 @@  int dcache_status(void)
 {
 	return bfin_read_DMEM_CONTROL() & ACACHE_BCACHE;
 }
+
+void invalidate_dcache_range(unsigned long start, unsigned long stop)
+{
+	blackfin_dcache_flush_invalidate_range((const void *)start, (const void *)stop);
+}
+
+void flush_dcache_range(unsigned long start, unsigned long stop)
+{
+	blackfin_dcache_flush_range((const void *)start, (const void *)stop);
+}