mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
2eb1573f01
commit
96805a529c
2 changed files with 19 additions and 11 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue