summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/board_r.c2
-rw-r--r--drivers/block/blkcache.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 4f56c19fcc..0bbeaa7594 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -865,7 +865,7 @@ static init_fnc_t init_sequence_r[] = {
#if defined(CONFIG_PRAM)
initr_mem,
#endif
-#ifdef CONFIG_BLOCK_CACHE
+#if defined(CONFIG_M68K) && defined(CONFIG_BLOCK_CACHE)
blkcache_init,
#endif
run_main_loop,
diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
index f603aa129d..ea40929e3e 100644
--- a/drivers/block/blkcache.c
+++ b/drivers/block/blkcache.c
@@ -21,19 +21,25 @@ struct block_cache_node {
char *cache;
};
+#ifndef CONFIG_M68K
+static LIST_HEAD(block_cache);
+#else
static struct list_head block_cache;
+#endif
static struct block_cache_stats _stats = {
.max_blocks_per_entry = 8,
.max_entries = 32
};
+#ifdef CONFIG_M68K
int blkcache_init(void)
{
INIT_LIST_HEAD(&block_cache);
return 0;
}
+#endif
static struct block_cache_node *cache_find(int iftype, int devnum,
lbaint_t start, lbaint_t blkcnt,