blob: 25690ee16e01b46ccbf5e08cbea77c01f225edc9 [file] [log] [blame]
Alexey Brodkin3fb80162015-02-24 19:40:36 +03001/*
2 * Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8
9DECLARE_GLOBAL_DATA_PTR;
10
11int init_cache_f_r(void)
12{
13#ifndef CONFIG_SYS_ICACHE_OFF
14 icache_enable();
15 /* Make sure no stale entries persist from before we disabled cache */
16 invalidate_icache_all();
17#endif
18
19#ifndef CONFIG_SYS_DCACHE_OFF
20 dcache_enable();
21 /* Make sure no stale entries persist from before we disabled cache */
22 invalidate_dcache_all();
23#endif
24 return 0;
25}