Minkyu Kang | e3191f4 | 2009-12-18 15:03:51 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 Samsung Electronics |
| 3 | * Minkyu Kang <mk7.kang@samsung.com> |
| 4 | * |
Steve Sakoman | 6329a8f | 2010-06-17 21:50:01 -0700 | [diff] [blame] | 5 | * based on arch/arm/cpu/armv7/omap3/cache.S |
Minkyu Kang | e3191f4 | 2009-12-18 15:03:51 +0900 | [diff] [blame] | 6 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Minkyu Kang | e3191f4 | 2009-12-18 15:03:51 +0900 | [diff] [blame] | 8 | */ |
| 9 | |
Minkyu Kang | e3191f4 | 2009-12-18 15:03:51 +0900 | [diff] [blame] | 10 | .align 5 |
Minkyu Kang | e3191f4 | 2009-12-18 15:03:51 +0900 | [diff] [blame] | 11 | |
Aneesh V | fd8798b | 2012-03-08 07:20:18 +0000 | [diff] [blame] | 12 | #include <linux/linkage.h> |
| 13 | |
Aneesh V | 244fb89 | 2011-06-16 23:30:54 +0000 | [diff] [blame] | 14 | #ifndef CONFIG_SYS_L2CACHE_OFF |
Aneesh V | fd8798b | 2012-03-08 07:20:18 +0000 | [diff] [blame] | 15 | ENTRY(v7_outer_cache_enable) |
Minkyu Kang | e3191f4 | 2009-12-18 15:03:51 +0900 | [diff] [blame] | 16 | 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 V | fd8798b | 2012-03-08 07:20:18 +0000 | [diff] [blame] | 21 | ENDPROC(v7_outer_cache_enable) |
Minkyu Kang | e3191f4 | 2009-12-18 15:03:51 +0900 | [diff] [blame] | 22 | |
Aneesh V | fd8798b | 2012-03-08 07:20:18 +0000 | [diff] [blame] | 23 | ENTRY(v7_outer_cache_disable) |
Minkyu Kang | e3191f4 | 2009-12-18 15:03:51 +0900 | [diff] [blame] | 24 | 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 V | fd8798b | 2012-03-08 07:20:18 +0000 | [diff] [blame] | 29 | ENDPROC(v7_outer_cache_disable) |
Aneesh V | 244fb89 | 2011-06-16 23:30:54 +0000 | [diff] [blame] | 30 | #endif |