patch-2.4.19 linux-2.4.19/arch/arm/mach-sa1100/cpu-sa1100.c
Next file: linux-2.4.19/arch/arm/mach-sa1100/cpu-sa1110.c
Previous file: linux-2.4.19/arch/arm/mach-sa1100/cerf.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Fri Aug 2 17:39:42 2002
- Orig file:
linux-2.4.18/arch/arm/mach-sa1100/cpu-sa1100.c
- Orig date:
Sun Aug 12 11:13:59 2001
diff -urN linux-2.4.18/arch/arm/mach-sa1100/cpu-sa1100.c linux-2.4.19/arch/arm/mach-sa1100/cpu-sa1100.c
@@ -90,7 +90,8 @@
#include <asm/hardware.h>
-
+extern unsigned int sa11x0_freq_to_ppcr(unsigned int khz);
+extern unsigned int sa11x0_validatespeed(unsigned int khz);
typedef struct {
@@ -219,14 +220,22 @@
};
-
+static void sa1100_setspeed(unsigned int khz)
+{
+ PPCR = sa11x0_freq_to_ppcr(khz);
+}
static int __init sa1100_dram_init(void)
{
- return cpufreq_register_notifier(&sa1100_dram_block);
-}
+ int ret = -ENODEV;
+ if ((processor_id & CPU_SA1100_MASK) == CPU_SA1100_ID) {
+ ret = cpufreq_register_notifier(&sa1100_dram_block);
+ cpufreq_setfunctions(sa11x0_validatespeed, sa1100_setspeed);
+ }
+ return ret;
+}
__initcall(sa1100_dram_init);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)