diff options
author | Timur Tabi <timur@freescale.com> | 2010-12-14 17:18:51 -0600 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-12-17 21:18:08 +0100 |
commit | 96805a529c3ce366f3ecfd58a8b72ec21432af1c (patch) | |
tree | 4ac41188bab2157146c8273b3d0e0dbe60e452d0 /arch/powerpc/lib/time.c | |
parent | 2eb1573f01710832bbe60a4ece89cb301727612a (diff) | |
download | u-boot-imx-96805a529c3ce366f3ecfd58a8b72ec21432af1c.zip u-boot-imx-96805a529c3ce366f3ecfd58a8b72ec21432af1c.tar.gz u-boot-imx-96805a529c3ce366f3ecfd58a8b72ec21432af1c.tar.bz2 |
powerpc: fix register usage in some inline assembly code
In some usages of inline assembly, hard-coded registers were
specified when a scratch register should have been used instead.
Signed-off-by: Timur Tabi <timur@freescale.com>
Diffstat (limited to 'arch/powerpc/lib/time.c')
-rw-r--r-- | arch/powerpc/lib/time.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c index 2909961..34633c3 100644 --- a/arch/powerpc/lib/time.c +++ b/arch/powerpc/lib/time.c @@ -78,6 +78,8 @@ unsigned long ticks2usec(unsigned long ticks) int init_timebase (void) { + unsigned long temp; + #if defined(CONFIG_5xx) || defined(CONFIG_8xx) volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; @@ -86,7 +88,8 @@ int init_timebase (void) #endif /* reset */ - asm ("li 3,0 ; mttbu 3 ; mttbl 3 ;"); + asm volatile("li %0,0 ; mttbu %0 ; mttbl %0;" + : "=&r"(temp) ); #if defined(CONFIG_5xx) || defined(CONFIG_8xx) /* enable */ |