uniphier: use enable_mmu() in common function

Currently, enable_mmu_el1() or enable_mmu_el3() is kept outside the
common function because the appropriate one must be chosen.

Use enable_mmu() and move it to the common function.

Change-Id: If2fb651691a7b6be05674f5cf730ae067ba95d4b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Masahiro Yamada 2020-03-26 13:18:48 +09:00 committed by Sandrine Bailleux
parent a5bb389a82
commit 2765ffdc99
4 changed files with 2 additions and 5 deletions

View File

@ -9,7 +9,6 @@
#include <platform_def.h>
#include <common/bl_common.h>
#include <lib/xlat_tables/xlat_mmu_helpers.h>
#include <plat/common/platform.h>
#include "../uniphier.h"
@ -32,5 +31,4 @@ void tsp_platform_setup(void)
void tsp_plat_arch_setup(void)
{
uniphier_mmap_setup(uniphier_soc);
enable_mmu_el1(0);
}

View File

@ -44,7 +44,6 @@ void bl2_el3_plat_arch_setup(void)
int ret;
uniphier_mmap_setup(uniphier_soc);
enable_mmu_el3(0);
/* add relocation offset (run-time-address - link-address) */
uniphier_mem_base += BL_CODE_BASE - BL2_BASE;

View File

@ -14,7 +14,6 @@
#include <common/debug.h>
#include <drivers/console.h>
#include <lib/mmio.h>
#include <lib/xlat_tables/xlat_mmu_helpers.h>
#include <plat/common/platform.h>
#include "uniphier.h"
@ -87,5 +86,4 @@ void bl31_platform_setup(void)
void bl31_plat_arch_setup(void)
{
uniphier_mmap_setup(uniphier_soc);
enable_mmu_el3(0);
}

View File

@ -63,4 +63,6 @@ void uniphier_mmap_setup(unsigned int soc)
MT_DEVICE | MT_RW | MT_SECURE);
init_xlat_tables();
enable_mmu(0);
}