diff options
author | Olaf Hering <olh@suse.de> | 2006-02-04 05:05:33 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-07 05:32:44 -0500 |
commit | 03478804920a53405dfff73a0b23e9dcbbbee1c1 (patch) | |
tree | 43c431ea5beffffc571b029e9896921d4d4c5a2e | |
parent | d8a8188ded1251afc6a2ec8a668b0bdf038b64a1 (diff) |
[PATCH] powerpc: restore clock speed in /proc/cpuinfo
Use generic_calibrate_decr to restore missing clock: speed in /proc/cpuinfo
Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/chrp/chrp.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/time.c | 21 |
3 files changed, 1 insertions, 23 deletions
diff --git a/arch/powerpc/platforms/chrp/chrp.h b/arch/powerpc/platforms/chrp/chrp.h index 3a2057fa314a..814f54742e0f 100644 --- a/arch/powerpc/platforms/chrp/chrp.h +++ b/arch/powerpc/platforms/chrp/chrp.h | |||
@@ -5,7 +5,6 @@ | |||
5 | extern void chrp_nvram_init(void); | 5 | extern void chrp_nvram_init(void); |
6 | extern void chrp_get_rtc_time(struct rtc_time *); | 6 | extern void chrp_get_rtc_time(struct rtc_time *); |
7 | extern int chrp_set_rtc_time(struct rtc_time *); | 7 | extern int chrp_set_rtc_time(struct rtc_time *); |
8 | extern void chrp_calibrate_decr(void); | ||
9 | extern long chrp_time_init(void); | 8 | extern long chrp_time_init(void); |
10 | 9 | ||
11 | extern void chrp_find_bridges(void); | 10 | extern void chrp_find_bridges(void); |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 2dc87aa5962f..e1fadbf49150 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -506,7 +506,7 @@ void __init chrp_init(void) | |||
506 | ppc_md.halt = rtas_halt; | 506 | ppc_md.halt = rtas_halt; |
507 | 507 | ||
508 | ppc_md.time_init = chrp_time_init; | 508 | ppc_md.time_init = chrp_time_init; |
509 | ppc_md.calibrate_decr = chrp_calibrate_decr; | 509 | ppc_md.calibrate_decr = generic_calibrate_decr; |
510 | 510 | ||
511 | /* this may get overridden with rtas routines later... */ | 511 | /* this may get overridden with rtas routines later... */ |
512 | ppc_md.set_rtc_time = chrp_set_rtc_time; | 512 | ppc_md.set_rtc_time = chrp_set_rtc_time; |
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c index 36a0f97bb7b1..78df2e7ca88a 100644 --- a/arch/powerpc/platforms/chrp/time.c +++ b/arch/powerpc/platforms/chrp/time.c | |||
@@ -167,24 +167,3 @@ void chrp_get_rtc_time(struct rtc_time *tm) | |||
167 | tm->tm_mon = mon; | 167 | tm->tm_mon = mon; |
168 | tm->tm_year = year; | 168 | tm->tm_year = year; |
169 | } | 169 | } |
170 | |||
171 | |||
172 | void __init chrp_calibrate_decr(void) | ||
173 | { | ||
174 | struct device_node *cpu; | ||
175 | unsigned int freq, *fp; | ||
176 | |||
177 | /* | ||
178 | * The cpu node should have a timebase-frequency property | ||
179 | * to tell us the rate at which the decrementer counts. | ||
180 | */ | ||
181 | freq = 16666000; /* hardcoded default */ | ||
182 | cpu = find_type_devices("cpu"); | ||
183 | if (cpu != 0) { | ||
184 | fp = (unsigned int *) | ||
185 | get_property(cpu, "timebase-frequency", NULL); | ||
186 | if (fp != 0) | ||
187 | freq = *fp; | ||
188 | } | ||
189 | ppc_tb_freq = freq; | ||
190 | } | ||