Skip to content
Snippets Groups Projects
Commit f472069f authored by Stefan Roese's avatar Stefan Roese
Browse files

ppc4xx: Change tsr/tcr macros to upper case


Remove uneccessary functions to access the TCR/TSR registers as well.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 11c8dd36
Branches
Tags
No related merge requests found
...@@ -342,7 +342,7 @@ cpu_init_f (void) ...@@ -342,7 +342,7 @@ cpu_init_f (void)
#endif #endif
#if defined(CONFIG_WATCHDOG) #if defined(CONFIG_WATCHDOG)
val = mfspr(tcr); val = mfspr(SPRN_TCR);
#if defined(CONFIG_440EP) || defined(CONFIG_440GR) #if defined(CONFIG_440EP) || defined(CONFIG_440GR)
val |= 0xb8000000; /* generate system reset after 1.34 seconds */ val |= 0xb8000000; /* generate system reset after 1.34 seconds */
#elif defined(CONFIG_440EPX) #elif defined(CONFIG_440EPX)
...@@ -354,11 +354,11 @@ cpu_init_f (void) ...@@ -354,11 +354,11 @@ cpu_init_f (void)
val &= ~0x30000000; /* clear WRC bits */ val &= ~0x30000000; /* clear WRC bits */
val |= CONFIG_SYS_4xx_RESET_TYPE << 28; /* set board specific WRC type */ val |= CONFIG_SYS_4xx_RESET_TYPE << 28; /* set board specific WRC type */
#endif #endif
mtspr(tcr, val); mtspr(SPRN_TCR, val);
val = mfspr(tsr); val = mfspr(SPRN_TSR);
val |= 0x80000000; /* enable watchdog timer */ val |= 0x80000000; /* enable watchdog timer */
mtspr(tsr, val); mtspr(SPRN_TSR, val);
reset_4xx_watchdog(); reset_4xx_watchdog();
#endif /* CONFIG_WATCHDOG */ #endif /* CONFIG_WATCHDOG */
......
...@@ -67,13 +67,6 @@ static __inline__ void set_pit(unsigned long val) ...@@ -67,13 +67,6 @@ static __inline__ void set_pit(unsigned long val)
asm volatile("mtpit %0" : : "r" (val)); asm volatile("mtpit %0" : : "r" (val));
} }
static __inline__ void set_tcr(unsigned long val)
{
asm volatile("mttcr %0" : : "r" (val));
}
static __inline__ void set_evpr(unsigned long val) static __inline__ void set_evpr(unsigned long val)
{ {
asm volatile("mtevpr %0" : : "r" (val)); asm volatile("mtevpr %0" : : "r" (val));
......
...@@ -46,15 +46,6 @@ extern unsigned long search_exception_table(unsigned long); ...@@ -46,15 +46,6 @@ extern unsigned long search_exception_table(unsigned long);
*/ */
#define END_OF_MEM (gd->bd->bi_memstart + gd->bd->bi_memsize) #define END_OF_MEM (gd->bd->bi_memstart + gd->bd->bi_memsize)
static __inline__ void set_tsr(unsigned long val)
{
#if defined(CONFIG_440)
asm volatile("mtspr 0x150, %0" : : "r" (val));
#else
asm volatile("mttsr %0" : : "r" (val));
#endif
}
static __inline__ unsigned long get_esr(void) static __inline__ unsigned long get_esr(void)
{ {
unsigned long val; unsigned long val;
...@@ -364,7 +355,7 @@ DecrementerPITException(struct pt_regs *regs) ...@@ -364,7 +355,7 @@ DecrementerPITException(struct pt_regs *regs)
/* /*
* Reset PIT interrupt * Reset PIT interrupt
*/ */
set_tsr(0x08000000); mtspr(SPRN_TSR, 0x08000000);
/* /*
* Call timer_interrupt routine in interrupts.c * Call timer_interrupt routine in interrupts.c
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment