fsl_law clear enable before changing.
Debug sessions may have left enabled laws.
Changing lawbar with an unkown enabled tgtid could cause problems.
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 64df1c9..44c9e91 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -52,6 +52,7 @@
gd->used_laws |= (1 << idx);
+ out_be32(lawar, 0);
out_be32(lawbar, addr >> 12);
out_be32(lawar, LAWAR_EN | ((u32)id << 20) | (u32)sz);