bx lr
.endm
-.macro check_plat_can_cmo
-#if CONDITIONAL_CMO
- mov r3, lr
- mov r2, r0
- bl plat_can_cmo
- mov lr, r3
- cmp r0, #0
- bne 1f
- bx lr
-1:
- mov r0, r2
-#endif
-.endm
-
/* ------------------------------------------
* Clean+Invalidate from base address till
* size. 'r0' = addr, 'r1' = size
* ------------------------------------------
*/
func flush_dcache_range
- check_plat_can_cmo
do_dcache_maintenance_by_mva cimvac, DCCIMVAC
endfunc flush_dcache_range
* ------------------------------------------
*/
func clean_dcache_range
- check_plat_can_cmo
do_dcache_maintenance_by_mva cmvac, DCCMVAC
endfunc clean_dcache_range
* ------------------------------------------
*/
func inv_dcache_range
- check_plat_can_cmo
do_dcache_maintenance_by_mva imvac, DCIMVAC
endfunc inv_dcache_range
* ---------------------------------------------------------------
*/
func dcsw_op_louis
- check_plat_can_cmo
dcsw_op #LOUIS_SHIFT, #CLIDR_FIELD_WIDTH, #LEVEL_SHIFT
endfunc dcsw_op_louis
* ---------------------------------------------------------------
*/
func dcsw_op_all
- check_plat_can_cmo
dcsw_op #LOC_SHIFT, #CLIDR_FIELD_WIDTH, #LEVEL_SHIFT
endfunc dcsw_op_all
* ---------------------------------------------------------------
*/
func dcsw_op_level1
- check_plat_can_cmo
dcsw_op_level #(1 << LEVEL_SHIFT)
endfunc dcsw_op_level1
* ---------------------------------------------------------------
*/
func dcsw_op_level2
- check_plat_can_cmo
dcsw_op_level #(2 << LEVEL_SHIFT)
endfunc dcsw_op_level2
* ---------------------------------------------------------------
*/
func dcsw_op_level3
- check_plat_can_cmo
dcsw_op_level #(3 << LEVEL_SHIFT)
endfunc dcsw_op_level3