Skip to content

Commit

Permalink
[POWERPC] 40x decrementer fixes
Browse files Browse the repository at this point in the history
Allow generic_calibrate_decr to work for 40x platforms.  Given that the hardware
behavior is identical, this also changes the set_dec function to reload the PIT
on 40x to match the behavior 44x currently has.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
  • Loading branch information
Josh Boyer committed Aug 20, 2007
1 parent 4d922c8 commit aab6929
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ void __init generic_calibrate_decr(void)
"(not found)\n");
}

#ifdef CONFIG_BOOKE
#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
/* Set the time base to zero */
mtspr(SPRN_TBWL, 0);
mtspr(SPRN_TBWU, 0);
Expand Down
2 changes: 1 addition & 1 deletion include/asm-powerpc/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static inline unsigned int get_dec(void)
static inline void set_dec(int val)
{
#if defined(CONFIG_40x)
return; /* Have to let it auto-reload */
mtspr(SPRN_PIT, val);
#elif defined(CONFIG_8xx_CPU6)
set_dec_cpu6(val);
#else
Expand Down

0 comments on commit aab6929

Please sign in to comment.