summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-27 18:58:42 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-27 18:58:42 +0100
commit09d0c96b915cbc09625860985c7846f67885bacc (patch)
treedfc87ad5a03581ca923789ce2870c996888b1037
parent0f874ee501262436ffdfe6ac84a09b9f0628b286 (diff)
downloadrtems-09d0c96b915cbc09625860985c7846f67885bacc.tar.bz2
bsps/arm: Move some MMU bit settings
The function arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache() must only set the MMU and cache enable flags. Configuration flags must be set elsewhere.
-rw-r--r--c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h3
-rw-r--r--c/src/lib/libbsp/arm/shared/mminit.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
index b5d5de8e54..dafad80a42 100644
--- a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
+++ b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
@@ -100,8 +100,7 @@ arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
}
/* Enable MMU and cache */
- ctrl |= ARM_CP15_CTRL_AFE | ARM_CP15_CTRL_S | ARM_CP15_CTRL_I |
- ARM_CP15_CTRL_C | ARM_CP15_CTRL_M | ARM_CP15_CTRL_XP;
+ ctrl |= ARM_CP15_CTRL_I | ARM_CP15_CTRL_C | ARM_CP15_CTRL_M;
arm_cp15_set_control(ctrl);
}
diff --git a/c/src/lib/libbsp/arm/shared/mminit.c b/c/src/lib/libbsp/arm/shared/mminit.c
index 23e71e62a7..5a4240c78b 100644
--- a/c/src/lib/libbsp/arm/shared/mminit.c
+++ b/c/src/lib/libbsp/arm/shared/mminit.c
@@ -14,6 +14,8 @@ BSP_START_TEXT_SECTION void bsp_memory_management_initialize(void)
{
uint32_t ctrl = arm_cp15_get_control();
+ ctrl |= ARM_CP15_CTRL_AFE | ARM_CP15_CTRL_S | ARM_CP15_CTRL_XP;
+
arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
ctrl,
(uint32_t *) bsp_translation_table_base,