2222 * limitations under the License.
2323 */
2424
25+ #ifndef __CMSIS_CP15_H
26+ #define __CMSIS_CP15_H
27+
2528#if defined ( __ICCARM__ )
2629 #pragma system_include /* treat file as system include file for MISRA check */
2730#elif defined (__clang__ )
2831 #pragma clang system_header /* treat file as system include file */
2932#endif
3033
31- #ifndef __CMSIS_CP15_H
32- #define __CMSIS_CP15_H
33-
3434/** \brief Get ACTLR
3535 \return Auxiliary Control register value
3636 */
@@ -253,8 +253,7 @@ __STATIC_FORCEINLINE void __set_MVBAR(uint32_t mvbar)
253253 __set_CP (15 , 0 , mvbar , 12 , 0 , 1 );
254254}
255255
256- #if (defined(__CORTEX_A ) && (__CORTEX_A == 7U ) && \
257- defined(__TIM_PRESENT ) && (__TIM_PRESENT == 1U )) || \
256+ #if (defined(__TIM_PRESENT ) && (__TIM_PRESENT == 1U )) || \
258257 defined(DOXYGEN )
259258
260259/** \brief Set CNTFRQ
@@ -432,7 +431,6 @@ __STATIC_FORCEINLINE void __set_DCCIMVAC(uint32_t value)
432431 */
433432__STATIC_FORCEINLINE void __set_CSSELR (uint32_t value )
434433{
435- // __ASM volatile("MCR p15, 2, %0, c0, c0, 0" : : "r"(value) : "memory");
436434 __set_CP (15 , 2 , value , 0 , 0 , 0 );
437435}
438436
@@ -442,27 +440,16 @@ __STATIC_FORCEINLINE void __set_CSSELR(uint32_t value)
442440__STATIC_FORCEINLINE uint32_t __get_CSSELR (void )
443441{
444442 uint32_t result ;
445- // __ASM volatile("MRC p15, 2, %0, c0, c0, 0" : "=r"(result) : : "memory");
446443 __get_CP (15 , 2 , result , 0 , 0 , 0 );
447444 return result ;
448445}
449446
450- /** \brief Set CCSIDR
451- \deprecated CCSIDR itself is read-only. Use __set_CSSELR to select cache level instead.
452- */
453- CMSIS_DEPRECATED
454- __STATIC_FORCEINLINE void __set_CCSIDR (uint32_t value )
455- {
456- __set_CSSELR (value );
457- }
458-
459447/** \brief Get CCSIDR
460448 \return CCSIDR Register value
461449 */
462450__STATIC_FORCEINLINE uint32_t __get_CCSIDR (void )
463451{
464452 uint32_t result ;
465- // __ASM volatile("MRC p15, 1, %0, c0, c0, 0" : "=r"(result) : : "memory");
466453 __get_CP (15 , 1 , result , 0 , 0 , 0 );
467454 return result ;
468455}
@@ -473,7 +460,6 @@ __STATIC_FORCEINLINE uint32_t __get_CCSIDR(void)
473460__STATIC_FORCEINLINE uint32_t __get_CLIDR (void )
474461{
475462 uint32_t result ;
476- // __ASM volatile("MRC p15, 1, %0, c0, c0, 1" : "=r"(result) : : "memory");
477463 __get_CP (15 , 1 , result , 0 , 0 , 1 );
478464 return result ;
479465}
@@ -482,23 +468,20 @@ __STATIC_FORCEINLINE uint32_t __get_CLIDR(void)
482468 */
483469__STATIC_FORCEINLINE void __set_DCISW (uint32_t value )
484470{
485- // __ASM volatile("MCR p15, 0, %0, c7, c6, 2" : : "r"(value) : "memory")
486471 __set_CP (15 , 0 , value , 7 , 6 , 2 );
487472}
488473
489474/** \brief Set DCCSW
490475 */
491476__STATIC_FORCEINLINE void __set_DCCSW (uint32_t value )
492477{
493- // __ASM volatile("MCR p15, 0, %0, c7, c10, 2" : : "r"(value) : "memory")
494478 __set_CP (15 , 0 , value , 7 , 10 , 2 );
495479}
496480
497481/** \brief Set DCCISW
498482 */
499483__STATIC_FORCEINLINE void __set_DCCISW (uint32_t value )
500484{
501- // __ASM volatile("MCR p15, 0, %0, c7, c14, 2" : : "r"(value) : "memory")
502485 __set_CP (15 , 0 , value , 7 , 14 , 2 );
503486}
504487
0 commit comments