[rtems commit] bsps/arm: Fix get cache size

Sebastian Huber sebh at rtems.org
Wed Sep 10 09:21:28 UTC 2014


Module:    rtems
Branch:    master
Commit:    12ab8d67e437dda2132a0b2f6a76605a6b34c17c
Changeset: http://git.rtems.org/rtems/commit/?id=12ab8d67e437dda2132a0b2f6a76605a6b34c17c

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Sep 10 11:15:44 2014 +0200

bsps/arm: Fix get cache size

---

 c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h b/c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h
index f88608a..e61749e 100644
--- a/c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h
+++ b/c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h
@@ -1517,10 +1517,11 @@ _CPU_cache_get_data_cache_size( const uint32_t level )
   
   switch( level )
   {
-    case 0:
+    case 1:
       size = arm_cache_l1_get_data_cache_size();
     break;
-    case 1:
+    case 0:
+    case 2:
       size = cache_l2c_310_get_cache_size();
     break;
     default:
@@ -1537,10 +1538,11 @@ _CPU_cache_get_instruction_cache_size( const uint32_t level )
   
   switch( level )
   {
-    case 0:
+    case 1:
       size = arm_cache_l1_get_instruction_cache_size();
       break;
-    case 1:
+    case 0:
+    case 2:
       size = cache_l2c_310_get_cache_size();
       break;
     default:



More information about the vc mailing list