@@ -51,6 +51,26 @@ ENTRY(v7_flush_dcache_louis)
b __flush_level
ENDPROC(v7_flush_dcache_louis)
+ /*
+ * v7_flush_dcache_level(level)
+ *
+ * Flush the D-cache the specified level passed as input parameter.
+ *
+ * r0 - cache level
+ *
+ * Corrupted registers: r0-r7, r9-r11 (r6 only in Thumb mode)
+ */
+
+ENTRY(v7_flush_dcache_level)
+ dmb @ ensure ordering with previous memory accesses
+ sub r10, r0, #1
+ mov r10, r10, lsl #1
+ movs r3, r0, lsl #1 @ level * 2
+ mrc p15, 1, r0, c0, c0, 1 @ read clidr
+ moveq pc, lr @ return if level == 0
+ b __flush_level
+ENDPROC(v7_flush_dcache_level)
+
/*
* v7_flush_dcache_all()
*