@@ -24,13 +24,15 @@ struct s3c64xx_dvfs {
24
24
unsigned int vddarm_max ;
25
25
};
26
26
27
+ #ifdef CONFIG_REGULATOR
27
28
static struct s3c64xx_dvfs s3c64xx_dvfs_table [] = {
28
29
[0 ] = { 1000000 , 1150000 },
29
30
[1 ] = { 1050000 , 1150000 },
30
31
[2 ] = { 1100000 , 1150000 },
31
32
[3 ] = { 1200000 , 1350000 },
32
33
[4 ] = { 1300000 , 1350000 },
33
34
};
35
+ #endif
34
36
35
37
static struct cpufreq_frequency_table s3c64xx_freq_table [] = {
36
38
{ 0 , 0 , 66000 },
@@ -51,15 +53,16 @@ static struct cpufreq_frequency_table s3c64xx_freq_table[] = {
51
53
static int s3c64xx_cpufreq_set_target (struct cpufreq_policy * policy ,
52
54
unsigned int index )
53
55
{
54
- struct s3c64xx_dvfs * dvfs ;
55
- unsigned int old_freq , new_freq ;
56
+ unsigned int new_freq = s3c64xx_freq_table [index ].frequency ;
56
57
int ret ;
57
58
59
+ #ifdef CONFIG_REGULATOR
60
+ struct s3c64xx_dvfs * dvfs ;
61
+ unsigned int old_freq ;
62
+
58
63
old_freq = clk_get_rate (policy -> clk ) / 1000 ;
59
- new_freq = s3c64xx_freq_table [index ].frequency ;
60
64
dvfs = & s3c64xx_dvfs_table [s3c64xx_freq_table [index ].driver_data ];
61
65
62
- #ifdef CONFIG_REGULATOR
63
66
if (vddarm && new_freq > old_freq ) {
64
67
ret = regulator_set_voltage (vddarm ,
65
68
dvfs -> vddarm_min ,
0 commit comments