Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87196
b: refs/heads/master
c: 69e634f
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Mar 12, 2008
1 parent 49013b6 commit fe1ab22
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 127f1668617ae638f90f113a32f956887acbb94a
refs/heads/master: 69e634f1e27c8e5b954ea4be2d05dd744cabc0bc
7 changes: 6 additions & 1 deletion trunk/arch/mips/kernel/csrc-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ static struct clocksource clocksource_mips = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

void __init init_mips_clocksource(void)
int __init init_mips_clocksource(void)
{
if (!cpu_has_counter || !mips_hpt_frequency)
return -ENXIO;

/* Calclate a somewhat reasonable rating value */
clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;

clocksource_set_clock(&clocksource_mips, mips_hpt_frequency);

clocksource_register(&clocksource_mips);

return 0;
}
5 changes: 3 additions & 2 deletions trunk/include/asm-mips/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ static inline int mips_clockevent_init(void)
* Initialize the count register as a clocksource
*/
#ifdef CONFIG_CEVT_R4K
extern void init_mips_clocksource(void);
extern int init_mips_clocksource(void);
#else
static inline void init_mips_clocksource(void)
static inline int init_mips_clocksource(void)
{
return 0;
}
#endif

Expand Down

0 comments on commit fe1ab22

Please sign in to comment.