Merge branch 'next' of git://git.denx.de/u-boot-avr32
[platform/kernel/u-boot.git] / cpu / mpc86xx / cache.S
index f316b3e..80ff688 100644 (file)
@@ -232,6 +232,10 @@ _GLOBAL(icache_enable)
  * Disable L1 Instruction cache
  */
 _GLOBAL(icache_disable)
+       mflr    r4
+       bl      invalidate_l1_instruction_cache         /* uses r3 */
+       sync
+       mtlr    r4
        mfspr   r3, HID0
        li      r5, 0
        ori     r5, r5, HID0_ICE
@@ -338,7 +342,7 @@ _GLOBAL(l2cache_invalidate)
 
 invl2:
        mfspr   r3, l2cr
-       andi  r3, r3, L2CR_L2I@h
+       andis.  r3, r3, L2CR_L2I@h
        bne     invl2
        blr