blob: 3089592eb16bb8613faaa2ea90bf7055de458541 [file] [log] [blame]
Minkyu Kange3191f42009-12-18 15:03:51 +09001/*
2 * Copyright (C) 2009 Samsung Electronics
3 * Minkyu Kang <mk7.kang@samsung.com>
4 *
Steve Sakoman6329a8f2010-06-17 21:50:01 -07005 * based on arch/arm/cpu/armv7/omap3/cache.S
Minkyu Kange3191f42009-12-18 15:03:51 +09006 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Minkyu Kange3191f42009-12-18 15:03:51 +09008 */
9
Minkyu Kange3191f42009-12-18 15:03:51 +090010.align 5
Minkyu Kange3191f42009-12-18 15:03:51 +090011
Aneesh Vfd8798b2012-03-08 07:20:18 +000012#include <linux/linkage.h>
13
Aneesh V244fb892011-06-16 23:30:54 +000014#ifndef CONFIG_SYS_L2CACHE_OFF
Aneesh Vfd8798b2012-03-08 07:20:18 +000015ENTRY(v7_outer_cache_enable)
Minkyu Kange3191f42009-12-18 15:03:51 +090016 push {r0, r1, r2, lr}
17 mrc 15, 0, r3, cr1, cr0, 1
18 orr r3, r3, #2
19 mcr 15, 0, r3, cr1, cr0, 1
20 pop {r1, r2, r3, pc}
Aneesh Vfd8798b2012-03-08 07:20:18 +000021ENDPROC(v7_outer_cache_enable)
Minkyu Kange3191f42009-12-18 15:03:51 +090022
Aneesh Vfd8798b2012-03-08 07:20:18 +000023ENTRY(v7_outer_cache_disable)
Minkyu Kange3191f42009-12-18 15:03:51 +090024 push {r0, r1, r2, lr}
25 mrc 15, 0, r3, cr1, cr0, 1
26 bic r3, r3, #2
27 mcr 15, 0, r3, cr1, cr0, 1
28 pop {r1, r2, r3, pc}
Aneesh Vfd8798b2012-03-08 07:20:18 +000029ENDPROC(v7_outer_cache_disable)
Aneesh V244fb892011-06-16 23:30:54 +000030#endif