]> git.sur5r.net Git - u-boot/blobdiff - lib_blackfin/cache.c
Merge branch '080202_at91rm9200dk' of git://linux-arm.org/u-boot-armdev
[u-boot] / lib_blackfin / cache.c
index a15914b1098ded792ef48e787255fb131cfa7306..6fc4983772427dabc9ba474a9348f4f0f4e382a5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * U-boot - cache.c
  *
- * Copyright (c) 2005 blackfin.uclinux.org
+ * Copyright (c) 2005-2007 Analog Devices Inc.
  *
  * (C) Copyright 2000-2004
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
  */
 
 /* for now: just dummy functions to satisfy the linker */
 #include <config.h>
 #include <common.h>
 #include <asm/blackfin.h>
-
-extern void blackfin_icache_flush_range(unsigned long, unsigned long);
-extern void blackfin_dcache_flush_range(unsigned long, unsigned long);
+#include "cache.h"
 
 void flush_cache(unsigned long dummy1, unsigned long dummy2)
 {
-       if ((dummy1 >= L1_ISRAM) && (dummy1 < L1_ISRAM_END))
-               return;
-       if ((dummy1 >= DATA_BANKA_SRAM) && (dummy1 < DATA_BANKA_SRAM_END))
-               return;
-       if ((dummy1 >= DATA_BANKB_SRAM) && (dummy1 < DATA_BANKB_SRAM_END))
+       if (dummy1 >= 0xE0000000)
                return;
 
        if (icache_status())
-               blackfin_icache_flush_range(dummy1, dummy1 + dummy2);
+               blackfin_icache_flush_range((void*)dummy1, (void*)(dummy1 + dummy2));
        if (dcache_status())
-               blackfin_dcache_flush_range(dummy1, dummy1 + dummy2);
+               blackfin_dcache_flush_range((void*)dummy1, (void*)(dummy1 + dummy2));
 
        return;
 }