Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Nishanth Menon | aa0294e | 2015-03-09 17:11:59 -0500 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2015 Texas Insturments |
Nishanth Menon | aa0294e | 2015-03-09 17:11:59 -0500 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | /* |
| 7 | * CP15 specific code |
| 8 | */ |
| 9 | |
Nishanth Menon | aa0294e | 2015-03-09 17:11:59 -0500 | [diff] [blame] | 10 | #include <command.h> |
| 11 | #include <asm/system.h> |
| 12 | #include <asm/cache.h> |
| 13 | #include <asm/armv7.h> |
| 14 | #include <linux/compiler.h> |
| 15 | |
| 16 | void __weak v7_arch_cp15_set_l2aux_ctrl(u32 l2actlr, u32 cpu_midr, |
| 17 | u32 cpu_rev_comb, u32 cpu_variant, |
| 18 | u32 cpu_rev) |
| 19 | { |
| 20 | asm volatile ("mcr p15, 1, %0, c15, c0, 0\n\t" : : "r"(l2actlr)); |
| 21 | } |
Nishanth Menon | 071d6ce | 2015-03-09 17:12:00 -0500 | [diff] [blame] | 22 | |
| 23 | void __weak v7_arch_cp15_set_acr(u32 acr, u32 cpu_midr, u32 cpu_rev_comb, |
| 24 | u32 cpu_variant, u32 cpu_rev) |
| 25 | { |
| 26 | asm volatile ("mcr p15, 0, %0, c1, c0, 1\n\t" : : "r"(acr)); |
| 27 | } |