]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - lib_blackfin/cache.c
Blackfin: cleanup lib_blackfin/cache.c
[karo-tx-uboot.git] / lib_blackfin / cache.c
1 /*
2  * U-boot - cache.c
3  *
4  * Copyright (c) 2005-2008 Analog Devices Inc.
5  *
6  * (C) Copyright 2000-2004
7  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
8  *
9  * Licensed under the GPL-2 or later.
10  */
11
12 #include <common.h>
13 #include <asm/blackfin.h>
14
15 void flush_cache(unsigned long addr, unsigned long size)
16 {
17         /* no need to flush stuff in on chip memory (L1/L2/etc...) */
18         if (addr >= 0xE0000000)
19                 return;
20
21         if (icache_status())
22                 blackfin_icache_flush_range((void *)addr, (void *)(addr + size));
23
24         if (dcache_status())
25                 blackfin_dcache_flush_range((void *)addr, (void *)(addr + size));
26 }