* [U-Boot] [PATCH] powerpc/85xx: Fix synchronization of timebase on MP boot
@ 2011-03-15 6:25 Kumar Gala
2011-03-15 6:36 ` Kumar Gala
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2011-03-15 6:25 UTC (permalink / raw)
To: u-boot
There is a small ordering issue in the master core in that we need to
make sure the disabling of the timebase in the SoC is visible before we
set the value to 0. We can simply just read back the value to
synchronizatize the write, before we set TB to 0.
Reported-by: Dan Hettena
Tested-by: Dan Hettena
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/cpu/mpc85xx/mp.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 6c0da83..758e6d7 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -276,8 +276,13 @@ static void plat_mp_up(unsigned long bootpg)
/* enable time base at the platform */
out_be32(&rcpm->ctbenrl, 0);
+
+ /* readback to sync write */
+ in_be32(&rcpm->ctbenrl);
+
mtspr(SPRN_TBWU, 0);
mtspr(SPRN_TBWL, 0);
+
out_be32(&rcpm->ctbenrl, (1 << nr_cpus) - 1);
#ifdef CONFIG_MPC8xxx_DISABLE_BPTR
@@ -347,6 +352,10 @@ static void plat_mp_up(unsigned long bootpg)
else
devdisr |= MPC85xx_DEVDISR_TB0;
out_be32(&gur->devdisr, devdisr);
+
+ /* readback to sync write */
+ in_be32(&gur->devdisr);
+
mtspr(SPRN_TBWU, 0);
mtspr(SPRN_TBWL, 0);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] powerpc/85xx: Fix synchronization of timebase on MP boot
2011-03-15 6:25 [U-Boot] [PATCH] powerpc/85xx: Fix synchronization of timebase on MP boot Kumar Gala
@ 2011-03-15 6:36 ` Kumar Gala
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2011-03-15 6:36 UTC (permalink / raw)
To: u-boot
On Mar 15, 2011, at 1:25 AM, Kumar Gala wrote:
> There is a small ordering issue in the master core in that we need to
> make sure the disabling of the timebase in the SoC is visible before we
> set the value to 0. We can simply just read back the value to
> synchronizatize the write, before we set TB to 0.
>
> Reported-by: Dan Hettena
> Tested-by: Dan Hettena
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/cpu/mpc85xx/mp.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
applied
- k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-15 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 6:25 [U-Boot] [PATCH] powerpc/85xx: Fix synchronization of timebase on MP boot Kumar Gala
2011-03-15 6:36 ` Kumar Gala
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.