/*
- * (C) Copyright 2007
- * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+ * (C) Copyright 2016 Vladimir Zapolskiy <vz@mleia.com>
+ * (C) Copyright 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#define CACHE_ENABLE 0
#define CACHE_DISABLE 1
-int cache_control(unsigned int cmd)
+static int cache_control(unsigned int cmd)
{
unsigned long ccr;
: "m" (__m(v)));
}
}
+
+void flush_cache(unsigned long addr, unsigned long size)
+{
+ flush_dcache_range(addr , addr + size);
+}
+
+void icache_enable(void)
+{
+ cache_control(CACHE_ENABLE);
+}
+
+void icache_disable(void)
+{
+ cache_control(CACHE_DISABLE);
+}
+
+int icache_status(void)
+{
+ return 0;
+}
+
+void dcache_enable(void)
+{
+}
+
+void dcache_disable(void)
+{
+}
+
+int dcache_status(void)
+{
+ return 0;
+}
#include <command.h>
#include <netdev.h>
#include <asm/processor.h>
-#include <asm/cache.h>
int checkcpu(void)
{
return 0;
}
-void flush_cache (unsigned long addr, unsigned long size)
-{
- flush_dcache_range(addr , addr + size);
-}
-
-void icache_enable (void)
-{
- cache_control(0);
-}
-
-void icache_disable (void)
-{
- cache_control(1);
-}
-
-int icache_status (void)
-{
- return 0;
-}
-
-void dcache_enable (void)
-{
-}
-
-void dcache_disable (void)
-{
-}
-
-int dcache_status (void)
-{
- return 0;
-}
-
int cpu_eth_init(bd_t *bis)
{
#ifdef CONFIG_SH_ETHER
#if defined(CONFIG_CPU_SH4)
-int cache_control(unsigned int cmd);
-
#define L1_CACHE_BYTES 32
struct __large_struct { unsigned long buf[100]; };