summaryrefslogtreecommitdiff
path: root/src/arch/ppc/lib/timebase.S
diff options
context:
space:
mode:
authorEswar Nallusamy <contacteswar@gmail.com>2005-11-02 17:32:49 +0000
committerEswar Nallusamy <contacteswar@gmail.com>2005-11-02 17:32:49 +0000
commited009371030cb97571c8b8dc342f16a9fa124d59 (patch)
tree3ff2d9e14f73cbb98b5706e837adb897eb5d3c3e /src/arch/ppc/lib/timebase.S
parent987ca8e08c3307e46dde3b35c6190c504f0cbf19 (diff)
ppc970 initial porting.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2082 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/ppc/lib/timebase.S')
-rw-r--r--src/arch/ppc/lib/timebase.S18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/arch/ppc/lib/timebase.S b/src/arch/ppc/lib/timebase.S
index 9e0b2a9290..43023c0418 100644
--- a/src/arch/ppc/lib/timebase.S
+++ b/src/arch/ppc/lib/timebase.S
@@ -28,8 +28,13 @@
/*
* unsigned long long _get_ticks(void);
*/
+#ifndef __PPC64__
.globl _get_ticks
_get_ticks:
+#else
+ .globl ._get_ticks
+._get_ticks:
+#endif
1: mftbu r3
mftb r4
mftbu r5
@@ -40,17 +45,30 @@ _get_ticks:
/*
* Delay for a number of ticks
*/
+#ifndef __PPC64__
.globl _wait_ticks
_wait_ticks:
+#else
+ .globl ._wait_ticks
+._wait_ticks:
+#endif
mflr r8 /* save link register */
mr r7, r3 /* save tick count */
+#ifndef __PPC64__
bl _get_ticks /* Get start time */
+#else
+ bl ._get_ticks /* Get start time */
+#endif
/* Calculate end time */
addc r7, r4, r7 /* Compute end time lower */
addze r6, r3 /* and end time upper */
+#ifndef __PPC64__
1: bl _get_ticks /* Get current time */
+#else
+1: bl ._get_ticks /* Get current time */
+#endif
subfc r4, r4, r7 /* Subtract current time from end time */
subfe. r3, r3, r6
bge 1b /* Loop until time expired */