Commit 3965fa78 authored by Tom Rini's avatar Tom Rini

PPC32: Fix a rounding error in the bootwrapper udelay.

From Milton Miller.
parent 640b1c20
......@@ -198,7 +198,7 @@ udelay:
* timebase_period_ns defaults to 60 (16.6MHz) */
lis r5,timebase_period_ns@ha
lwz r5,timebase_period_ns@l(r5)
addi r4,r4,r5
add r4,r4,r5
addi r4,r4,-1
divw r4,r4,r5 /* BUS ticks */
1: mftbu r5
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment