summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2009-09-04 17:05:24 -0500
committerKumar Gala <galak@kernel.crashing.org>2009-09-08 09:10:06 -0500
commit74c5dfd81f94a2a1f0d6990d17c491d718e8b9ea (patch)
tree9f6baf00f502561336e9ad55cbe5fda05e9ede6d /drivers
parentc7259086816405fe0eb77f4dc22e76980a040cef (diff)
downloadblackbird-obmc-uboot-74c5dfd81f94a2a1f0d6990d17c491d718e8b9ea.tar.gz
blackbird-obmc-uboot-74c5dfd81f94a2a1f0d6990d17c491d718e8b9ea.zip
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 <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/fsl_law.c3
1 files changed, 2 insertions, 1 deletions
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)
OpenPOWER on IntegriCloud