Changeset 55741886 in rtems
- Timestamp:
- 11/19/14 13:19:13 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 52d24b00
- Parents:
- d53de34
- git-author:
- Sebastian Huber <sebastian.huber@…> (11/19/14 13:19:13)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (11/20/14 09:30:28)
- Location:
- c/src/lib/libbsp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h
rd53de34 r55741886 154 154 uint32_t ctrl; /* Control */ 155 155 /** @brief Enables the L2CC */ 156 #define L2C_310_ENABLE_MASK 0x00000001 156 #define L2C_310_CTRL_ENABLE 0x00000001 157 158 #define L2C_310_CTRL_EXCL_CONFIG (1 << 12) 157 159 158 160 /** @brief Auxiliary control */ … … 963 965 964 966 /* Only flush if level 2 cache is active */ 965 if( ( l2cc->ctrl & L2C_310_ ENABLE_MASK) != 0 ) {967 if( ( l2cc->ctrl & L2C_310_CTRL_ENABLE ) != 0 ) { 966 968 967 969 /* ensure ordering with previous memory accesses */ … … 1031 1033 rtems_interrupt_lock_context lock_context; 1032 1034 1033 if( ( l2cc->ctrl & L2C_310_ ENABLE_MASK) != 0 ) {1035 if( ( l2cc->ctrl & L2C_310_CTRL_ENABLE ) != 0 ) { 1034 1036 /* Invalidate the caches */ 1035 1037 … … 1153 1155 uint32_t id_mask = 1154 1156 L2C_310_ID_IMPL_MASK | L2C_310_ID_PART_MASK; 1157 uint32_t ctrl; 1155 1158 1156 1159 /* … … 1167 1170 l2c_310_check_errata( rtl_release ); 1168 1171 1172 ctrl = l2cc->ctrl; 1173 1174 if ( ( ctrl & L2C_310_CTRL_EXCL_CONFIG ) != 0 ) { 1175 bsp_fatal( ARM_FATAL_L2C_310_EXCLUSIVE_CONFIG ); 1176 } 1177 1169 1178 /* Only enable if L2CC is currently disabled */ 1170 if( ( l2cc->ctrl & L2C_310_ENABLE_MASK) == 0 ) {1179 if( ( ctrl & L2C_310_CTRL_ENABLE ) == 0 ) { 1171 1180 uint32_t aux_ctrl; 1172 1181 int ways; … … 1205 1214 1206 1215 /* Enable the L2CC */ 1207 l2cc->ctrl |= L2C_310_ENABLE_MASK;1216 l2cc->ctrl = ctrl | L2C_310_CTRL_ENABLE; 1208 1217 } 1209 1218 } … … 1215 1224 rtems_interrupt_lock_context lock_context; 1216 1225 1217 if ( l2cc->ctrl & L2C_310_ ENABLE_MASK) {1226 if ( l2cc->ctrl & L2C_310_CTRL_ENABLE ) { 1218 1227 /* Clean and Invalidate L2 Cache */ 1219 1228 l2c_310_flush_entire(); … … 1223 1232 1224 1233 /* Disable the L2 cache */ 1225 l2cc->ctrl &= ~L2C_310_ ENABLE_MASK;1234 l2cc->ctrl &= ~L2C_310_CTRL_ENABLE; 1226 1235 rtems_interrupt_lock_release( &l2c_310_lock, &lock_context ); 1227 1236 } -
c/src/lib/libbsp/shared/include/fatal.h
rd53de34 r55741886 111 111 /* ARM fatal codes */ 112 112 ARM_FATAL_L2C_310_UNEXPECTED_ID = BSP_FATAL_CODE_BLOCK(9), 113 ARM_FATAL_L2C_310_UNEXPECTED_NUM_WAYS 113 ARM_FATAL_L2C_310_UNEXPECTED_NUM_WAYS, 114 ARM_FATAL_L2C_310_EXCLUSIVE_CONFIG 114 115 } bsp_fatal_code; 115 116
Note: See TracChangeset
for help on using the changeset viewer.