[U-Boot] [PATCH 2/2] 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.
Signed-off-by: Timur Tabi timur@freescale.com --- drivers/misc/fsl_law.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c index 147fe0a..7bdd355 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)

On Fri, Sep 4, 2009 at 5:05 PM, Timur Tabitimur@freescale.com wrote:
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.
Signed-off-by: Timur Tabi timur@freescale.com
Just FYI, there is no [PATCH 1/2].
Kumar, this changed appears to fix a real problem on the P4080.

On Fri, Sep 4, 2009 at 5:05 PM, Timur Tabitimur@freescale.com wrote:
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.
This should say, "code that attempts to use the new LAW-mapped memory right away might fail."

On Sep 4, 2009, at 5:05 PM, Timur Tabi wrote:
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.
Signed-off-by: Timur Tabi timur@freescale.com
drivers/misc/fsl_law.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Fixed commit wording.
applied to 85xx
- k
participants (2)
-
Kumar Gala
-
Timur Tabi