ppc4xx: Change tsr/tcr macros to upper case
PATCH 1/1 ppc4xx: Change tsr/tcr macros to upper case
Remove uneccessary functions to access the TCR/TSR registers as well.
Signed-off-by Stefan Roese <[email protected]>
--- arch/powerpc/cpu/ppc4xx/cpu_init.c | 8 ++++---- arch/powerpc/cpu/ppc4xx/interrupts.c | 7 ------- arch/powerpc/cpu/ppc4xx/traps.c | 11 +---------- 3 files changed, 5 insertions(+), 21 deletions(-)
arch/powerpc/cpu/ppc4xx/cpu_init.c +4 -4
@@ -341,7 +341,7 @@ cpu_init_f (void)#endif #if defined(CONFIG_WATCHDOG ) - val =mfspr (tcr); + val =mfspr (SPRN_TCR );#if defined(CONFIG_440EP ) || defined(CONFIG_440GR ) val |=0xb8000000 ;/* generate system reset after 1.34 seconds */ #elif defined(CONFIG_440EPX )
@@ -353,11 +353,11 @@ cpu_init_f (void) val &= ~0x30000000 ;/* clear WRC bits */ val |= CONFIG_SYS_4xx_RESET_TYPE <<28 ;/* set board specific WRC type */ #endif -mtspr (tcr, val); +mtspr (SPRN_TCR , val); - val =mfspr (tsr); + val =mfspr (SPRN_TSR ); val |=0x80000000 ;/* enable watchdog timer */ -mtspr (tsr, val); +mtspr (SPRN_TSR , val);reset_4xx_watchdog ();#endif /* CONFIG_WATCHDOG */
arch/powerpc/cpu/ppc4xx/interrupts.c +0 -7
@@ -67,13 +67,6 @@ static __inline__ void set_pit(unsigned long val) asmvolatile ("mtpit %0" : :"r" (val)); } - -static __inline__void set_tcr (unsigned long val) -{ - asmvolatile ("mttcr %0" : :"r" (val)); -} - -static __inline__void set_evpr (unsigned long val) { asmvolatile ("mtevpr %0" : :"r" (val));
arch/powerpc/cpu/ppc4xx/traps.c +1 -10
@@ -46,15 +46,6 @@ extern unsigned long search_exception_table(unsigned long);*/ #define END_OF_MEM (gd->bd->bi_memstart + gd->bd->bi_memsize) -static __inline__void set_tsr (unsigned long val) -{ -#if defined(CONFIG_440 ) - asmvolatile ("mtspr 0x150, %0" : :"r" (val)); -#else - asmvolatile ("mttsr %0" : :"r" (val)); -#endif -} -static __inline__unsigned long get_esr (void ) {unsigned long val;
@@ -364,7 +355,7 @@ DecrementerPITException(struct pt_regs *regs)/* * Reset PIT interrupt */ -set_tsr (0x08000000 ); +mtspr (SPRN_TSR ,0x08000000 );/* * Call timer_interrupt routine in interrupts.c
Signature · 1 line
1.7.3.1
PATCH 1/1 ppc4xx: Change tsr/tcr macros to upper case
Quoted 1 line · On Monday 04 October 2010 11:09:40 Stefan Roese wrote:
Remove uneccessary functions to access the TCR/TSR registers as well.
Applied to u-boot-ppc4xx/master. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de