[PATCH 03/18] bsp/arm: Separate setup for translation table

Ralf Kirchner ralf.kirchner at embedded-brains.de
Fri Mar 7 13:59:07 UTC 2014


---
 .../lib/libbsp/arm/shared/include/arm-cp15-start.h |   26 ++++++++++++++++----
 1 Datei geändert, 21 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)

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 54f2963..a0fe9b1 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
@@ -129,12 +129,11 @@ arm_cp15_start_set_translation_table_entries(
 }
 
 BSP_START_TEXT_SECTION static inline void
-arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
-  uint32_t ctrl,
-  uint32_t *ttb,
-  uint32_t client_domain,
+arm_cp15_start_setup_translation_table(
+  uint32_t                            *ttb,
+  const uint32_t                       client_domain,
   const arm_cp15_start_section_config *config_table,
-  size_t config_count
+  const size_t                         config_count
 )
 {
   uint32_t dac = ARM_CP15_DAC_DOMAIN(client_domain, ARM_CP15_DAC_CLIENT);
@@ -151,7 +150,24 @@ arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
   for (i = 0; i < config_count; ++i) {
     arm_cp15_start_set_translation_table_entries(ttb, &config_table [i]);
   }
+}
 
+BSP_START_TEXT_SECTION static inline void
+arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
+  uint32_t ctrl,
+  uint32_t *ttb,
+  uint32_t client_domain,
+  const arm_cp15_start_section_config *config_table,
+  size_t config_count
+)
+{
+  arm_cp15_start_setup_translation_table(
+    ttb,
+    client_domain,
+    config_table,
+    config_count
+  );
+  
   /* Enable MMU and cache */
   ctrl |= ARM_CP15_CTRL_I | ARM_CP15_CTRL_C | ARM_CP15_CTRL_M;
 
-- 
1.7.10.4




More information about the devel mailing list