diff --git a/arch/blackfin/mach-bf527/Makefile b/arch/blackfin/mach-bf527/Makefile
index 9f99f5d..4eddb58 100644
--- a/arch/blackfin/mach-bf527/Makefile
+++ b/arch/blackfin/mach-bf527/Makefile
@@ -5,5 +5,3 @@
 extra-y := head.o
 
 obj-y := ints-priority.o dma.o
-
-obj-$(CONFIG_CPU_FREQ)   += cpu.o
diff --git a/arch/blackfin/mach-bf527/cpu.c b/arch/blackfin/mach-bf527/cpu.c
deleted file mode 100644
index 1975402..0000000
--- a/arch/blackfin/mach-bf527/cpu.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * File:         arch/blackfin/mach-bf527/cpu.c
- * Based on:	arch/blackfin/mach-bf537/cpu.c
- * Author:       michael.kang@analog.com
- *
- * Created:
- * Description:  clock scaling for the bf527
- *
- * Modified:
- *               Copyright 2004-2007 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/cpufreq.h>
-#include <asm/dpmc.h>
-#include <linux/fs.h>
-#include <asm/bfin-global.h>
-
-/* CONFIG_CLKIN_HZ=11059200 */
-#define VCO5 (CONFIG_CLKIN_HZ*45)	/*497664000 */
-#define VCO4 (CONFIG_CLKIN_HZ*36)	/*398131200 */
-#define VCO3 (CONFIG_CLKIN_HZ*27)	/*298598400 */
-#define VCO2 (CONFIG_CLKIN_HZ*18)	/*199065600 */
-#define VCO1 (CONFIG_CLKIN_HZ*9)	/*99532800 */
-#define VCO(x) VCO##x
-
-#define MFREQ(x) {VCO(x), VCO(x)/4}, {VCO(x), VCO(x)/2}, {VCO(x), VCO(x)}
-/* frequency */
-static struct cpufreq_frequency_table bf527_freq_table[] = {
-	MFREQ(1),
-	MFREQ(3),
-	{VCO4, VCO4 / 2}, {VCO4, VCO4},
-	MFREQ(5),
-	{0, CPUFREQ_TABLE_END},
-};
-
-/*
- * dpmc_fops->ioctl()
- * static int dpmc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
- */
-static int bf527_getfreq(unsigned int cpu)
-{
-	unsigned long cclk_mhz;
-
-	/* The driver only support single cpu */
-	if (cpu == 0)
-		dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz);
-	else
-		cclk_mhz = -1;
-
-	return cclk_mhz;
-}
-
-static int bf527_target(struct cpufreq_policy *policy,
-			unsigned int target_freq, unsigned int relation)
-{
-	unsigned long cclk_mhz;
-	unsigned long vco_mhz;
-	unsigned long flags;
-	unsigned int index;
-	struct cpufreq_freqs freqs;
-
-	if (cpufreq_frequency_table_target
-	    (policy, bf527_freq_table, target_freq, relation, &index))
-		return -EINVAL;
-
-	cclk_mhz = bf527_freq_table[index].frequency;
-	vco_mhz = bf527_freq_table[index].index;
-
-	dpmc_fops.ioctl(NULL, NULL, IOCTL_CHANGE_FREQUENCY, &vco_mhz);
-	freqs.old = bf527_getfreq(0);
-	freqs.new = cclk_mhz;
-	freqs.cpu = 0;
-
-	pr_debug
-	    ("cclk begin change to cclk %d,vco=%d,index=%d,target=%d,oldfreq=%d\n",
-	     cclk_mhz, vco_mhz, index, target_freq, freqs.old);
-
-	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
-	local_irq_save(flags);
-	dpmc_fops.ioctl(NULL, NULL, IOCTL_SET_CCLK, &cclk_mhz);
-	local_irq_restore(flags);
-	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
-
-	vco_mhz = get_vco();
-	cclk_mhz = get_cclk();
-	return 0;
-}
-
-/* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on
- * this platform, anyway.
- */
-static int bf527_verify_speed(struct cpufreq_policy *policy)
-{
-	return cpufreq_frequency_table_verify(policy, &bf527_freq_table);
-}
-
-static int __init __bf527_cpu_init(struct cpufreq_policy *policy)
-{
-	if (policy->cpu != 0)
-		return -EINVAL;
-
-	policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-
-	policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-	/*Now ,only support one cpu */
-	policy->cur = bf527_getfreq(0);
-	cpufreq_frequency_table_get_attr(bf527_freq_table, policy->cpu);
-	return cpufreq_frequency_table_cpuinfo(policy, bf527_freq_table);
-}
-
-static struct freq_attr *bf527_freq_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	NULL,
-};
-
-static struct cpufreq_driver bf527_driver = {
-	.verify = bf527_verify_speed,
-	.target = bf527_target,
-	.get = bf527_getfreq,
-	.init = __bf527_cpu_init,
-	.name = "bf527",
-	.owner = THIS_MODULE,
-	.attr = bf527_freq_attr,
-};
-
-static int __init bf527_cpu_init(void)
-{
-	return cpufreq_register_driver(&bf527_driver);
-}
-
-static void __exit bf527_cpu_exit(void)
-{
-	cpufreq_unregister_driver(&bf527_driver);
-}
-
-MODULE_AUTHOR("Mickael Kang");
-MODULE_DESCRIPTION("cpufreq driver for bf527 CPU");
-MODULE_LICENSE("GPL");
-
-module_init(bf527_cpu_init);
-module_exit(bf527_cpu_exit);
diff --git a/arch/blackfin/mach-bf533/Makefile b/arch/blackfin/mach-bf533/Makefile
index 8cce173..aa9f264 100644
--- a/arch/blackfin/mach-bf533/Makefile
+++ b/arch/blackfin/mach-bf533/Makefile
@@ -5,5 +5,3 @@
 extra-y := head.o
 
 obj-y := ints-priority.o dma.o
-
-obj-$(CONFIG_CPU_FREQ)   += cpu.o
diff --git a/arch/blackfin/mach-bf533/cpu.c b/arch/blackfin/mach-bf533/cpu.c
deleted file mode 100644
index b7a0e0f..0000000
--- a/arch/blackfin/mach-bf533/cpu.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * File:         arch/blackfin/mach-bf533/cpu.c
- * Based on:
- * Author:       michael.kang@analog.com
- *
- * Created:
- * Description:  clock scaling for the bf533
- *
- * Modified:
- *               Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/cpufreq.h>
-#include <asm/dpmc.h>
-#include <linux/fs.h>
-#include <asm/bfin-global.h>
-
-/* CONFIG_CLKIN_HZ=11059200 */
-#define VCO5 (CONFIG_CLKIN_HZ*45)	/*497664000 */
-#define VCO4 (CONFIG_CLKIN_HZ*36)	/*398131200 */
-#define VCO3 (CONFIG_CLKIN_HZ*27)	/*298598400 */
-#define VCO2 (CONFIG_CLKIN_HZ*18)	/*199065600 */
-#define VCO1 (CONFIG_CLKIN_HZ*9)	/*99532800 */
-#define VCO(x) VCO##x
-
-#define FREQ(x) {VCO(x),VCO(x)/4},{VCO(x),VCO(x)/2},{VCO(x),VCO(x)}
-/* frequency */
-static struct cpufreq_frequency_table bf533_freq_table[] = {
-	FREQ(1),
-	FREQ(3),
-	{VCO4, VCO4 / 2}, {VCO4, VCO4},
-	FREQ(5),
-	{0, CPUFREQ_TABLE_END},
-};
-
-/*
- * dpmc_fops->ioctl()
- * static int dpmc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
- */
-static int bf533_getfreq(unsigned int cpu)
-{
-	unsigned long cclk_mhz, vco_mhz;
-
-	/* The driver only support single cpu */
-	if (cpu == 0)
-		dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz);
-	else
-		cclk_mhz = -1;
-	return cclk_mhz;
-}
-
-static int bf533_target(struct cpufreq_policy *policy,
-			    unsigned int target_freq, unsigned int relation)
-{
-	unsigned long cclk_mhz;
-	unsigned long vco_mhz;
-	unsigned long flags;
-	unsigned int index, vco_index;
-	int i;
-
-	struct cpufreq_freqs freqs;
-	if (cpufreq_frequency_table_target(policy, bf533_freq_table, target_freq, relation, &index))
-		return -EINVAL;
-	cclk_mhz = bf533_freq_table[index].frequency;
-	vco_mhz = bf533_freq_table[index].index;
-
-	dpmc_fops.ioctl(NULL, NULL, IOCTL_CHANGE_FREQUENCY, &vco_mhz);
-	freqs.old = bf533_getfreq(0);
-	freqs.new = cclk_mhz;
-	freqs.cpu = 0;
-
-	pr_debug("cclk begin change to cclk %d,vco=%d,index=%d,target=%d,oldfreq=%d\n",
-	         cclk_mhz, vco_mhz, index, target_freq, freqs.old);
-
-	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
-	local_irq_save(flags);
-	dpmc_fops.ioctl(NULL, NULL, IOCTL_SET_CCLK, &cclk_mhz);
-	local_irq_restore(flags);
-	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
-
-	vco_mhz = get_vco();
-	cclk_mhz = get_cclk();
-	return 0;
-}
-
-/* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on
- * this platform, anyway.
- */
-static int bf533_verify_speed(struct cpufreq_policy *policy)
-{
-	return cpufreq_frequency_table_verify(policy, &bf533_freq_table);
-}
-
-static int __init __bf533_cpu_init(struct cpufreq_policy *policy)
-{
-	int result;
-
-	if (policy->cpu != 0)
-		return -EINVAL;
-
-	policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-	/*Now ,only support one cpu */
-	policy->cur = bf533_getfreq(0);
-	cpufreq_frequency_table_get_attr(bf533_freq_table, policy->cpu);
-	return cpufreq_frequency_table_cpuinfo(policy, bf533_freq_table);
-}
-
-static struct freq_attr *bf533_freq_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	NULL,
-};
-
-static struct cpufreq_driver bf533_driver = {
-	.verify = bf533_verify_speed,
-	.target = bf533_target,
-	.get = bf533_getfreq,
-	.init = __bf533_cpu_init,
-	.name = "bf533",
-	.owner = THIS_MODULE,
-	.attr = bf533_freq_attr,
-};
-
-static int __init bf533_cpu_init(void)
-{
-	return cpufreq_register_driver(&bf533_driver);
-}
-
-static void __exit bf533_cpu_exit(void)
-{
-	cpufreq_unregister_driver(&bf533_driver);
-}
-
-MODULE_AUTHOR("Mickael Kang");
-MODULE_DESCRIPTION("cpufreq driver for BF533 CPU");
-MODULE_LICENSE("GPL");
-
-module_init(bf533_cpu_init);
-module_exit(bf533_cpu_exit);
diff --git a/arch/blackfin/mach-bf537/Makefile b/arch/blackfin/mach-bf537/Makefile
index 7e7c9c8..68e5478 100644
--- a/arch/blackfin/mach-bf537/Makefile
+++ b/arch/blackfin/mach-bf537/Makefile
@@ -5,5 +5,3 @@
 extra-y := head.o
 
 obj-y := ints-priority.o dma.o
-
-obj-$(CONFIG_CPU_FREQ)   += cpu.o
diff --git a/arch/blackfin/mach-bf537/cpu.c b/arch/blackfin/mach-bf537/cpu.c
deleted file mode 100644
index 0442c4c..0000000
--- a/arch/blackfin/mach-bf537/cpu.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * File:         arch/blackfin/mach-bf537/cpu.c
- * Based on:
- * Author:       michael.kang@analog.com
- *
- * Created:
- * Description:  clock scaling for the bf537
- *
- * Modified:
- *               Copyright 2004-2006 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/cpufreq.h>
-#include <asm/dpmc.h>
-#include <linux/fs.h>
-#include <asm/bfin-global.h>
-
-/* CONFIG_CLKIN_HZ=11059200 */
-#define VCO5 (CONFIG_CLKIN_HZ*45)	/*497664000 */
-#define VCO4 (CONFIG_CLKIN_HZ*36)	/*398131200 */
-#define VCO3 (CONFIG_CLKIN_HZ*27)	/*298598400 */
-#define VCO2 (CONFIG_CLKIN_HZ*18)	/*199065600 */
-#define VCO1 (CONFIG_CLKIN_HZ*9)	/*99532800 */
-#define VCO(x) VCO##x
-
-#define MFREQ(x) {VCO(x),VCO(x)/4},{VCO(x),VCO(x)/2},{VCO(x),VCO(x)}
-/* frequency */
-static struct cpufreq_frequency_table bf537_freq_table[] = {
-	MFREQ(1),
-	MFREQ(3),
-	{VCO4, VCO4 / 2}, {VCO4, VCO4},
-	MFREQ(5),
-	{0, CPUFREQ_TABLE_END},
-};
-
-/*
- * dpmc_fops->ioctl()
- * static int dpmc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
- */
-static int bf537_getfreq(unsigned int cpu)
-{
-	unsigned long cclk_mhz;
-
-	/* The driver only support single cpu */
-	if (cpu == 0)
-		dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz);
-	else
-		cclk_mhz = -1;
-
-	return cclk_mhz;
-}
-
-static int bf537_target(struct cpufreq_policy *policy,
-			    unsigned int target_freq, unsigned int relation)
-{
-	unsigned long cclk_mhz;
-	unsigned long vco_mhz;
-	unsigned long flags;
-	unsigned int index;
-	struct cpufreq_freqs freqs;
-
-	if (cpufreq_frequency_table_target(policy, bf537_freq_table, target_freq, relation, &index))
-		return -EINVAL;
-
-	cclk_mhz = bf537_freq_table[index].frequency;
-	vco_mhz = bf537_freq_table[index].index;
-
-	dpmc_fops.ioctl(NULL, NULL, IOCTL_CHANGE_FREQUENCY, &vco_mhz);
-	freqs.old = bf537_getfreq(0);
-	freqs.new = cclk_mhz;
-	freqs.cpu = 0;
-
-	pr_debug("cclk begin change to cclk %d,vco=%d,index=%d,target=%d,oldfreq=%d\n",
-	         cclk_mhz, vco_mhz, index, target_freq, freqs.old);
-
-	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
-	local_irq_save(flags);
-	dpmc_fops.ioctl(NULL, NULL, IOCTL_SET_CCLK, &cclk_mhz);
-	local_irq_restore(flags);
-	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
-
-	vco_mhz = get_vco();
-	cclk_mhz = get_cclk();
-	return 0;
-}
-
-/* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on
- * this platform, anyway.
- */
-static int bf537_verify_speed(struct cpufreq_policy *policy)
-{
-	return cpufreq_frequency_table_verify(policy, &bf537_freq_table);
-}
-
-static int __init __bf537_cpu_init(struct cpufreq_policy *policy)
-{
-	if (policy->cpu != 0)
-		return -EINVAL;
-
-	policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-
-	policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-	/*Now ,only support one cpu */
-	policy->cur = bf537_getfreq(0);
-	cpufreq_frequency_table_get_attr(bf537_freq_table, policy->cpu);
-	return cpufreq_frequency_table_cpuinfo(policy, bf537_freq_table);
-}
-
-static struct freq_attr *bf537_freq_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	NULL,
-};
-
-static struct cpufreq_driver bf537_driver = {
-	.verify = bf537_verify_speed,
-	.target = bf537_target,
-	.get = bf537_getfreq,
-	.init = __bf537_cpu_init,
-	.name = "bf537",
-	.owner = THIS_MODULE,
-	.attr = bf537_freq_attr,
-};
-
-static int __init bf537_cpu_init(void)
-{
-	return cpufreq_register_driver(&bf537_driver);
-}
-
-static void __exit bf537_cpu_exit(void)
-{
-	cpufreq_unregister_driver(&bf537_driver);
-}
-
-MODULE_AUTHOR("Mickael Kang");
-MODULE_DESCRIPTION("cpufreq driver for BF537 CPU");
-MODULE_LICENSE("GPL");
-
-module_init(bf537_cpu_init);
-module_exit(bf537_cpu_exit);
diff --git a/arch/blackfin/mach-bf548/Makefile b/arch/blackfin/mach-bf548/Makefile
index 7e7c9c8..68e5478 100644
--- a/arch/blackfin/mach-bf548/Makefile
+++ b/arch/blackfin/mach-bf548/Makefile
@@ -5,5 +5,3 @@
 extra-y := head.o
 
 obj-y := ints-priority.o dma.o
-
-obj-$(CONFIG_CPU_FREQ)   += cpu.o
diff --git a/arch/blackfin/mach-bf548/cpu.c b/arch/blackfin/mach-bf548/cpu.c
deleted file mode 100644
index 4298a3c..0000000
--- a/arch/blackfin/mach-bf548/cpu.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * File:         arch/blackfin/mach-bf548/cpu.c
- * Based on:
- * Author:
- *
- * Created:
- * Description:  clock scaling for the bf54x
- *
- * Modified:
- *               Copyright 2004-2007 Analog Devices Inc.
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/cpufreq.h>
-#include <asm/dpmc.h>
-#include <linux/fs.h>
-#include <asm/bfin-global.h>
-
-/* CONFIG_CLKIN_HZ=25000000 */
-#define VCO5 (CONFIG_CLKIN_HZ*45)
-#define VCO4 (CONFIG_CLKIN_HZ*36)
-#define VCO3 (CONFIG_CLKIN_HZ*27)
-#define VCO2 (CONFIG_CLKIN_HZ*18)
-#define VCO1 (CONFIG_CLKIN_HZ*9)
-#define VCO(x) VCO##x
-
-#define MFREQ(x) {VCO(x),VCO(x)/4},{VCO(x),VCO(x)/2},{VCO(x),VCO(x)}
-/* frequency */
-static struct cpufreq_frequency_table bf548_freq_table[] = {
-	MFREQ(1),
-	MFREQ(3),
-	{VCO4, VCO4 / 2}, {VCO4, VCO4},
-	MFREQ(5),
-	{0, CPUFREQ_TABLE_END},
-};
-
-/*
- * dpmc_fops->ioctl()
- * static int dpmc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
- */
-static int bf548_getfreq(unsigned int cpu)
-{
-	unsigned long cclk_mhz;
-
-	/* The driver only support single cpu */
-	if (cpu == 0)
-		dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz);
-	else
-		cclk_mhz = -1;
-
-	return cclk_mhz;
-}
-
-static int bf548_target(struct cpufreq_policy *policy,
-			    unsigned int target_freq, unsigned int relation)
-{
-	unsigned long cclk_mhz;
-	unsigned long vco_mhz;
-	unsigned long flags;
-	unsigned int index;
-	struct cpufreq_freqs freqs;
-
-	if (cpufreq_frequency_table_target(policy, bf548_freq_table, target_freq, relation, &index))
-		return -EINVAL;
-
-	cclk_mhz = bf548_freq_table[index].frequency;
-	vco_mhz = bf548_freq_table[index].index;
-
-	dpmc_fops.ioctl(NULL, NULL, IOCTL_CHANGE_FREQUENCY, &vco_mhz);
-	freqs.old = bf548_getfreq(0);
-	freqs.new = cclk_mhz;
-	freqs.cpu = 0;
-
-	pr_debug("cclk begin change to cclk %d,vco=%d,index=%d,target=%d,oldfreq=%d\n",
-	         cclk_mhz, vco_mhz, index, target_freq, freqs.old);
-
-	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
-	local_irq_save(flags);
-	dpmc_fops.ioctl(NULL, NULL, IOCTL_SET_CCLK, &cclk_mhz);
-	local_irq_restore(flags);
-	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
-
-	vco_mhz = get_vco();
-	cclk_mhz = get_cclk();
-	return 0;
-}
-
-/* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on
- * this platform, anyway.
- */
-static int bf548_verify_speed(struct cpufreq_policy *policy)
-{
-	return cpufreq_frequency_table_verify(policy, &bf548_freq_table);
-}
-
-static int __init __bf548_cpu_init(struct cpufreq_policy *policy)
-{
-	if (policy->cpu != 0)
-		return -EINVAL;
-
-	policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-
-	policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-	/*Now ,only support one cpu */
-	policy->cur = bf548_getfreq(0);
-	cpufreq_frequency_table_get_attr(bf548_freq_table, policy->cpu);
-	return cpufreq_frequency_table_cpuinfo(policy, bf548_freq_table);
-}
-
-static struct freq_attr *bf548_freq_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	NULL,
-};
-
-static struct cpufreq_driver bf548_driver = {
-	.verify = bf548_verify_speed,
-	.target = bf548_target,
-	.get = bf548_getfreq,
-	.init = __bf548_cpu_init,
-	.name = "bf548",
-	.owner = THIS_MODULE,
-	.attr = bf548_freq_attr,
-};
-
-static int __init bf548_cpu_init(void)
-{
-	return cpufreq_register_driver(&bf548_driver);
-}
-
-static void __exit bf548_cpu_exit(void)
-{
-	cpufreq_unregister_driver(&bf548_driver);
-}
-
-MODULE_AUTHOR("Mickael Kang");
-MODULE_DESCRIPTION("cpufreq driver for BF548 CPU");
-MODULE_LICENSE("GPL");
-
-module_init(bf548_cpu_init);
-module_exit(bf548_cpu_exit);
