From: Timur Tabi Date: Fri, 4 Sep 2009 22:05:24 +0000 (-0500) Subject: fsl: add register read-back to set_law() X-Git-Tag: v2010.09-rc1~28^2~7^2~42^2~149 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=16d4813717666dabd04115e70714928bdad0456a;p=u-boot fsl: add register read-back to set_law() After programming a new LAW, we should read-back the LAWAR register so that we sync the writes. Otherwise, code that attempts to use the new LAW-mapped memory might fail right away. Signed-off-by: Timur Tabi Signed-off-by: Kumar Gala --- diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c index 147fe0a21c..7bdd355c74 100644 --- a/drivers/misc/fsl_law.c +++ b/drivers/misc/fsl_law.c @@ -58,7 +58,8 @@ void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum law_trgt_if id) out_be32(lawbar, addr >> 12); out_be32(lawar, LAWAR_EN | ((u32)id << 20) | (u32)sz); - return ; + /* Read back so that we sync the writes */ + in_be32(lawar); } int set_next_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)