]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/arc/lib/cache.c
ARCv2: SLC: Make sure busy bit is set properly on SLC flushing
[people/ms/u-boot.git] / arch / arc / lib / cache.c
index b6ec83112cd8aa5264d9572c9ef97fbf0f9462ce..f1436bf199925177d0bf929b76dd2eda98bf1a10 100644 (file)
@@ -59,10 +59,16 @@ static unsigned int __before_slc_op(const int op)
 
 static void __after_slc_op(const int op, unsigned int reg)
 {
-       if (op & OP_FLUSH)      /* flush / flush-n-inv both wait */
+       if (op & OP_FLUSH) {    /* flush / flush-n-inv both wait */
+               /*
+                * Make sure "busy" bit reports correct status,
+                * see STAR 9001165532
+                */
+               read_aux_reg(ARC_AUX_SLC_CTRL);
                while (read_aux_reg(ARC_AUX_SLC_CTRL) &
                       DC_CTRL_FLUSH_STATUS)
                        ;
+       }
 
        /* Switch back to default Invalidate mode */
        if (op == OP_INV)