[U-Boot] [PATCH][for 1.3.5] 85xx: Ensure timebase is zero on secondary cores

The e500um says the timebase is volatile out of reset. To ensure TB sync works we need to make sure its zero.
Signed-off-by: Kumar Gala galak@kernel.crashing.org --- cpu/mpc85xx/release.S | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/cpu/mpc85xx/release.S b/cpu/mpc85xx/release.S index 75676b5..2ae6057 100644 --- a/cpu/mpc85xx/release.S +++ b/cpu/mpc85xx/release.S @@ -37,6 +37,11 @@ __secondary_start_page: li r3,0x201 mtspr SPRN_BUCSR,r3
+ /* Ensure TB is 0 */ + li r3,0 + mttbu r3 + mttbl r3 + /* Enable/invalidate the I-Cache */ mfspr r0,SPRN_L1CSR1 ori r0,r0,(L1CSR1_ICFI|L1CSR1_ICE)

On Fri, Sep 05, 2008 at 08:45:11AM -0500, Kumar Gala wrote:
diff --git a/cpu/mpc85xx/release.S b/cpu/mpc85xx/release.S index 75676b5..2ae6057 100644 --- a/cpu/mpc85xx/release.S +++ b/cpu/mpc85xx/release.S @@ -37,6 +37,11 @@ __secondary_start_page: li r3,0x201 mtspr SPRN_BUCSR,r3
- /* Ensure TB is 0 */
- li r3,0
- mttbu r3
- mttbl r3
If it's possible that TBL is a small negative number out of reset, then we should write TBL before TBU to avoid a rollover race.
-Scott

On Sep 5, 2008, at 11:10 AM, Scott Wood wrote:
On Fri, Sep 05, 2008 at 08:45:11AM -0500, Kumar Gala wrote:
diff --git a/cpu/mpc85xx/release.S b/cpu/mpc85xx/release.S index 75676b5..2ae6057 100644 --- a/cpu/mpc85xx/release.S +++ b/cpu/mpc85xx/release.S @@ -37,6 +37,11 @@ __secondary_start_page: li r3,0x201 mtspr SPRN_BUCSR,r3
- /* Ensure TB is 0 */
- li r3,0
- mttbu r3
- mttbl r3
If it's possible that TBL is a small negative number out of reset, then we should write TBL before TBU to avoid a rollover race.
Time base is disabled at this point, so it should be moving AT ALL.
- k

Dear Kumar Gala,
In message 31141755-2866-4C60-B179-F34E3E4646B4@kernel.crashing.org you wrote:
- /* Ensure TB is 0 */
- li r3,0
- mttbu r3
- mttbl r3
If it's possible that TBL is a small negative number out of reset, then we should write TBL before TBU to avoid a rollover race.
Time base is disabled at this point, so it should be moving AT ALL.
But swapping the two insns shouldn't hurt either.
Best regards,
Wolfgang Denk
participants (3)
-
Kumar Gala
-
Scott Wood
-
Wolfgang Denk