summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/mmu.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-03-15 12:40:47 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-04-04 07:44:27 +0200
commit686cf3c05672821e949333feade826972af2d307 (patch)
tree5ff3b02751ac0f39ea5673dc446744244b8ba89e /arch/arm/cpu/mmu.h
parent4b57aae26c0ada3139ccb1011bdcbd88dc7e1a91 (diff)
downloadbarebox-686cf3c05672821e949333feade826972af2d307.tar.gz
barebox-686cf3c05672821e949333feade826972af2d307.tar.xz
ARM: create separate mmu_64.h file
cpu/mmu.h has nothing in common for the 32bit and 64bit variant. Make it two separate files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu/mmu.h')
-rw-r--r--arch/arm/cpu/mmu.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/arch/arm/cpu/mmu.h b/arch/arm/cpu/mmu.h
index 5803cb6a83..79ebc80d7d 100644
--- a/arch/arm/cpu/mmu.h
+++ b/arch/arm/cpu/mmu.h
@@ -1,53 +1,6 @@
#ifndef __ARM_MMU_H
#define __ARM_MMU_H
-#ifdef CONFIG_CPU_64v8
-
-#ifndef __ASSEMBLY__
-
-static inline void set_ttbr_tcr_mair(int el, uint64_t table, uint64_t tcr, uint64_t attr)
-{
- asm volatile("dsb sy");
- if (el == 1) {
- asm volatile("msr ttbr0_el1, %0" : : "r" (table) : "memory");
- asm volatile("msr tcr_el1, %0" : : "r" (tcr) : "memory");
- asm volatile("msr mair_el1, %0" : : "r" (attr) : "memory");
- } else if (el == 2) {
- asm volatile("msr ttbr0_el2, %0" : : "r" (table) : "memory");
- asm volatile("msr tcr_el2, %0" : : "r" (tcr) : "memory");
- asm volatile("msr mair_el2, %0" : : "r" (attr) : "memory");
- } else if (el == 3) {
- asm volatile("msr ttbr0_el3, %0" : : "r" (table) : "memory");
- asm volatile("msr tcr_el3, %0" : : "r" (tcr) : "memory");
- asm volatile("msr mair_el3, %0" : : "r" (attr) : "memory");
- } else {
- hang();
- }
- asm volatile("isb");
-}
-
-static inline uint64_t get_ttbr(int el)
-{
- uint64_t val;
- if (el == 1) {
- asm volatile("mrs %0, ttbr0_el1" : "=r" (val));
- } else if (el == 2) {
- asm volatile("mrs %0, ttbr0_el2" : "=r" (val));
- } else if (el == 3) {
- asm volatile("mrs %0, ttbr0_el3" : "=r" (val));
- } else {
- hang();
- }
-
- return val;
-}
-
-void mmu_early_enable(uint64_t membase, uint64_t memsize, uint64_t _ttb);
-
-#endif
-
-#endif /* CONFIG_CPU_64v8 */
-
#ifdef CONFIG_MMU
void __mmu_cache_on(void);
void __mmu_cache_off(void);