From: Ed Swarthout Date: Thu, 9 Oct 2008 06:25:55 +0000 (-0500) Subject: fsl_law clear enable before changing. X-Git-Tag: v2009.01-rc1~157^2^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e1f7d22b8b52fc08c4d17a6a7db1e664281aed63;p=oweals%2Fu-boot.git 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 --- diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c index 64df1c9889..44c9e91cdb 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);