[U-Boot] [PATCH] fsl_law clear enable before changing.

Ed Swarthout Ed.Swarthout at freescale.com
Thu Oct 9 08:25:55 CEST 2008


Debug sessions may have left enabled laws.
Changing lawbar with an unkown enabled tgtid could cause problems.

Signed-off-by: Ed Swarthout <Ed.Swarthout at freescale.com>
---
 drivers/misc/fsl_law.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 2e94614..80c1dc5 100644
--- a/drivers/misc/fsl_law.c
+++ b/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);
 
-- 
1.5.6.5



More information about the U-Boot mailing list