提交 03478804 编写于 作者: O Olaf Hering 提交者: Paul Mackerras

[PATCH] powerpc: restore clock speed in /proc/cpuinfo

Use generic_calibrate_decr to restore missing clock: speed in /proc/cpuinfo
Signed-off-by: NOlaf Hering <olh@suse.de>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 d8a8188d
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
extern void chrp_nvram_init(void); extern void chrp_nvram_init(void);
extern void chrp_get_rtc_time(struct rtc_time *); extern void chrp_get_rtc_time(struct rtc_time *);
extern int chrp_set_rtc_time(struct rtc_time *); extern int chrp_set_rtc_time(struct rtc_time *);
extern void chrp_calibrate_decr(void);
extern long chrp_time_init(void); extern long chrp_time_init(void);
extern void chrp_find_bridges(void); extern void chrp_find_bridges(void);
......
...@@ -506,7 +506,7 @@ void __init chrp_init(void) ...@@ -506,7 +506,7 @@ void __init chrp_init(void)
ppc_md.halt = rtas_halt; ppc_md.halt = rtas_halt;
ppc_md.time_init = chrp_time_init; ppc_md.time_init = chrp_time_init;
ppc_md.calibrate_decr = chrp_calibrate_decr; ppc_md.calibrate_decr = generic_calibrate_decr;
/* this may get overridden with rtas routines later... */ /* this may get overridden with rtas routines later... */
ppc_md.set_rtc_time = chrp_set_rtc_time; ppc_md.set_rtc_time = chrp_set_rtc_time;
......
...@@ -167,24 +167,3 @@ void chrp_get_rtc_time(struct rtc_time *tm) ...@@ -167,24 +167,3 @@ void chrp_get_rtc_time(struct rtc_time *tm)
tm->tm_mon = mon; tm->tm_mon = mon;
tm->tm_year = year; tm->tm_year = year;
} }
void __init chrp_calibrate_decr(void)
{
struct device_node *cpu;
unsigned int freq, *fp;
/*
* The cpu node should have a timebase-frequency property
* to tell us the rate at which the decrementer counts.
*/
freq = 16666000; /* hardcoded default */
cpu = find_type_devices("cpu");
if (cpu != 0) {
fp = (unsigned int *)
get_property(cpu, "timebase-frequency", NULL);
if (fp != 0)
freq = *fp;
}
ppc_tb_freq = freq;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册