Browse Source

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>
Ed Swarthout 16 years ago
parent
commit
e1f7d22b8b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/misc/fsl_law.c

+ 1 - 0
drivers/misc/fsl_law.c

@@ -52,6 +52,7 @@ void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 
 	gd->used_laws |= (1 << idx);
 
+	out_be32(lawar, 0);
 	out_be32(lawbar, addr >> 12);
 	out_be32(lawar, LAWAR_EN | ((u32)id << 20) | (u32)sz);