8 #include <linux/device.h>
9 #include <linux/errno.h>
11 #include <linux/kernel.h>
12 #include <linux/module.h>
14 #include <linux/types.h>
17 #include <asm/delay.h>
20 #define DRIVER_NAME "bfin dpmc"
28 static void bfin_set_vlev(
unsigned int vlev)
42 static unsigned int bfin_get_vlev(
unsigned int freq)
51 for (i = 0; i < pdata->
tabsize; i++)
52 if (freq <= (pdata->
tuple_tab[i] & 0xFFFF))
60 #ifdef CONFIG_CPU_FREQ
62 static void bfin_idle_this_cpu(
void *
info)
64 unsigned long flags = 0;
65 unsigned long iwr0, iwr1, iwr2;
69 bfin_iwr_set_sup0(&iwr0, &iwr1, &iwr2);
74 bfin_iwr_restore(iwr0, iwr1, iwr2);
79 static void bfin_idle_cpu(
void)
84 static void bfin_wakeup_cpu(
void)
90 cpumask_copy(&mask, cpu_online_mask);
91 cpumask_clear_cpu(this_cpu, &mask);
97 static void bfin_idle_cpu(
void) {}
98 static void bfin_wakeup_cpu(
void) {}
106 if (freq->
cpu != CPUFREQ_CPU)
111 bfin_set_vlev(bfin_get_vlev(freq->
new));
116 bfin_set_vlev(bfin_get_vlev(freq->
new));
134 if (pdev->
dev.platform_data)
135 pdata = pdev->
dev.platform_data;
154 .probe = bfin_dpmc_probe,
164 static int __init bfin_dpmc_init(
void)
173 static void __exit bfin_dpmc_exit(
void)