Merge changes I256959d7,I721376bf into integration

* changes:
  fix(cpus): remove plat_can_cmo check for aarch32
  fix(cpus): update doc and check for plat_can_cmo
diff --git a/docs/getting_started/porting-guide.rst b/docs/getting_started/porting-guide.rst
index 7f38054..aa57e1d 100644
--- a/docs/getting_started/porting-guide.rst
+++ b/docs/getting_started/porting-guide.rst
@@ -1502,8 +1502,8 @@
 - This function indicates whether cache management operations should be
   performed. It returns 0 if CMOs should be skipped and non-zero
   otherwise.
-- The function must not clobber x2 and x3. It's also not safe to rely on stack.
-  Otherwise obey AAPCS.
+- The function must not clobber x1, x2 and x3. It's also not safe to rely on
+  stack. Otherwise obey AAPCS.
 
 Modifications specific to a Boot Loader stage
 ---------------------------------------------
diff --git a/lib/aarch32/cache_helpers.S b/lib/aarch32/cache_helpers.S
index fd9b33f..13d1872 100644
--- a/lib/aarch32/cache_helpers.S
+++ b/lib/aarch32/cache_helpers.S
@@ -37,27 +37,12 @@
 	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
 
@@ -67,7 +52,6 @@
 	 * ------------------------------------------
 	 */
 func clean_dcache_range
-	check_plat_can_cmo
 	do_dcache_maintenance_by_mva cmvac, DCCMVAC
 endfunc clean_dcache_range
 
@@ -77,7 +61,6 @@
 	 * ------------------------------------------
 	 */
 func inv_dcache_range
-	check_plat_can_cmo
 	do_dcache_maintenance_by_mva imvac, DCIMVAC
 endfunc inv_dcache_range
 
@@ -185,7 +168,6 @@
 	 * ---------------------------------------------------------------
 	 */
 func dcsw_op_louis
-	check_plat_can_cmo
 	dcsw_op #LOUIS_SHIFT, #CLIDR_FIELD_WIDTH, #LEVEL_SHIFT
 endfunc	dcsw_op_louis
 
@@ -198,7 +180,6 @@
 	 * ---------------------------------------------------------------
 	 */
 func dcsw_op_all
-	check_plat_can_cmo
 	dcsw_op #LOC_SHIFT, #CLIDR_FIELD_WIDTH, #LEVEL_SHIFT
 endfunc	dcsw_op_all
 
@@ -224,7 +205,6 @@
 	 * ---------------------------------------------------------------
 	 */
 func dcsw_op_level1
-	check_plat_can_cmo
 	dcsw_op_level #(1 << LEVEL_SHIFT)
 endfunc dcsw_op_level1
 
@@ -237,7 +217,6 @@
 	 * ---------------------------------------------------------------
 	 */
 func dcsw_op_level2
-	check_plat_can_cmo
 	dcsw_op_level #(2 << LEVEL_SHIFT)
 endfunc dcsw_op_level2
 
@@ -250,6 +229,5 @@
 	 * ---------------------------------------------------------------
 	 */
 func dcsw_op_level3
-	check_plat_can_cmo
 	dcsw_op_level #(3 << LEVEL_SHIFT)
 endfunc dcsw_op_level3
diff --git a/lib/aarch64/cache_helpers.S b/lib/aarch64/cache_helpers.S
index 67fafb1..314ed6e 100644
--- a/lib/aarch64/cache_helpers.S
+++ b/lib/aarch64/cache_helpers.S
@@ -217,6 +217,7 @@
 
 
 func dcsw_op_louis
+	check_plat_can_cmo
 	dcsw_op #LOUIS_SHIFT, #CLIDR_FIELD_WIDTH, #LEVEL_SHIFT
 endfunc dcsw_op_louis