diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-03-30 06:55:15 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-04 08:25:59 -0400 |
commit | 5070158804b5339c71809f5e673cea1cfacd804d (patch) | |
tree | 42256e81e326af4e568a179787e66d434a0b1ffc | |
parent | 2361be23666232dbb4851a527f466c4cbf5340fc (diff) |
cpufreq: rename index as driver_data in cpufreq_frequency_table
The "index" field of struct cpufreq_frequency_table was never an
index and isn't used at all by the cpufreq core. It only is useful
for cpufreq drivers for their internal purposes.
Many people nowadays blindly set it in ascending order with the
assumption that the core will use it, which is a mistake.
Rename it to "driver_data" as that's what its purpose is. All of its
users are updated accordingly.
[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
37 files changed, 223 insertions, 227 deletions
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index a3585eac83b6..19fa98e07bf7 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt | |||
@@ -186,7 +186,7 @@ As most cpufreq processors only allow for being set to a few specific | |||
186 | frequencies, a "frequency table" with some functions might assist in | 186 | frequencies, a "frequency table" with some functions might assist in |
187 | some work of the processor driver. Such a "frequency table" consists | 187 | some work of the processor driver. Such a "frequency table" consists |
188 | of an array of struct cpufreq_frequency_table entries, with any value in | 188 | of an array of struct cpufreq_frequency_table entries, with any value in |
189 | "index" you want to use, and the corresponding frequency in | 189 | "driver_data" you want to use, and the corresponding frequency in |
190 | "frequency". At the end of the table, you need to add a | 190 | "frequency". At the end of the table, you need to add a |
191 | cpufreq_frequency_table entry with frequency set to CPUFREQ_TABLE_END. And | 191 | cpufreq_frequency_table entry with frequency set to CPUFREQ_TABLE_END. And |
192 | if you want to skip one entry in the table, set the frequency to | 192 | if you want to skip one entry in the table, set the frequency to |
@@ -214,10 +214,4 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, | |||
214 | is the corresponding frequency table helper for the ->target | 214 | is the corresponding frequency table helper for the ->target |
215 | stage. Just pass the values to this function, and the unsigned int | 215 | stage. Just pass the values to this function, and the unsigned int |
216 | index returns the number of the frequency table entry which contains | 216 | index returns the number of the frequency table entry which contains |
217 | the frequency the CPU shall be set to. PLEASE NOTE: This is not the | 217 | the frequency the CPU shall be set to. |
218 | "index" which is in this cpufreq_table_entry.index, but instead | ||
219 | cpufreq_table[index]. So, the new frequency is | ||
220 | cpufreq_table[index].frequency, and the value you stored into the | ||
221 | frequency table "index" field is | ||
222 | cpufreq_table[index].index. | ||
223 | |||
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 4d6933848abf..a0d4f6038b60 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -1004,7 +1004,7 @@ static const struct da850_opp da850_opp_96 = { | |||
1004 | 1004 | ||
1005 | #define OPP(freq) \ | 1005 | #define OPP(freq) \ |
1006 | { \ | 1006 | { \ |
1007 | .index = (unsigned int) &da850_opp_##freq, \ | 1007 | .driver_data = (unsigned int) &da850_opp_##freq, \ |
1008 | .frequency = freq * 1000, \ | 1008 | .frequency = freq * 1000, \ |
1009 | } | 1009 | } |
1010 | 1010 | ||
@@ -1016,7 +1016,7 @@ static struct cpufreq_frequency_table da850_freq_table[] = { | |||
1016 | OPP(200), | 1016 | OPP(200), |
1017 | OPP(96), | 1017 | OPP(96), |
1018 | { | 1018 | { |
1019 | .index = 0, | 1019 | .driver_data = 0, |
1020 | .frequency = CPUFREQ_TABLE_END, | 1020 | .frequency = CPUFREQ_TABLE_END, |
1021 | }, | 1021 | }, |
1022 | }; | 1022 | }; |
@@ -1044,7 +1044,7 @@ static int da850_set_voltage(unsigned int index) | |||
1044 | if (!cvdd) | 1044 | if (!cvdd) |
1045 | return -ENODEV; | 1045 | return -ENODEV; |
1046 | 1046 | ||
1047 | opp = (struct da850_opp *) cpufreq_info.freq_table[index].index; | 1047 | opp = (struct da850_opp *) cpufreq_info.freq_table[index].driver_data; |
1048 | 1048 | ||
1049 | return regulator_set_voltage(cvdd, opp->cvdd_min, opp->cvdd_max); | 1049 | return regulator_set_voltage(cvdd, opp->cvdd_min, opp->cvdd_max); |
1050 | } | 1050 | } |
@@ -1125,7 +1125,7 @@ static int da850_set_pll0rate(struct clk *clk, unsigned long index) | |||
1125 | struct pll_data *pll = clk->pll_data; | 1125 | struct pll_data *pll = clk->pll_data; |
1126 | int ret; | 1126 | int ret; |
1127 | 1127 | ||
1128 | opp = (struct da850_opp *) cpufreq_info.freq_table[index].index; | 1128 | opp = (struct da850_opp *) cpufreq_info.freq_table[index].driver_data; |
1129 | prediv = opp->prediv; | 1129 | prediv = opp->prediv; |
1130 | mult = opp->mult; | 1130 | mult = opp->mult; |
1131 | postdiv = opp->postdiv; | 1131 | postdiv = opp->postdiv; |
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c24xx/cpufreq-utils.c index ddd8280e3875..2a0aa5684e72 100644 --- a/arch/arm/mach-s3c24xx/cpufreq-utils.c +++ b/arch/arm/mach-s3c24xx/cpufreq-utils.c | |||
@@ -60,5 +60,5 @@ void s3c2410_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg) | |||
60 | */ | 60 | */ |
61 | void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg) | 61 | void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg) |
62 | { | 62 | { |
63 | __raw_writel(cfg->pll.index, S3C2410_MPLLCON); | 63 | __raw_writel(cfg->pll.driver_data, S3C2410_MPLLCON); |
64 | } | 64 | } |
diff --git a/arch/arm/mach-s3c24xx/cpufreq.c b/arch/arm/mach-s3c24xx/cpufreq.c index 3c0e78ede0da..3513e7477160 100644 --- a/arch/arm/mach-s3c24xx/cpufreq.c +++ b/arch/arm/mach-s3c24xx/cpufreq.c | |||
@@ -70,7 +70,7 @@ static void s3c_cpufreq_getcur(struct s3c_cpufreq_config *cfg) | |||
70 | cfg->freq.pclk = pclk = clk_get_rate(clk_pclk); | 70 | cfg->freq.pclk = pclk = clk_get_rate(clk_pclk); |
71 | cfg->freq.armclk = armclk = clk_get_rate(clk_arm); | 71 | cfg->freq.armclk = armclk = clk_get_rate(clk_arm); |
72 | 72 | ||
73 | cfg->pll.index = __raw_readl(S3C2410_MPLLCON); | 73 | cfg->pll.driver_data = __raw_readl(S3C2410_MPLLCON); |
74 | cfg->pll.frequency = fclk; | 74 | cfg->pll.frequency = fclk; |
75 | 75 | ||
76 | cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10); | 76 | cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10); |
@@ -431,7 +431,7 @@ static unsigned int suspend_freq; | |||
431 | static int s3c_cpufreq_suspend(struct cpufreq_policy *policy) | 431 | static int s3c_cpufreq_suspend(struct cpufreq_policy *policy) |
432 | { | 432 | { |
433 | suspend_pll.frequency = clk_get_rate(_clk_mpll); | 433 | suspend_pll.frequency = clk_get_rate(_clk_mpll); |
434 | suspend_pll.index = __raw_readl(S3C2410_MPLLCON); | 434 | suspend_pll.driver_data = __raw_readl(S3C2410_MPLLCON); |
435 | suspend_freq = s3c_cpufreq_get(0) * 1000; | 435 | suspend_freq = s3c_cpufreq_get(0) * 1000; |
436 | 436 | ||
437 | return 0; | 437 | return 0; |
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c24xx/pll-s3c2410.c index dcf3420a3271..5e37d368594b 100644 --- a/arch/arm/mach-s3c24xx/pll-s3c2410.c +++ b/arch/arm/mach-s3c24xx/pll-s3c2410.c | |||
@@ -33,36 +33,36 @@ | |||
33 | #include <plat/cpu-freq-core.h> | 33 | #include <plat/cpu-freq-core.h> |
34 | 34 | ||
35 | static struct cpufreq_frequency_table pll_vals_12MHz[] = { | 35 | static struct cpufreq_frequency_table pll_vals_12MHz[] = { |
36 | { .frequency = 34000000, .index = PLLVAL(82, 2, 3), }, | 36 | { .frequency = 34000000, .driver_data = PLLVAL(82, 2, 3), }, |
37 | { .frequency = 45000000, .index = PLLVAL(82, 1, 3), }, | 37 | { .frequency = 45000000, .driver_data = PLLVAL(82, 1, 3), }, |
38 | { .frequency = 51000000, .index = PLLVAL(161, 3, 3), }, | 38 | { .frequency = 51000000, .driver_data = PLLVAL(161, 3, 3), }, |
39 | { .frequency = 48000000, .index = PLLVAL(120, 2, 3), }, | 39 | { .frequency = 48000000, .driver_data = PLLVAL(120, 2, 3), }, |
40 | { .frequency = 56000000, .index = PLLVAL(142, 2, 3), }, | 40 | { .frequency = 56000000, .driver_data = PLLVAL(142, 2, 3), }, |
41 | { .frequency = 68000000, .index = PLLVAL(82, 2, 2), }, | 41 | { .frequency = 68000000, .driver_data = PLLVAL(82, 2, 2), }, |
42 | { .frequency = 79000000, .index = PLLVAL(71, 1, 2), }, | 42 | { .frequency = 79000000, .driver_data = PLLVAL(71, 1, 2), }, |
43 | { .frequency = 85000000, .index = PLLVAL(105, 2, 2), }, | 43 | { .frequency = 85000000, .driver_data = PLLVAL(105, 2, 2), }, |
44 | { .frequency = 90000000, .index = PLLVAL(112, 2, 2), }, | 44 | { .frequency = 90000000, .driver_data = PLLVAL(112, 2, 2), }, |
45 | { .frequency = 101000000, .index = PLLVAL(127, 2, 2), }, | 45 | { .frequency = 101000000, .driver_data = PLLVAL(127, 2, 2), }, |
46 | { .frequency = 113000000, .index = PLLVAL(105, 1, 2), }, | 46 | { .frequency = 113000000, .driver_data = PLLVAL(105, 1, 2), }, |
47 | { .frequency = 118000000, .index = PLLVAL(150, 2, 2), }, | 47 | { .frequency = 118000000, .driver_data = PLLVAL(150, 2, 2), }, |
48 | { .frequency = 124000000, .index = PLLVAL(116, 1, 2), }, | 48 | { .frequency = 124000000, .driver_data = PLLVAL(116, 1, 2), }, |
49 | { .frequency = 135000000, .index = PLLVAL(82, 2, 1), }, | 49 | { .frequency = 135000000, .driver_data = PLLVAL(82, 2, 1), }, |
50 | { .frequency = 147000000, .index = PLLVAL(90, 2, 1), }, | 50 | { .frequency = 147000000, .driver_data = PLLVAL(90, 2, 1), }, |
51 | { .frequency = 152000000, .index = PLLVAL(68, 1, 1), }, | 51 | { .frequency = 152000000, .driver_data = PLLVAL(68, 1, 1), }, |
52 | { .frequency = 158000000, .index = PLLVAL(71, 1, 1), }, | 52 | { .frequency = 158000000, .driver_data = PLLVAL(71, 1, 1), }, |
53 | { .frequency = 170000000, .index = PLLVAL(77, 1, 1), }, | 53 | { .frequency = 170000000, .driver_data = PLLVAL(77, 1, 1), }, |
54 | { .frequency = 180000000, .index = PLLVAL(82, 1, 1), }, | 54 | { .frequency = 180000000, .driver_data = PLLVAL(82, 1, 1), }, |
55 | { .frequency = 186000000, .index = PLLVAL(85, 1, 1), }, | 55 | { .frequency = 186000000, .driver_data = PLLVAL(85, 1, 1), }, |
56 | { .frequency = 192000000, .index = PLLVAL(88, 1, 1), }, | 56 | { .frequency = 192000000, .driver_data = PLLVAL(88, 1, 1), }, |
57 | { .frequency = 203000000, .index = PLLVAL(161, 3, 1), }, | 57 | { .frequency = 203000000, .driver_data = PLLVAL(161, 3, 1), }, |
58 | 58 | ||
59 | /* 2410A extras */ | 59 | /* 2410A extras */ |
60 | 60 | ||
61 | { .frequency = 210000000, .index = PLLVAL(132, 2, 1), }, | 61 | { .frequency = 210000000, .driver_data = PLLVAL(132, 2, 1), }, |
62 | { .frequency = 226000000, .index = PLLVAL(105, 1, 1), }, | 62 | { .frequency = 226000000, .driver_data = PLLVAL(105, 1, 1), }, |
63 | { .frequency = 266000000, .index = PLLVAL(125, 1, 1), }, | 63 | { .frequency = 266000000, .driver_data = PLLVAL(125, 1, 1), }, |
64 | { .frequency = 268000000, .index = PLLVAL(126, 1, 1), }, | 64 | { .frequency = 268000000, .driver_data = PLLVAL(126, 1, 1), }, |
65 | { .frequency = 270000000, .index = PLLVAL(127, 1, 1), }, | 65 | { .frequency = 270000000, .driver_data = PLLVAL(127, 1, 1), }, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static int s3c2410_plls_add(struct device *dev, struct subsys_interface *sif) | 68 | static int s3c2410_plls_add(struct device *dev, struct subsys_interface *sif) |
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c index 673781758319..a19460e6e7b0 100644 --- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c | |||
@@ -21,33 +21,33 @@ | |||
21 | #include <plat/cpu-freq-core.h> | 21 | #include <plat/cpu-freq-core.h> |
22 | 22 | ||
23 | static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = { | 23 | static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = { |
24 | { .frequency = 75000000, .index = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */ | 24 | { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */ |
25 | { .frequency = 80000000, .index = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */ | 25 | { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */ |
26 | { .frequency = 90000000, .index = PLLVAL(0x70, 2, 3), }, /* FVco 720.000000 */ | 26 | { .frequency = 90000000, .driver_data = PLLVAL(0x70, 2, 3), }, /* FVco 720.000000 */ |
27 | { .frequency = 100000000, .index = PLLVAL(0x5c, 1, 3), }, /* FVco 800.000000 */ | 27 | { .frequency = 100000000, .driver_data = PLLVAL(0x5c, 1, 3), }, /* FVco 800.000000 */ |
28 | { .frequency = 110000000, .index = PLLVAL(0x66, 1, 3), }, /* FVco 880.000000 */ | 28 | { .frequency = 110000000, .driver_data = PLLVAL(0x66, 1, 3), }, /* FVco 880.000000 */ |
29 | { .frequency = 120000000, .index = PLLVAL(0x70, 1, 3), }, /* FVco 960.000000 */ | 29 | { .frequency = 120000000, .driver_data = PLLVAL(0x70, 1, 3), }, /* FVco 960.000000 */ |
30 | { .frequency = 150000000, .index = PLLVAL(0x75, 3, 2), }, /* FVco 600.000000 */ | 30 | { .frequency = 150000000, .driver_data = PLLVAL(0x75, 3, 2), }, /* FVco 600.000000 */ |
31 | { .frequency = 160000000, .index = PLLVAL(0x98, 4, 2), }, /* FVco 640.000000 */ | 31 | { .frequency = 160000000, .driver_data = PLLVAL(0x98, 4, 2), }, /* FVco 640.000000 */ |
32 | { .frequency = 170000000, .index = PLLVAL(0x4d, 1, 2), }, /* FVco 680.000000 */ | 32 | { .frequency = 170000000, .driver_data = PLLVAL(0x4d, 1, 2), }, /* FVco 680.000000 */ |
33 | { .frequency = 180000000, .index = PLLVAL(0x70, 2, 2), }, /* FVco 720.000000 */ | 33 | { .frequency = 180000000, .driver_data = PLLVAL(0x70, 2, 2), }, /* FVco 720.000000 */ |
34 | { .frequency = 190000000, .index = PLLVAL(0x57, 1, 2), }, /* FVco 760.000000 */ | 34 | { .frequency = 190000000, .driver_data = PLLVAL(0x57, 1, 2), }, /* FVco 760.000000 */ |
35 | { .frequency = 200000000, .index = PLLVAL(0x5c, 1, 2), }, /* FVco 800.000000 */ | 35 | { .frequency = 200000000, .driver_data = PLLVAL(0x5c, 1, 2), }, /* FVco 800.000000 */ |
36 | { .frequency = 210000000, .index = PLLVAL(0x84, 2, 2), }, /* FVco 840.000000 */ | 36 | { .frequency = 210000000, .driver_data = PLLVAL(0x84, 2, 2), }, /* FVco 840.000000 */ |
37 | { .frequency = 220000000, .index = PLLVAL(0x66, 1, 2), }, /* FVco 880.000000 */ | 37 | { .frequency = 220000000, .driver_data = PLLVAL(0x66, 1, 2), }, /* FVco 880.000000 */ |
38 | { .frequency = 230000000, .index = PLLVAL(0x6b, 1, 2), }, /* FVco 920.000000 */ | 38 | { .frequency = 230000000, .driver_data = PLLVAL(0x6b, 1, 2), }, /* FVco 920.000000 */ |
39 | { .frequency = 240000000, .index = PLLVAL(0x70, 1, 2), }, /* FVco 960.000000 */ | 39 | { .frequency = 240000000, .driver_data = PLLVAL(0x70, 1, 2), }, /* FVco 960.000000 */ |
40 | { .frequency = 300000000, .index = PLLVAL(0x75, 3, 1), }, /* FVco 600.000000 */ | 40 | { .frequency = 300000000, .driver_data = PLLVAL(0x75, 3, 1), }, /* FVco 600.000000 */ |
41 | { .frequency = 310000000, .index = PLLVAL(0x93, 4, 1), }, /* FVco 620.000000 */ | 41 | { .frequency = 310000000, .driver_data = PLLVAL(0x93, 4, 1), }, /* FVco 620.000000 */ |
42 | { .frequency = 320000000, .index = PLLVAL(0x98, 4, 1), }, /* FVco 640.000000 */ | 42 | { .frequency = 320000000, .driver_data = PLLVAL(0x98, 4, 1), }, /* FVco 640.000000 */ |
43 | { .frequency = 330000000, .index = PLLVAL(0x66, 2, 1), }, /* FVco 660.000000 */ | 43 | { .frequency = 330000000, .driver_data = PLLVAL(0x66, 2, 1), }, /* FVco 660.000000 */ |
44 | { .frequency = 340000000, .index = PLLVAL(0x4d, 1, 1), }, /* FVco 680.000000 */ | 44 | { .frequency = 340000000, .driver_data = PLLVAL(0x4d, 1, 1), }, /* FVco 680.000000 */ |
45 | { .frequency = 350000000, .index = PLLVAL(0xa7, 4, 1), }, /* FVco 700.000000 */ | 45 | { .frequency = 350000000, .driver_data = PLLVAL(0xa7, 4, 1), }, /* FVco 700.000000 */ |
46 | { .frequency = 360000000, .index = PLLVAL(0x70, 2, 1), }, /* FVco 720.000000 */ | 46 | { .frequency = 360000000, .driver_data = PLLVAL(0x70, 2, 1), }, /* FVco 720.000000 */ |
47 | { .frequency = 370000000, .index = PLLVAL(0xb1, 4, 1), }, /* FVco 740.000000 */ | 47 | { .frequency = 370000000, .driver_data = PLLVAL(0xb1, 4, 1), }, /* FVco 740.000000 */ |
48 | { .frequency = 380000000, .index = PLLVAL(0x57, 1, 1), }, /* FVco 760.000000 */ | 48 | { .frequency = 380000000, .driver_data = PLLVAL(0x57, 1, 1), }, /* FVco 760.000000 */ |
49 | { .frequency = 390000000, .index = PLLVAL(0x7a, 2, 1), }, /* FVco 780.000000 */ | 49 | { .frequency = 390000000, .driver_data = PLLVAL(0x7a, 2, 1), }, /* FVco 780.000000 */ |
50 | { .frequency = 400000000, .index = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */ | 50 | { .frequency = 400000000, .driver_data = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */ |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static int s3c2440_plls12_add(struct device *dev, struct subsys_interface *sif) | 53 | static int s3c2440_plls12_add(struct device *dev, struct subsys_interface *sif) |
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c index debfa106289b..1191b2905625 100644 --- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c | |||
@@ -21,61 +21,61 @@ | |||
21 | #include <plat/cpu-freq-core.h> | 21 | #include <plat/cpu-freq-core.h> |
22 | 22 | ||
23 | static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = { | 23 | static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = { |
24 | { .frequency = 78019200, .index = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */ | 24 | { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */ |
25 | { .frequency = 84067200, .index = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */ | 25 | { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */ |
26 | { .frequency = 90115200, .index = PLLVAL(141, 5, 3), }, /* FVco 720.921600 */ | 26 | { .frequency = 90115200, .driver_data = PLLVAL(141, 5, 3), }, /* FVco 720.921600 */ |
27 | { .frequency = 96163200, .index = PLLVAL(151, 5, 3), }, /* FVco 769.305600 */ | 27 | { .frequency = 96163200, .driver_data = PLLVAL(151, 5, 3), }, /* FVco 769.305600 */ |
28 | { .frequency = 102135600, .index = PLLVAL(185, 6, 3), }, /* FVco 817.084800 */ | 28 | { .frequency = 102135600, .driver_data = PLLVAL(185, 6, 3), }, /* FVco 817.084800 */ |
29 | { .frequency = 108259200, .index = PLLVAL(171, 5, 3), }, /* FVco 866.073600 */ | 29 | { .frequency = 108259200, .driver_data = PLLVAL(171, 5, 3), }, /* FVco 866.073600 */ |
30 | { .frequency = 114307200, .index = PLLVAL(127, 3, 3), }, /* FVco 914.457600 */ | 30 | { .frequency = 114307200, .driver_data = PLLVAL(127, 3, 3), }, /* FVco 914.457600 */ |
31 | { .frequency = 120234240, .index = PLLVAL(134, 3, 3), }, /* FVco 961.873920 */ | 31 | { .frequency = 120234240, .driver_data = PLLVAL(134, 3, 3), }, /* FVco 961.873920 */ |
32 | { .frequency = 126161280, .index = PLLVAL(141, 3, 3), }, /* FVco 1009.290240 */ | 32 | { .frequency = 126161280, .driver_data = PLLVAL(141, 3, 3), }, /* FVco 1009.290240 */ |
33 | { .frequency = 132088320, .index = PLLVAL(148, 3, 3), }, /* FVco 1056.706560 */ | 33 | { .frequency = 132088320, .driver_data = PLLVAL(148, 3, 3), }, /* FVco 1056.706560 */ |
34 | { .frequency = 138015360, .index = PLLVAL(155, 3, 3), }, /* FVco 1104.122880 */ | 34 | { .frequency = 138015360, .driver_data = PLLVAL(155, 3, 3), }, /* FVco 1104.122880 */ |
35 | { .frequency = 144789120, .index = PLLVAL(163, 3, 3), }, /* FVco 1158.312960 */ | 35 | { .frequency = 144789120, .driver_data = PLLVAL(163, 3, 3), }, /* FVco 1158.312960 */ |
36 | { .frequency = 150100363, .index = PLLVAL(187, 9, 2), }, /* FVco 600.401454 */ | 36 | { .frequency = 150100363, .driver_data = PLLVAL(187, 9, 2), }, /* FVco 600.401454 */ |
37 | { .frequency = 156038400, .index = PLLVAL(121, 5, 2), }, /* FVco 624.153600 */ | 37 | { .frequency = 156038400, .driver_data = PLLVAL(121, 5, 2), }, /* FVco 624.153600 */ |
38 | { .frequency = 162086400, .index = PLLVAL(126, 5, 2), }, /* FVco 648.345600 */ | 38 | { .frequency = 162086400, .driver_data = PLLVAL(126, 5, 2), }, /* FVco 648.345600 */ |
39 | { .frequency = 168134400, .index = PLLVAL(131, 5, 2), }, /* FVco 672.537600 */ | 39 | { .frequency = 168134400, .driver_data = PLLVAL(131, 5, 2), }, /* FVco 672.537600 */ |
40 | { .frequency = 174048000, .index = PLLVAL(177, 7, 2), }, /* FVco 696.192000 */ | 40 | { .frequency = 174048000, .driver_data = PLLVAL(177, 7, 2), }, /* FVco 696.192000 */ |
41 | { .frequency = 180230400, .index = PLLVAL(141, 5, 2), }, /* FVco 720.921600 */ | 41 | { .frequency = 180230400, .driver_data = PLLVAL(141, 5, 2), }, /* FVco 720.921600 */ |
42 | { .frequency = 186278400, .index = PLLVAL(124, 4, 2), }, /* FVco 745.113600 */ | 42 | { .frequency = 186278400, .driver_data = PLLVAL(124, 4, 2), }, /* FVco 745.113600 */ |
43 | { .frequency = 192326400, .index = PLLVAL(151, 5, 2), }, /* FVco 769.305600 */ | 43 | { .frequency = 192326400, .driver_data = PLLVAL(151, 5, 2), }, /* FVco 769.305600 */ |
44 | { .frequency = 198132480, .index = PLLVAL(109, 3, 2), }, /* FVco 792.529920 */ | 44 | { .frequency = 198132480, .driver_data = PLLVAL(109, 3, 2), }, /* FVco 792.529920 */ |
45 | { .frequency = 204271200, .index = PLLVAL(185, 6, 2), }, /* FVco 817.084800 */ | 45 | { .frequency = 204271200, .driver_data = PLLVAL(185, 6, 2), }, /* FVco 817.084800 */ |
46 | { .frequency = 210268800, .index = PLLVAL(141, 4, 2), }, /* FVco 841.075200 */ | 46 | { .frequency = 210268800, .driver_data = PLLVAL(141, 4, 2), }, /* FVco 841.075200 */ |
47 | { .frequency = 216518400, .index = PLLVAL(171, 5, 2), }, /* FVco 866.073600 */ | 47 | { .frequency = 216518400, .driver_data = PLLVAL(171, 5, 2), }, /* FVco 866.073600 */ |
48 | { .frequency = 222264000, .index = PLLVAL(97, 2, 2), }, /* FVco 889.056000 */ | 48 | { .frequency = 222264000, .driver_data = PLLVAL(97, 2, 2), }, /* FVco 889.056000 */ |
49 | { .frequency = 228614400, .index = PLLVAL(127, 3, 2), }, /* FVco 914.457600 */ | 49 | { .frequency = 228614400, .driver_data = PLLVAL(127, 3, 2), }, /* FVco 914.457600 */ |
50 | { .frequency = 234259200, .index = PLLVAL(158, 4, 2), }, /* FVco 937.036800 */ | 50 | { .frequency = 234259200, .driver_data = PLLVAL(158, 4, 2), }, /* FVco 937.036800 */ |
51 | { .frequency = 240468480, .index = PLLVAL(134, 3, 2), }, /* FVco 961.873920 */ | 51 | { .frequency = 240468480, .driver_data = PLLVAL(134, 3, 2), }, /* FVco 961.873920 */ |
52 | { .frequency = 246960000, .index = PLLVAL(167, 4, 2), }, /* FVco 987.840000 */ | 52 | { .frequency = 246960000, .driver_data = PLLVAL(167, 4, 2), }, /* FVco 987.840000 */ |
53 | { .frequency = 252322560, .index = PLLVAL(141, 3, 2), }, /* FVco 1009.290240 */ | 53 | { .frequency = 252322560, .driver_data = PLLVAL(141, 3, 2), }, /* FVco 1009.290240 */ |
54 | { .frequency = 258249600, .index = PLLVAL(114, 2, 2), }, /* FVco 1032.998400 */ | 54 | { .frequency = 258249600, .driver_data = PLLVAL(114, 2, 2), }, /* FVco 1032.998400 */ |
55 | { .frequency = 264176640, .index = PLLVAL(148, 3, 2), }, /* FVco 1056.706560 */ | 55 | { .frequency = 264176640, .driver_data = PLLVAL(148, 3, 2), }, /* FVco 1056.706560 */ |
56 | { .frequency = 270950400, .index = PLLVAL(120, 2, 2), }, /* FVco 1083.801600 */ | 56 | { .frequency = 270950400, .driver_data = PLLVAL(120, 2, 2), }, /* FVco 1083.801600 */ |
57 | { .frequency = 276030720, .index = PLLVAL(155, 3, 2), }, /* FVco 1104.122880 */ | 57 | { .frequency = 276030720, .driver_data = PLLVAL(155, 3, 2), }, /* FVco 1104.122880 */ |
58 | { .frequency = 282240000, .index = PLLVAL(92, 1, 2), }, /* FVco 1128.960000 */ | 58 | { .frequency = 282240000, .driver_data = PLLVAL(92, 1, 2), }, /* FVco 1128.960000 */ |
59 | { .frequency = 289578240, .index = PLLVAL(163, 3, 2), }, /* FVco 1158.312960 */ | 59 | { .frequency = 289578240, .driver_data = PLLVAL(163, 3, 2), }, /* FVco 1158.312960 */ |
60 | { .frequency = 294235200, .index = PLLVAL(131, 2, 2), }, /* FVco 1176.940800 */ | 60 | { .frequency = 294235200, .driver_data = PLLVAL(131, 2, 2), }, /* FVco 1176.940800 */ |
61 | { .frequency = 300200727, .index = PLLVAL(187, 9, 1), }, /* FVco 600.401454 */ | 61 | { .frequency = 300200727, .driver_data = PLLVAL(187, 9, 1), }, /* FVco 600.401454 */ |
62 | { .frequency = 306358690, .index = PLLVAL(191, 9, 1), }, /* FVco 612.717380 */ | 62 | { .frequency = 306358690, .driver_data = PLLVAL(191, 9, 1), }, /* FVco 612.717380 */ |
63 | { .frequency = 312076800, .index = PLLVAL(121, 5, 1), }, /* FVco 624.153600 */ | 63 | { .frequency = 312076800, .driver_data = PLLVAL(121, 5, 1), }, /* FVco 624.153600 */ |
64 | { .frequency = 318366720, .index = PLLVAL(86, 3, 1), }, /* FVco 636.733440 */ | 64 | { .frequency = 318366720, .driver_data = PLLVAL(86, 3, 1), }, /* FVco 636.733440 */ |
65 | { .frequency = 324172800, .index = PLLVAL(126, 5, 1), }, /* FVco 648.345600 */ | 65 | { .frequency = 324172800, .driver_data = PLLVAL(126, 5, 1), }, /* FVco 648.345600 */ |
66 | { .frequency = 330220800, .index = PLLVAL(109, 4, 1), }, /* FVco 660.441600 */ | 66 | { .frequency = 330220800, .driver_data = PLLVAL(109, 4, 1), }, /* FVco 660.441600 */ |
67 | { .frequency = 336268800, .index = PLLVAL(131, 5, 1), }, /* FVco 672.537600 */ | 67 | { .frequency = 336268800, .driver_data = PLLVAL(131, 5, 1), }, /* FVco 672.537600 */ |
68 | { .frequency = 342074880, .index = PLLVAL(93, 3, 1), }, /* FVco 684.149760 */ | 68 | { .frequency = 342074880, .driver_data = PLLVAL(93, 3, 1), }, /* FVco 684.149760 */ |
69 | { .frequency = 348096000, .index = PLLVAL(177, 7, 1), }, /* FVco 696.192000 */ | 69 | { .frequency = 348096000, .driver_data = PLLVAL(177, 7, 1), }, /* FVco 696.192000 */ |
70 | { .frequency = 355622400, .index = PLLVAL(118, 4, 1), }, /* FVco 711.244800 */ | 70 | { .frequency = 355622400, .driver_data = PLLVAL(118, 4, 1), }, /* FVco 711.244800 */ |
71 | { .frequency = 360460800, .index = PLLVAL(141, 5, 1), }, /* FVco 720.921600 */ | 71 | { .frequency = 360460800, .driver_data = PLLVAL(141, 5, 1), }, /* FVco 720.921600 */ |
72 | { .frequency = 366206400, .index = PLLVAL(165, 6, 1), }, /* FVco 732.412800 */ | 72 | { .frequency = 366206400, .driver_data = PLLVAL(165, 6, 1), }, /* FVco 732.412800 */ |
73 | { .frequency = 372556800, .index = PLLVAL(124, 4, 1), }, /* FVco 745.113600 */ | 73 | { .frequency = 372556800, .driver_data = PLLVAL(124, 4, 1), }, /* FVco 745.113600 */ |
74 | { .frequency = 378201600, .index = PLLVAL(126, 4, 1), }, /* FVco 756.403200 */ | 74 | { .frequency = 378201600, .driver_data = PLLVAL(126, 4, 1), }, /* FVco 756.403200 */ |
75 | { .frequency = 384652800, .index = PLLVAL(151, 5, 1), }, /* FVco 769.305600 */ | 75 | { .frequency = 384652800, .driver_data = PLLVAL(151, 5, 1), }, /* FVco 769.305600 */ |
76 | { .frequency = 391608000, .index = PLLVAL(177, 6, 1), }, /* FVco 783.216000 */ | 76 | { .frequency = 391608000, .driver_data = PLLVAL(177, 6, 1), }, /* FVco 783.216000 */ |
77 | { .frequency = 396264960, .index = PLLVAL(109, 3, 1), }, /* FVco 792.529920 */ | 77 | { .frequency = 396264960, .driver_data = PLLVAL(109, 3, 1), }, /* FVco 792.529920 */ |
78 | { .frequency = 402192000, .index = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */ | 78 | { .frequency = 402192000, .driver_data = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */ |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static int s3c2440_plls169344_add(struct device *dev, | 81 | static int s3c2440_plls169344_add(struct device *dev, |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 7e105932c09d..5390c6bbbc02 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -142,15 +142,15 @@ static void pllc2_table_rebuild(struct clk *clk) | |||
142 | /* Initialise PLLC2 frequency table */ | 142 | /* Initialise PLLC2 frequency table */ |
143 | for (i = 0; i < ARRAY_SIZE(pllc2_freq_table) - 2; i++) { | 143 | for (i = 0; i < ARRAY_SIZE(pllc2_freq_table) - 2; i++) { |
144 | pllc2_freq_table[i].frequency = clk->parent->rate * (i + 20) * 2; | 144 | pllc2_freq_table[i].frequency = clk->parent->rate * (i + 20) * 2; |
145 | pllc2_freq_table[i].index = i; | 145 | pllc2_freq_table[i].driver_data = i; |
146 | } | 146 | } |
147 | 147 | ||
148 | /* This is a special entry - switching PLL off makes it a repeater */ | 148 | /* This is a special entry - switching PLL off makes it a repeater */ |
149 | pllc2_freq_table[i].frequency = clk->parent->rate; | 149 | pllc2_freq_table[i].frequency = clk->parent->rate; |
150 | pllc2_freq_table[i].index = i; | 150 | pllc2_freq_table[i].driver_data = i; |
151 | 151 | ||
152 | pllc2_freq_table[++i].frequency = CPUFREQ_TABLE_END; | 152 | pllc2_freq_table[++i].frequency = CPUFREQ_TABLE_END; |
153 | pllc2_freq_table[i].index = i; | 153 | pllc2_freq_table[i].driver_data = i; |
154 | } | 154 | } |
155 | 155 | ||
156 | static unsigned long pllc2_recalc(struct clk *clk) | 156 | static unsigned long pllc2_recalc(struct clk *clk) |
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h index 95509d8eb140..a8a760ddfae1 100644 --- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h +++ b/arch/arm/plat-samsung/include/plat/cpu-freq-core.h | |||
@@ -285,7 +285,7 @@ static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table, | |||
285 | s3c_freq_dbg("%s: { %d = %u kHz }\n", | 285 | s3c_freq_dbg("%s: { %d = %u kHz }\n", |
286 | __func__, index, freq); | 286 | __func__, index, freq); |
287 | 287 | ||
288 | table[index].index = index; | 288 | table[index].driver_data = index; |
289 | table[index].frequency = freq; | 289 | table[index].frequency = freq; |
290 | } | 290 | } |
291 | 291 | ||
diff --git a/arch/mips/loongson/lemote-2f/clock.c b/arch/mips/loongson/lemote-2f/clock.c index bc739d4bab2e..4dc2f5fa3f67 100644 --- a/arch/mips/loongson/lemote-2f/clock.c +++ b/arch/mips/loongson/lemote-2f/clock.c | |||
@@ -121,7 +121,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
121 | clk->rate = rate; | 121 | clk->rate = rate; |
122 | 122 | ||
123 | regval = LOONGSON_CHIPCFG0; | 123 | regval = LOONGSON_CHIPCFG0; |
124 | regval = (regval & ~0x7) | (loongson2_clockmod_table[i].index - 1); | 124 | regval = (regval & ~0x7) | |
125 | (loongson2_clockmod_table[i].driver_data - 1); | ||
125 | LOONGSON_CHIPCFG0 = regval; | 126 | LOONGSON_CHIPCFG0 = regval; |
126 | 127 | ||
127 | return ret; | 128 | return ret; |
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c index be1e7958909e..b704da404067 100644 --- a/arch/powerpc/platforms/pasemi/cpufreq.c +++ b/arch/powerpc/platforms/pasemi/cpufreq.c | |||
@@ -204,7 +204,8 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
204 | 204 | ||
205 | /* initialize frequency table */ | 205 | /* initialize frequency table */ |
206 | for (i=0; pas_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) { | 206 | for (i=0; pas_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) { |
207 | pas_freqs[i].frequency = get_astate_freq(pas_freqs[i].index) * 100000; | 207 | pas_freqs[i].frequency = |
208 | get_astate_freq(pas_freqs[i].driver_data) * 100000; | ||
208 | pr_debug("%d: %d\n", i, pas_freqs[i].frequency); | 209 | pr_debug("%d: %d\n", i, pas_freqs[i].frequency); |
209 | } | 210 | } |
210 | 211 | ||
@@ -280,7 +281,7 @@ static int pas_cpufreq_target(struct cpufreq_policy *policy, | |||
280 | pr_debug("setting frequency for cpu %d to %d kHz, 1/%d of max frequency\n", | 281 | pr_debug("setting frequency for cpu %d to %d kHz, 1/%d of max frequency\n", |
281 | policy->cpu, | 282 | policy->cpu, |
282 | pas_freqs[pas_astate_new].frequency, | 283 | pas_freqs[pas_astate_new].frequency, |
283 | pas_freqs[pas_astate_new].index); | 284 | pas_freqs[pas_astate_new].driver_data); |
284 | 285 | ||
285 | current_astate = pas_astate_new; | 286 | current_astate = pas_astate_new; |
286 | 287 | ||
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index f0077cb8e249..c8ec186303db 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c | |||
@@ -648,14 +648,14 @@ int opp_init_cpufreq_table(struct device *dev, | |||
648 | 648 | ||
649 | list_for_each_entry(opp, &dev_opp->opp_list, node) { | 649 | list_for_each_entry(opp, &dev_opp->opp_list, node) { |
650 | if (opp->available) { | 650 | if (opp->available) { |
651 | freq_table[i].index = i; | 651 | freq_table[i].driver_data = i; |
652 | freq_table[i].frequency = opp->rate / 1000; | 652 | freq_table[i].frequency = opp->rate / 1000; |
653 | i++; | 653 | i++; |
654 | } | 654 | } |
655 | } | 655 | } |
656 | mutex_unlock(&dev_opp_list_lock); | 656 | mutex_unlock(&dev_opp_list_lock); |
657 | 657 | ||
658 | freq_table[i].index = i; | 658 | freq_table[i].driver_data = i; |
659 | freq_table[i].frequency = CPUFREQ_TABLE_END; | 659 | freq_table[i].frequency = CPUFREQ_TABLE_END; |
660 | 660 | ||
661 | *table = &freq_table[0]; | 661 | *table = &freq_table[0]; |
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 8c02622b35a4..0d25677fb37d 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c | |||
@@ -232,7 +232,7 @@ static unsigned extract_msr(u32 msr, struct acpi_cpufreq_data *data) | |||
232 | perf = data->acpi_data; | 232 | perf = data->acpi_data; |
233 | 233 | ||
234 | for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) { | 234 | for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) { |
235 | if (msr == perf->states[data->freq_table[i].index].status) | 235 | if (msr == perf->states[data->freq_table[i].driver_data].status) |
236 | return data->freq_table[i].frequency; | 236 | return data->freq_table[i].frequency; |
237 | } | 237 | } |
238 | return data->freq_table[0].frequency; | 238 | return data->freq_table[0].frequency; |
@@ -442,7 +442,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
442 | goto out; | 442 | goto out; |
443 | } | 443 | } |
444 | 444 | ||
445 | next_perf_state = data->freq_table[next_state].index; | 445 | next_perf_state = data->freq_table[next_state].driver_data; |
446 | if (perf->state == next_perf_state) { | 446 | if (perf->state == next_perf_state) { |
447 | if (unlikely(data->resume)) { | 447 | if (unlikely(data->resume)) { |
448 | pr_debug("Called after resume, resetting to P%d\n", | 448 | pr_debug("Called after resume, resetting to P%d\n", |
@@ -811,7 +811,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
811 | data->freq_table[valid_states-1].frequency / 1000) | 811 | data->freq_table[valid_states-1].frequency / 1000) |
812 | continue; | 812 | continue; |
813 | 813 | ||
814 | data->freq_table[valid_states].index = i; | 814 | data->freq_table[valid_states].driver_data = i; |
815 | data->freq_table[valid_states].frequency = | 815 | data->freq_table[valid_states].frequency = |
816 | perf->states[i].core_frequency * 1000; | 816 | perf->states[i].core_frequency * 1000; |
817 | valid_states++; | 817 | valid_states++; |
diff --git a/drivers/cpufreq/blackfin-cpufreq.c b/drivers/cpufreq/blackfin-cpufreq.c index 995511e80bef..9cdbbd278a80 100644 --- a/drivers/cpufreq/blackfin-cpufreq.c +++ b/drivers/cpufreq/blackfin-cpufreq.c | |||
@@ -20,23 +20,23 @@ | |||
20 | 20 | ||
21 | 21 | ||
22 | /* this is the table of CCLK frequencies, in Hz */ | 22 | /* this is the table of CCLK frequencies, in Hz */ |
23 | /* .index is the entry in the auxiliary dpm_state_table[] */ | 23 | /* .driver_data is the entry in the auxiliary dpm_state_table[] */ |
24 | static struct cpufreq_frequency_table bfin_freq_table[] = { | 24 | static struct cpufreq_frequency_table bfin_freq_table[] = { |
25 | { | 25 | { |
26 | .frequency = CPUFREQ_TABLE_END, | 26 | .frequency = CPUFREQ_TABLE_END, |
27 | .index = 0, | 27 | .driver_data = 0, |
28 | }, | 28 | }, |
29 | { | 29 | { |
30 | .frequency = CPUFREQ_TABLE_END, | 30 | .frequency = CPUFREQ_TABLE_END, |
31 | .index = 1, | 31 | .driver_data = 1, |
32 | }, | 32 | }, |
33 | { | 33 | { |
34 | .frequency = CPUFREQ_TABLE_END, | 34 | .frequency = CPUFREQ_TABLE_END, |
35 | .index = 2, | 35 | .driver_data = 2, |
36 | }, | 36 | }, |
37 | { | 37 | { |
38 | .frequency = CPUFREQ_TABLE_END, | 38 | .frequency = CPUFREQ_TABLE_END, |
39 | .index = 0, | 39 | .driver_data = 0, |
40 | }, | 40 | }, |
41 | }; | 41 | }; |
42 | 42 | ||
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index 37380fb92621..324aff20aeef 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c | |||
@@ -188,7 +188,7 @@ static int eps_target(struct cpufreq_policy *policy, | |||
188 | } | 188 | } |
189 | 189 | ||
190 | /* Make frequency transition */ | 190 | /* Make frequency transition */ |
191 | dest_state = centaur->freq_table[newstate].index & 0xffff; | 191 | dest_state = centaur->freq_table[newstate].driver_data & 0xffff; |
192 | ret = eps_set_state(centaur, policy, dest_state); | 192 | ret = eps_set_state(centaur, policy, dest_state); |
193 | if (ret) | 193 | if (ret) |
194 | printk(KERN_ERR "eps: Timeout!\n"); | 194 | printk(KERN_ERR "eps: Timeout!\n"); |
@@ -380,9 +380,9 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
380 | f_table = ¢aur->freq_table[0]; | 380 | f_table = ¢aur->freq_table[0]; |
381 | if (brand != EPS_BRAND_C7M) { | 381 | if (brand != EPS_BRAND_C7M) { |
382 | f_table[0].frequency = fsb * min_multiplier; | 382 | f_table[0].frequency = fsb * min_multiplier; |
383 | f_table[0].index = (min_multiplier << 8) | min_voltage; | 383 | f_table[0].driver_data = (min_multiplier << 8) | min_voltage; |
384 | f_table[1].frequency = fsb * max_multiplier; | 384 | f_table[1].frequency = fsb * max_multiplier; |
385 | f_table[1].index = (max_multiplier << 8) | max_voltage; | 385 | f_table[1].driver_data = (max_multiplier << 8) | max_voltage; |
386 | f_table[2].frequency = CPUFREQ_TABLE_END; | 386 | f_table[2].frequency = CPUFREQ_TABLE_END; |
387 | } else { | 387 | } else { |
388 | k = 0; | 388 | k = 0; |
@@ -391,7 +391,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
391 | for (i = min_multiplier; i <= max_multiplier; i++) { | 391 | for (i = min_multiplier; i <= max_multiplier; i++) { |
392 | voltage = (k * step) / 256 + min_voltage; | 392 | voltage = (k * step) / 256 + min_voltage; |
393 | f_table[k].frequency = fsb * i; | 393 | f_table[k].frequency = fsb * i; |
394 | f_table[k].index = (i << 8) | voltage; | 394 | f_table[k].driver_data = (i << 8) | voltage; |
395 | k++; | 395 | k++; |
396 | } | 396 | } |
397 | f_table[k].frequency = CPUFREQ_TABLE_END; | 397 | f_table[k].frequency = CPUFREQ_TABLE_END; |
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index d7a79662e24c..f0d87412cc91 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c | |||
@@ -34,8 +34,8 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, | |||
34 | 34 | ||
35 | continue; | 35 | continue; |
36 | } | 36 | } |
37 | pr_debug("table entry %u: %u kHz, %u index\n", | 37 | pr_debug("table entry %u: %u kHz, %u driver_data\n", |
38 | i, freq, table[i].index); | 38 | i, freq, table[i].driver_data); |
39 | if (freq < min_freq) | 39 | if (freq < min_freq) |
40 | min_freq = freq; | 40 | min_freq = freq; |
41 | if (freq > max_freq) | 41 | if (freq > max_freq) |
@@ -97,11 +97,11 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, | |||
97 | unsigned int *index) | 97 | unsigned int *index) |
98 | { | 98 | { |
99 | struct cpufreq_frequency_table optimal = { | 99 | struct cpufreq_frequency_table optimal = { |
100 | .index = ~0, | 100 | .driver_data = ~0, |
101 | .frequency = 0, | 101 | .frequency = 0, |
102 | }; | 102 | }; |
103 | struct cpufreq_frequency_table suboptimal = { | 103 | struct cpufreq_frequency_table suboptimal = { |
104 | .index = ~0, | 104 | .driver_data = ~0, |
105 | .frequency = 0, | 105 | .frequency = 0, |
106 | }; | 106 | }; |
107 | unsigned int i; | 107 | unsigned int i; |
@@ -129,12 +129,12 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, | |||
129 | if (freq <= target_freq) { | 129 | if (freq <= target_freq) { |
130 | if (freq >= optimal.frequency) { | 130 | if (freq >= optimal.frequency) { |
131 | optimal.frequency = freq; | 131 | optimal.frequency = freq; |
132 | optimal.index = i; | 132 | optimal.driver_data = i; |
133 | } | 133 | } |
134 | } else { | 134 | } else { |
135 | if (freq <= suboptimal.frequency) { | 135 | if (freq <= suboptimal.frequency) { |
136 | suboptimal.frequency = freq; | 136 | suboptimal.frequency = freq; |
137 | suboptimal.index = i; | 137 | suboptimal.driver_data = i; |
138 | } | 138 | } |
139 | } | 139 | } |
140 | break; | 140 | break; |
@@ -142,26 +142,26 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, | |||
142 | if (freq >= target_freq) { | 142 | if (freq >= target_freq) { |
143 | if (freq <= optimal.frequency) { | 143 | if (freq <= optimal.frequency) { |
144 | optimal.frequency = freq; | 144 | optimal.frequency = freq; |
145 | optimal.index = i; | 145 | optimal.driver_data = i; |
146 | } | 146 | } |
147 | } else { | 147 | } else { |
148 | if (freq >= suboptimal.frequency) { | 148 | if (freq >= suboptimal.frequency) { |
149 | suboptimal.frequency = freq; | 149 | suboptimal.frequency = freq; |
150 | suboptimal.index = i; | 150 | suboptimal.driver_data = i; |
151 | } | 151 | } |
152 | } | 152 | } |
153 | break; | 153 | break; |
154 | } | 154 | } |
155 | } | 155 | } |
156 | if (optimal.index > i) { | 156 | if (optimal.driver_data > i) { |
157 | if (suboptimal.index > i) | 157 | if (suboptimal.driver_data > i) |
158 | return -EINVAL; | 158 | return -EINVAL; |
159 | *index = suboptimal.index; | 159 | *index = suboptimal.driver_data; |
160 | } else | 160 | } else |
161 | *index = optimal.index; | 161 | *index = optimal.driver_data; |
162 | 162 | ||
163 | pr_debug("target is %u (%u kHz, %u)\n", *index, table[*index].frequency, | 163 | pr_debug("target is %u (%u kHz, %u)\n", *index, table[*index].frequency, |
164 | table[*index].index); | 164 | table[*index].driver_data); |
165 | 165 | ||
166 | return 0; | 166 | return 0; |
167 | } | 167 | } |
diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index c0075dbaa633..573c14ea802d 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c | |||
@@ -326,7 +326,7 @@ acpi_cpufreq_cpu_init ( | |||
326 | /* table init */ | 326 | /* table init */ |
327 | for (i = 0; i <= data->acpi_data.state_count; i++) | 327 | for (i = 0; i <= data->acpi_data.state_count; i++) |
328 | { | 328 | { |
329 | data->freq_table[i].index = i; | 329 | data->freq_table[i].driver_data = i; |
330 | if (i < data->acpi_data.state_count) { | 330 | if (i < data->acpi_data.state_count) { |
331 | data->freq_table[i].frequency = | 331 | data->freq_table[i].frequency = |
332 | data->acpi_data.states[i].core_frequency * 1000; | 332 | data->acpi_data.states[i].core_frequency * 1000; |
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c index b2644af985ec..c233ea617366 100644 --- a/drivers/cpufreq/kirkwood-cpufreq.c +++ b/drivers/cpufreq/kirkwood-cpufreq.c | |||
@@ -59,7 +59,7 @@ static void kirkwood_cpufreq_set_cpu_state(struct cpufreq_policy *policy, | |||
59 | unsigned int index) | 59 | unsigned int index) |
60 | { | 60 | { |
61 | struct cpufreq_freqs freqs; | 61 | struct cpufreq_freqs freqs; |
62 | unsigned int state = kirkwood_freq_table[index].index; | 62 | unsigned int state = kirkwood_freq_table[index].driver_data; |
63 | unsigned long reg; | 63 | unsigned long reg; |
64 | 64 | ||
65 | freqs.old = kirkwood_cpufreq_get_cpu_frequency(0); | 65 | freqs.old = kirkwood_cpufreq_get_cpu_frequency(0); |
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index b448638e34de..b6a0a7a406b0 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c | |||
@@ -254,7 +254,7 @@ static void longhaul_setstate(struct cpufreq_policy *policy, | |||
254 | u32 bm_timeout = 1000; | 254 | u32 bm_timeout = 1000; |
255 | unsigned int dir = 0; | 255 | unsigned int dir = 0; |
256 | 256 | ||
257 | mults_index = longhaul_table[table_index].index; | 257 | mults_index = longhaul_table[table_index].driver_data; |
258 | /* Safety precautions */ | 258 | /* Safety precautions */ |
259 | mult = mults[mults_index & 0x1f]; | 259 | mult = mults[mults_index & 0x1f]; |
260 | if (mult == -1) | 260 | if (mult == -1) |
@@ -487,7 +487,7 @@ static int __cpuinit longhaul_get_ranges(void) | |||
487 | if (ratio > maxmult || ratio < minmult) | 487 | if (ratio > maxmult || ratio < minmult) |
488 | continue; | 488 | continue; |
489 | longhaul_table[k].frequency = calc_speed(ratio); | 489 | longhaul_table[k].frequency = calc_speed(ratio); |
490 | longhaul_table[k].index = j; | 490 | longhaul_table[k].driver_data = j; |
491 | k++; | 491 | k++; |
492 | } | 492 | } |
493 | if (k <= 1) { | 493 | if (k <= 1) { |
@@ -508,8 +508,8 @@ static int __cpuinit longhaul_get_ranges(void) | |||
508 | if (min_i != j) { | 508 | if (min_i != j) { |
509 | swap(longhaul_table[j].frequency, | 509 | swap(longhaul_table[j].frequency, |
510 | longhaul_table[min_i].frequency); | 510 | longhaul_table[min_i].frequency); |
511 | swap(longhaul_table[j].index, | 511 | swap(longhaul_table[j].driver_data, |
512 | longhaul_table[min_i].index); | 512 | longhaul_table[min_i].driver_data); |
513 | } | 513 | } |
514 | } | 514 | } |
515 | 515 | ||
@@ -517,7 +517,7 @@ static int __cpuinit longhaul_get_ranges(void) | |||
517 | 517 | ||
518 | /* Find index we are running on */ | 518 | /* Find index we are running on */ |
519 | for (j = 0; j < k; j++) { | 519 | for (j = 0; j < k; j++) { |
520 | if (mults[longhaul_table[j].index & 0x1f] == mult) { | 520 | if (mults[longhaul_table[j].driver_data & 0x1f] == mult) { |
521 | longhaul_index = j; | 521 | longhaul_index = j; |
522 | break; | 522 | break; |
523 | } | 523 | } |
@@ -613,7 +613,7 @@ static void __cpuinit longhaul_setup_voltagescaling(void) | |||
613 | pos = (speed - min_vid_speed) / kHz_step + minvid.pos; | 613 | pos = (speed - min_vid_speed) / kHz_step + minvid.pos; |
614 | else | 614 | else |
615 | pos = minvid.pos; | 615 | pos = minvid.pos; |
616 | longhaul_table[j].index |= mV_vrm_table[pos] << 8; | 616 | longhaul_table[j].driver_data |= mV_vrm_table[pos] << 8; |
617 | vid = vrm_mV_table[mV_vrm_table[pos]]; | 617 | vid = vrm_mV_table[mV_vrm_table[pos]]; |
618 | printk(KERN_INFO PFX "f: %d kHz, index: %d, vid: %d mV\n", | 618 | printk(KERN_INFO PFX "f: %d kHz, index: %d, vid: %d mV\n", |
619 | speed, j, vid.mV); | 619 | speed, j, vid.mV); |
@@ -656,12 +656,12 @@ static int longhaul_target(struct cpufreq_policy *policy, | |||
656 | * this in hardware, C3 is old and we need to do this | 656 | * this in hardware, C3 is old and we need to do this |
657 | * in software. */ | 657 | * in software. */ |
658 | i = longhaul_index; | 658 | i = longhaul_index; |
659 | current_vid = (longhaul_table[longhaul_index].index >> 8); | 659 | current_vid = (longhaul_table[longhaul_index].driver_data >> 8); |
660 | current_vid &= 0x1f; | 660 | current_vid &= 0x1f; |
661 | if (table_index > longhaul_index) | 661 | if (table_index > longhaul_index) |
662 | dir = 1; | 662 | dir = 1; |
663 | while (i != table_index) { | 663 | while (i != table_index) { |
664 | vid = (longhaul_table[i].index >> 8) & 0x1f; | 664 | vid = (longhaul_table[i].driver_data >> 8) & 0x1f; |
665 | if (vid != current_vid) { | 665 | if (vid != current_vid) { |
666 | longhaul_setstate(policy, i); | 666 | longhaul_setstate(policy, i); |
667 | current_vid = vid; | 667 | current_vid = vid; |
diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c index d53912768946..bb838b985077 100644 --- a/drivers/cpufreq/loongson2_cpufreq.c +++ b/drivers/cpufreq/loongson2_cpufreq.c | |||
@@ -72,7 +72,7 @@ static int loongson2_cpufreq_target(struct cpufreq_policy *policy, | |||
72 | 72 | ||
73 | freq = | 73 | freq = |
74 | ((cpu_clock_freq / 1000) * | 74 | ((cpu_clock_freq / 1000) * |
75 | loongson2_clockmod_table[newstate].index) / 8; | 75 | loongson2_clockmod_table[newstate].driver_data) / 8; |
76 | if (freq < policy->min || freq > policy->max) | 76 | if (freq < policy->min || freq > policy->max) |
77 | return -EINVAL; | 77 | return -EINVAL; |
78 | 78 | ||
diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c index 421ef37d0bb3..9ee78170ff86 100644 --- a/drivers/cpufreq/p4-clockmod.c +++ b/drivers/cpufreq/p4-clockmod.c | |||
@@ -118,7 +118,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy, | |||
118 | return -EINVAL; | 118 | return -EINVAL; |
119 | 119 | ||
120 | freqs.old = cpufreq_p4_get(policy->cpu); | 120 | freqs.old = cpufreq_p4_get(policy->cpu); |
121 | freqs.new = stock_freq * p4clockmod_table[newstate].index / 8; | 121 | freqs.new = stock_freq * p4clockmod_table[newstate].driver_data / 8; |
122 | 122 | ||
123 | if (freqs.new == freqs.old) | 123 | if (freqs.new == freqs.old) |
124 | return 0; | 124 | return 0; |
@@ -131,7 +131,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy, | |||
131 | * Developer's Manual, Volume 3 | 131 | * Developer's Manual, Volume 3 |
132 | */ | 132 | */ |
133 | for_each_cpu(i, policy->cpus) | 133 | for_each_cpu(i, policy->cpus) |
134 | cpufreq_p4_setdc(i, p4clockmod_table[newstate].index); | 134 | cpufreq_p4_setdc(i, p4clockmod_table[newstate].driver_data); |
135 | 135 | ||
136 | /* notifiers */ | 136 | /* notifiers */ |
137 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); | 137 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); |
diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c index ea0222a45b7b..ea8e10382ec5 100644 --- a/drivers/cpufreq/powernow-k6.c +++ b/drivers/cpufreq/powernow-k6.c | |||
@@ -58,7 +58,7 @@ static int powernow_k6_get_cpu_multiplier(void) | |||
58 | msrval = POWERNOW_IOPORT + 0x0; | 58 | msrval = POWERNOW_IOPORT + 0x0; |
59 | wrmsr(MSR_K6_EPMR, msrval, 0); /* disable it again */ | 59 | wrmsr(MSR_K6_EPMR, msrval, 0); /* disable it again */ |
60 | 60 | ||
61 | return clock_ratio[(invalue >> 5)&7].index; | 61 | return clock_ratio[(invalue >> 5)&7].driver_data; |
62 | } | 62 | } |
63 | 63 | ||
64 | 64 | ||
@@ -75,13 +75,13 @@ static void powernow_k6_set_state(struct cpufreq_policy *policy, | |||
75 | unsigned long msrval; | 75 | unsigned long msrval; |
76 | struct cpufreq_freqs freqs; | 76 | struct cpufreq_freqs freqs; |
77 | 77 | ||
78 | if (clock_ratio[best_i].index > max_multiplier) { | 78 | if (clock_ratio[best_i].driver_data > max_multiplier) { |
79 | printk(KERN_ERR PFX "invalid target frequency\n"); | 79 | printk(KERN_ERR PFX "invalid target frequency\n"); |
80 | return; | 80 | return; |
81 | } | 81 | } |
82 | 82 | ||
83 | freqs.old = busfreq * powernow_k6_get_cpu_multiplier(); | 83 | freqs.old = busfreq * powernow_k6_get_cpu_multiplier(); |
84 | freqs.new = busfreq * clock_ratio[best_i].index; | 84 | freqs.new = busfreq * clock_ratio[best_i].driver_data; |
85 | 85 | ||
86 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); | 86 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); |
87 | 87 | ||
@@ -156,7 +156,7 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) | |||
156 | 156 | ||
157 | /* table init */ | 157 | /* table init */ |
158 | for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) { | 158 | for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) { |
159 | f = clock_ratio[i].index; | 159 | f = clock_ratio[i].driver_data; |
160 | if (f > max_multiplier) | 160 | if (f > max_multiplier) |
161 | clock_ratio[i].frequency = CPUFREQ_ENTRY_INVALID; | 161 | clock_ratio[i].frequency = CPUFREQ_ENTRY_INVALID; |
162 | else | 162 | else |
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index 53888dacbe58..b9f80b713fda 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c | |||
@@ -186,7 +186,7 @@ static int get_ranges(unsigned char *pst) | |||
186 | fid = *pst++; | 186 | fid = *pst++; |
187 | 187 | ||
188 | powernow_table[j].frequency = (fsb * fid_codes[fid]) / 10; | 188 | powernow_table[j].frequency = (fsb * fid_codes[fid]) / 10; |
189 | powernow_table[j].index = fid; /* lower 8 bits */ | 189 | powernow_table[j].driver_data = fid; /* lower 8 bits */ |
190 | 190 | ||
191 | speed = powernow_table[j].frequency; | 191 | speed = powernow_table[j].frequency; |
192 | 192 | ||
@@ -203,7 +203,7 @@ static int get_ranges(unsigned char *pst) | |||
203 | maximum_speed = speed; | 203 | maximum_speed = speed; |
204 | 204 | ||
205 | vid = *pst++; | 205 | vid = *pst++; |
206 | powernow_table[j].index |= (vid << 8); /* upper 8 bits */ | 206 | powernow_table[j].driver_data |= (vid << 8); /* upper 8 bits */ |
207 | 207 | ||
208 | pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) " | 208 | pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) " |
209 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, | 209 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, |
@@ -212,7 +212,7 @@ static int get_ranges(unsigned char *pst) | |||
212 | mobile_vid_table[vid]%1000); | 212 | mobile_vid_table[vid]%1000); |
213 | } | 213 | } |
214 | powernow_table[number_scales].frequency = CPUFREQ_TABLE_END; | 214 | powernow_table[number_scales].frequency = CPUFREQ_TABLE_END; |
215 | powernow_table[number_scales].index = 0; | 215 | powernow_table[number_scales].driver_data = 0; |
216 | 216 | ||
217 | return 0; | 217 | return 0; |
218 | } | 218 | } |
@@ -260,8 +260,8 @@ static void change_speed(struct cpufreq_policy *policy, unsigned int index) | |||
260 | * vid are the upper 8 bits. | 260 | * vid are the upper 8 bits. |
261 | */ | 261 | */ |
262 | 262 | ||
263 | fid = powernow_table[index].index & 0xFF; | 263 | fid = powernow_table[index].driver_data & 0xFF; |
264 | vid = (powernow_table[index].index & 0xFF00) >> 8; | 264 | vid = (powernow_table[index].driver_data & 0xFF00) >> 8; |
265 | 265 | ||
266 | rdmsrl(MSR_K7_FID_VID_STATUS, fidvidstatus.val); | 266 | rdmsrl(MSR_K7_FID_VID_STATUS, fidvidstatus.val); |
267 | cfid = fidvidstatus.bits.CFID; | 267 | cfid = fidvidstatus.bits.CFID; |
@@ -373,8 +373,8 @@ static int powernow_acpi_init(void) | |||
373 | fid = pc.bits.fid; | 373 | fid = pc.bits.fid; |
374 | 374 | ||
375 | powernow_table[i].frequency = fsb * fid_codes[fid] / 10; | 375 | powernow_table[i].frequency = fsb * fid_codes[fid] / 10; |
376 | powernow_table[i].index = fid; /* lower 8 bits */ | 376 | powernow_table[i].driver_data = fid; /* lower 8 bits */ |
377 | powernow_table[i].index |= (vid << 8); /* upper 8 bits */ | 377 | powernow_table[i].driver_data |= (vid << 8); /* upper 8 bits */ |
378 | 378 | ||
379 | speed = powernow_table[i].frequency; | 379 | speed = powernow_table[i].frequency; |
380 | speed_mhz = speed / 1000; | 380 | speed_mhz = speed / 1000; |
@@ -417,7 +417,7 @@ static int powernow_acpi_init(void) | |||
417 | } | 417 | } |
418 | 418 | ||
419 | powernow_table[i].frequency = CPUFREQ_TABLE_END; | 419 | powernow_table[i].frequency = CPUFREQ_TABLE_END; |
420 | powernow_table[i].index = 0; | 420 | powernow_table[i].driver_data = 0; |
421 | 421 | ||
422 | /* notify BIOS that we exist */ | 422 | /* notify BIOS that we exist */ |
423 | acpi_processor_notify_smm(THIS_MODULE); | 423 | acpi_processor_notify_smm(THIS_MODULE); |
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index b828efe4b2f8..51343a128703 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c | |||
@@ -584,9 +584,9 @@ static void print_basics(struct powernow_k8_data *data) | |||
584 | CPUFREQ_ENTRY_INVALID) { | 584 | CPUFREQ_ENTRY_INVALID) { |
585 | printk(KERN_INFO PFX | 585 | printk(KERN_INFO PFX |
586 | "fid 0x%x (%d MHz), vid 0x%x\n", | 586 | "fid 0x%x (%d MHz), vid 0x%x\n", |
587 | data->powernow_table[j].index & 0xff, | 587 | data->powernow_table[j].driver_data & 0xff, |
588 | data->powernow_table[j].frequency/1000, | 588 | data->powernow_table[j].frequency/1000, |
589 | data->powernow_table[j].index >> 8); | 589 | data->powernow_table[j].driver_data >> 8); |
590 | } | 590 | } |
591 | } | 591 | } |
592 | if (data->batps) | 592 | if (data->batps) |
@@ -632,13 +632,13 @@ static int fill_powernow_table(struct powernow_k8_data *data, | |||
632 | 632 | ||
633 | for (j = 0; j < data->numps; j++) { | 633 | for (j = 0; j < data->numps; j++) { |
634 | int freq; | 634 | int freq; |
635 | powernow_table[j].index = pst[j].fid; /* lower 8 bits */ | 635 | powernow_table[j].driver_data = pst[j].fid; /* lower 8 bits */ |
636 | powernow_table[j].index |= (pst[j].vid << 8); /* upper 8 bits */ | 636 | powernow_table[j].driver_data |= (pst[j].vid << 8); /* upper 8 bits */ |
637 | freq = find_khz_freq_from_fid(pst[j].fid); | 637 | freq = find_khz_freq_from_fid(pst[j].fid); |
638 | powernow_table[j].frequency = freq; | 638 | powernow_table[j].frequency = freq; |
639 | } | 639 | } |
640 | powernow_table[data->numps].frequency = CPUFREQ_TABLE_END; | 640 | powernow_table[data->numps].frequency = CPUFREQ_TABLE_END; |
641 | powernow_table[data->numps].index = 0; | 641 | powernow_table[data->numps].driver_data = 0; |
642 | 642 | ||
643 | if (query_current_values_with_pending_wait(data)) { | 643 | if (query_current_values_with_pending_wait(data)) { |
644 | kfree(powernow_table); | 644 | kfree(powernow_table); |
@@ -810,7 +810,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
810 | 810 | ||
811 | powernow_table[data->acpi_data.state_count].frequency = | 811 | powernow_table[data->acpi_data.state_count].frequency = |
812 | CPUFREQ_TABLE_END; | 812 | CPUFREQ_TABLE_END; |
813 | powernow_table[data->acpi_data.state_count].index = 0; | 813 | powernow_table[data->acpi_data.state_count].driver_data = 0; |
814 | data->powernow_table = powernow_table; | 814 | data->powernow_table = powernow_table; |
815 | 815 | ||
816 | if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu) | 816 | if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu) |
@@ -865,7 +865,7 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, | |||
865 | pr_debug(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid); | 865 | pr_debug(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid); |
866 | 866 | ||
867 | index = fid | (vid<<8); | 867 | index = fid | (vid<<8); |
868 | powernow_table[i].index = index; | 868 | powernow_table[i].driver_data = index; |
869 | 869 | ||
870 | freq = find_khz_freq_from_fid(fid); | 870 | freq = find_khz_freq_from_fid(fid); |
871 | powernow_table[i].frequency = freq; | 871 | powernow_table[i].frequency = freq; |
@@ -941,8 +941,8 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, | |||
941 | * the cpufreq frequency table in find_psb_table, vid | 941 | * the cpufreq frequency table in find_psb_table, vid |
942 | * are the upper 8 bits. | 942 | * are the upper 8 bits. |
943 | */ | 943 | */ |
944 | fid = data->powernow_table[index].index & 0xFF; | 944 | fid = data->powernow_table[index].driver_data & 0xFF; |
945 | vid = (data->powernow_table[index].index & 0xFF00) >> 8; | 945 | vid = (data->powernow_table[index].driver_data & 0xFF00) >> 8; |
946 | 946 | ||
947 | pr_debug("table matched fid 0x%x, giving vid 0x%x\n", fid, vid); | 947 | pr_debug("table matched fid 0x%x, giving vid 0x%x\n", fid, vid); |
948 | 948 | ||
diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c b/drivers/cpufreq/ppc_cbe_cpufreq.c index e577a1dbbfcd..5936f8d6f2cc 100644 --- a/drivers/cpufreq/ppc_cbe_cpufreq.c +++ b/drivers/cpufreq/ppc_cbe_cpufreq.c | |||
@@ -106,7 +106,7 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
106 | 106 | ||
107 | /* initialize frequency table */ | 107 | /* initialize frequency table */ |
108 | for (i=0; cbe_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) { | 108 | for (i=0; cbe_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) { |
109 | cbe_freqs[i].frequency = max_freq / cbe_freqs[i].index; | 109 | cbe_freqs[i].frequency = max_freq / cbe_freqs[i].driver_data; |
110 | pr_debug("%d: %d\n", i, cbe_freqs[i].frequency); | 110 | pr_debug("%d: %d\n", i, cbe_freqs[i].frequency); |
111 | } | 111 | } |
112 | 112 | ||
@@ -165,7 +165,7 @@ static int cbe_cpufreq_target(struct cpufreq_policy *policy, | |||
165 | "1/%d of max frequency\n", | 165 | "1/%d of max frequency\n", |
166 | policy->cpu, | 166 | policy->cpu, |
167 | cbe_freqs[cbe_pmode_new].frequency, | 167 | cbe_freqs[cbe_pmode_new].frequency, |
168 | cbe_freqs[cbe_pmode_new].index); | 168 | cbe_freqs[cbe_pmode_new].driver_data); |
169 | 169 | ||
170 | rc = set_pmode(policy->cpu, cbe_pmode_new); | 170 | rc = set_pmode(policy->cpu, cbe_pmode_new); |
171 | 171 | ||
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 9e5bc8e388a0..fb3981ac829f 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c | |||
@@ -420,7 +420,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
420 | /* Generate pxa25x the run cpufreq_frequency_table struct */ | 420 | /* Generate pxa25x the run cpufreq_frequency_table struct */ |
421 | for (i = 0; i < NUM_PXA25x_RUN_FREQS; i++) { | 421 | for (i = 0; i < NUM_PXA25x_RUN_FREQS; i++) { |
422 | pxa255_run_freq_table[i].frequency = pxa255_run_freqs[i].khz; | 422 | pxa255_run_freq_table[i].frequency = pxa255_run_freqs[i].khz; |
423 | pxa255_run_freq_table[i].index = i; | 423 | pxa255_run_freq_table[i].driver_data = i; |
424 | } | 424 | } |
425 | pxa255_run_freq_table[i].frequency = CPUFREQ_TABLE_END; | 425 | pxa255_run_freq_table[i].frequency = CPUFREQ_TABLE_END; |
426 | 426 | ||
@@ -428,7 +428,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
428 | for (i = 0; i < NUM_PXA25x_TURBO_FREQS; i++) { | 428 | for (i = 0; i < NUM_PXA25x_TURBO_FREQS; i++) { |
429 | pxa255_turbo_freq_table[i].frequency = | 429 | pxa255_turbo_freq_table[i].frequency = |
430 | pxa255_turbo_freqs[i].khz; | 430 | pxa255_turbo_freqs[i].khz; |
431 | pxa255_turbo_freq_table[i].index = i; | 431 | pxa255_turbo_freq_table[i].driver_data = i; |
432 | } | 432 | } |
433 | pxa255_turbo_freq_table[i].frequency = CPUFREQ_TABLE_END; | 433 | pxa255_turbo_freq_table[i].frequency = CPUFREQ_TABLE_END; |
434 | 434 | ||
@@ -440,9 +440,9 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
440 | if (freq > pxa27x_maxfreq) | 440 | if (freq > pxa27x_maxfreq) |
441 | break; | 441 | break; |
442 | pxa27x_freq_table[i].frequency = freq; | 442 | pxa27x_freq_table[i].frequency = freq; |
443 | pxa27x_freq_table[i].index = i; | 443 | pxa27x_freq_table[i].driver_data = i; |
444 | } | 444 | } |
445 | pxa27x_freq_table[i].index = i; | 445 | pxa27x_freq_table[i].driver_data = i; |
446 | pxa27x_freq_table[i].frequency = CPUFREQ_TABLE_END; | 446 | pxa27x_freq_table[i].frequency = CPUFREQ_TABLE_END; |
447 | 447 | ||
448 | /* | 448 | /* |
diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index 15d60f857ad5..9c92ef032a9e 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c | |||
@@ -98,10 +98,10 @@ static int setup_freqs_table(struct cpufreq_policy *policy, | |||
98 | return -ENOMEM; | 98 | return -ENOMEM; |
99 | 99 | ||
100 | for (i = 0; i < num; i++) { | 100 | for (i = 0; i < num; i++) { |
101 | table[i].index = i; | 101 | table[i].driver_data = i; |
102 | table[i].frequency = freqs[i].cpufreq_mhz * 1000; | 102 | table[i].frequency = freqs[i].cpufreq_mhz * 1000; |
103 | } | 103 | } |
104 | table[num].index = i; | 104 | table[num].driver_data = i; |
105 | table[num].frequency = CPUFREQ_TABLE_END; | 105 | table[num].frequency = CPUFREQ_TABLE_END; |
106 | 106 | ||
107 | pxa3xx_freqs = freqs; | 107 | pxa3xx_freqs = freqs; |
diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c index 4f1881eee3f1..69f2e55828dc 100644 --- a/drivers/cpufreq/s3c2416-cpufreq.c +++ b/drivers/cpufreq/s3c2416-cpufreq.c | |||
@@ -244,7 +244,7 @@ static int s3c2416_cpufreq_set_target(struct cpufreq_policy *policy, | |||
244 | if (ret != 0) | 244 | if (ret != 0) |
245 | goto out; | 245 | goto out; |
246 | 246 | ||
247 | idx = s3c_freq->freq_table[i].index; | 247 | idx = s3c_freq->freq_table[i].driver_data; |
248 | 248 | ||
249 | if (idx == SOURCE_HCLK) | 249 | if (idx == SOURCE_HCLK) |
250 | to_dvs = 1; | 250 | to_dvs = 1; |
diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c index 27cacb524796..306d395de990 100644 --- a/drivers/cpufreq/s3c64xx-cpufreq.c +++ b/drivers/cpufreq/s3c64xx-cpufreq.c | |||
@@ -87,7 +87,7 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy, | |||
87 | freqs.old = clk_get_rate(armclk) / 1000; | 87 | freqs.old = clk_get_rate(armclk) / 1000; |
88 | freqs.new = s3c64xx_freq_table[i].frequency; | 88 | freqs.new = s3c64xx_freq_table[i].frequency; |
89 | freqs.flags = 0; | 89 | freqs.flags = 0; |
90 | dvfs = &s3c64xx_dvfs_table[s3c64xx_freq_table[i].index]; | 90 | dvfs = &s3c64xx_dvfs_table[s3c64xx_freq_table[i].driver_data]; |
91 | 91 | ||
92 | if (freqs.old == freqs.new) | 92 | if (freqs.old == freqs.new) |
93 | return 0; | 93 | return 0; |
diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c index f740b134d27b..77a210975fc4 100644 --- a/drivers/cpufreq/sc520_freq.c +++ b/drivers/cpufreq/sc520_freq.c | |||
@@ -71,7 +71,7 @@ static void sc520_freq_set_cpu_state(struct cpufreq_policy *policy, | |||
71 | local_irq_disable(); | 71 | local_irq_disable(); |
72 | 72 | ||
73 | clockspeed_reg = *cpuctl & ~0x03; | 73 | clockspeed_reg = *cpuctl & ~0x03; |
74 | *cpuctl = clockspeed_reg | sc520_freq_table[state].index; | 74 | *cpuctl = clockspeed_reg | sc520_freq_table[state].driver_data; |
75 | 75 | ||
76 | local_irq_enable(); | 76 | local_irq_enable(); |
77 | 77 | ||
diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index 306ae462bba6..93061a408773 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c | |||
@@ -308,17 +308,17 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) | |||
308 | struct cpufreq_frequency_table *table = | 308 | struct cpufreq_frequency_table *table = |
309 | &us2e_freq_table[cpu].table[0]; | 309 | &us2e_freq_table[cpu].table[0]; |
310 | 310 | ||
311 | table[0].index = 0; | 311 | table[0].driver_data = 0; |
312 | table[0].frequency = clock_tick / 1; | 312 | table[0].frequency = clock_tick / 1; |
313 | table[1].index = 1; | 313 | table[1].driver_data = 1; |
314 | table[1].frequency = clock_tick / 2; | 314 | table[1].frequency = clock_tick / 2; |
315 | table[2].index = 2; | 315 | table[2].driver_data = 2; |
316 | table[2].frequency = clock_tick / 4; | 316 | table[2].frequency = clock_tick / 4; |
317 | table[2].index = 3; | 317 | table[2].driver_data = 3; |
318 | table[2].frequency = clock_tick / 6; | 318 | table[2].frequency = clock_tick / 6; |
319 | table[2].index = 4; | 319 | table[2].driver_data = 4; |
320 | table[2].frequency = clock_tick / 8; | 320 | table[2].frequency = clock_tick / 8; |
321 | table[2].index = 5; | 321 | table[2].driver_data = 5; |
322 | table[3].frequency = CPUFREQ_TABLE_END; | 322 | table[3].frequency = CPUFREQ_TABLE_END; |
323 | 323 | ||
324 | policy->cpuinfo.transition_latency = 0; | 324 | policy->cpuinfo.transition_latency = 0; |
diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index c71ee142347a..880ee293d61e 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c | |||
@@ -169,13 +169,13 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) | |||
169 | struct cpufreq_frequency_table *table = | 169 | struct cpufreq_frequency_table *table = |
170 | &us3_freq_table[cpu].table[0]; | 170 | &us3_freq_table[cpu].table[0]; |
171 | 171 | ||
172 | table[0].index = 0; | 172 | table[0].driver_data = 0; |
173 | table[0].frequency = clock_tick / 1; | 173 | table[0].frequency = clock_tick / 1; |
174 | table[1].index = 1; | 174 | table[1].driver_data = 1; |
175 | table[1].frequency = clock_tick / 2; | 175 | table[1].frequency = clock_tick / 2; |
176 | table[2].index = 2; | 176 | table[2].driver_data = 2; |
177 | table[2].frequency = clock_tick / 32; | 177 | table[2].frequency = clock_tick / 32; |
178 | table[3].index = 0; | 178 | table[3].driver_data = 0; |
179 | table[3].frequency = CPUFREQ_TABLE_END; | 179 | table[3].frequency = CPUFREQ_TABLE_END; |
180 | 180 | ||
181 | policy->cpuinfo.transition_latency = 0; | 181 | policy->cpuinfo.transition_latency = 0; |
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c index 156829f4576d..c3efa7f2a908 100644 --- a/drivers/cpufreq/spear-cpufreq.c +++ b/drivers/cpufreq/spear-cpufreq.c | |||
@@ -250,11 +250,11 @@ static int spear_cpufreq_driver_init(void) | |||
250 | } | 250 | } |
251 | 251 | ||
252 | for (i = 0; i < cnt; i++) { | 252 | for (i = 0; i < cnt; i++) { |
253 | freq_tbl[i].index = i; | 253 | freq_tbl[i].driver_data = i; |
254 | freq_tbl[i].frequency = be32_to_cpup(val++); | 254 | freq_tbl[i].frequency = be32_to_cpup(val++); |
255 | } | 255 | } |
256 | 256 | ||
257 | freq_tbl[i].index = i; | 257 | freq_tbl[i].driver_data = i; |
258 | freq_tbl[i].frequency = CPUFREQ_TABLE_END; | 258 | freq_tbl[i].frequency = CPUFREQ_TABLE_END; |
259 | 259 | ||
260 | spear_cpufreq.freq_tbl = freq_tbl; | 260 | spear_cpufreq.freq_tbl = freq_tbl; |
diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c index 618e6f417b1c..0915e712fbdc 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c | |||
@@ -79,11 +79,11 @@ static struct cpufreq_driver centrino_driver; | |||
79 | 79 | ||
80 | /* Computes the correct form for IA32_PERF_CTL MSR for a particular | 80 | /* Computes the correct form for IA32_PERF_CTL MSR for a particular |
81 | frequency/voltage operating point; frequency in MHz, volts in mV. | 81 | frequency/voltage operating point; frequency in MHz, volts in mV. |
82 | This is stored as "index" in the structure. */ | 82 | This is stored as "driver_data" in the structure. */ |
83 | #define OP(mhz, mv) \ | 83 | #define OP(mhz, mv) \ |
84 | { \ | 84 | { \ |
85 | .frequency = (mhz) * 1000, \ | 85 | .frequency = (mhz) * 1000, \ |
86 | .index = (((mhz)/100) << 8) | ((mv - 700) / 16) \ | 86 | .driver_data = (((mhz)/100) << 8) | ((mv - 700) / 16) \ |
87 | } | 87 | } |
88 | 88 | ||
89 | /* | 89 | /* |
@@ -307,7 +307,7 @@ static unsigned extract_clock(unsigned msr, unsigned int cpu, int failsafe) | |||
307 | per_cpu(centrino_model, cpu)->op_points[i].frequency | 307 | per_cpu(centrino_model, cpu)->op_points[i].frequency |
308 | != CPUFREQ_TABLE_END; | 308 | != CPUFREQ_TABLE_END; |
309 | i++) { | 309 | i++) { |
310 | if (msr == per_cpu(centrino_model, cpu)->op_points[i].index) | 310 | if (msr == per_cpu(centrino_model, cpu)->op_points[i].driver_data) |
311 | return per_cpu(centrino_model, cpu)-> | 311 | return per_cpu(centrino_model, cpu)-> |
312 | op_points[i].frequency; | 312 | op_points[i].frequency; |
313 | } | 313 | } |
@@ -501,7 +501,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
501 | break; | 501 | break; |
502 | } | 502 | } |
503 | 503 | ||
504 | msr = per_cpu(centrino_model, cpu)->op_points[newstate].index; | 504 | msr = per_cpu(centrino_model, cpu)->op_points[newstate].driver_data; |
505 | 505 | ||
506 | if (first_cpu) { | 506 | if (first_cpu) { |
507 | rdmsr_on_cpu(good_cpu, MSR_IA32_PERF_CTL, &oldmsr, &h); | 507 | rdmsr_on_cpu(good_cpu, MSR_IA32_PERF_CTL, &oldmsr, &h); |
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 66f80973596b..ed79d7b78e7d 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c | |||
@@ -1724,9 +1724,9 @@ static long round_clock_rate(u8 clock, unsigned long rate) | |||
1724 | 1724 | ||
1725 | /* CPU FREQ table, may be changed due to if MAX_OPP is supported. */ | 1725 | /* CPU FREQ table, may be changed due to if MAX_OPP is supported. */ |
1726 | static struct cpufreq_frequency_table db8500_cpufreq_table[] = { | 1726 | static struct cpufreq_frequency_table db8500_cpufreq_table[] = { |
1727 | { .frequency = 200000, .index = ARM_EXTCLK,}, | 1727 | { .frequency = 200000, .driver_data = ARM_EXTCLK,}, |
1728 | { .frequency = 400000, .index = ARM_50_OPP,}, | 1728 | { .frequency = 400000, .driver_data = ARM_50_OPP,}, |
1729 | { .frequency = 800000, .index = ARM_100_OPP,}, | 1729 | { .frequency = 800000, .driver_data = ARM_100_OPP,}, |
1730 | { .frequency = CPUFREQ_TABLE_END,}, /* To be used for MAX_OPP. */ | 1730 | { .frequency = CPUFREQ_TABLE_END,}, /* To be used for MAX_OPP. */ |
1731 | { .frequency = CPUFREQ_TABLE_END,}, | 1731 | { .frequency = CPUFREQ_TABLE_END,}, |
1732 | }; | 1732 | }; |
@@ -1901,7 +1901,7 @@ static int set_armss_rate(unsigned long rate) | |||
1901 | return -EINVAL; | 1901 | return -EINVAL; |
1902 | 1902 | ||
1903 | /* Set the new arm opp. */ | 1903 | /* Set the new arm opp. */ |
1904 | return db8500_prcmu_set_arm_opp(db8500_cpufreq_table[i].index); | 1904 | return db8500_prcmu_set_arm_opp(db8500_cpufreq_table[i].driver_data); |
1905 | } | 1905 | } |
1906 | 1906 | ||
1907 | static int set_plldsi_rate(unsigned long rate) | 1907 | static int set_plldsi_rate(unsigned long rate) |
@@ -3105,7 +3105,7 @@ static void db8500_prcmu_update_cpufreq(void) | |||
3105 | { | 3105 | { |
3106 | if (prcmu_has_arm_maxopp()) { | 3106 | if (prcmu_has_arm_maxopp()) { |
3107 | db8500_cpufreq_table[3].frequency = 1000000; | 3107 | db8500_cpufreq_table[3].frequency = 1000000; |
3108 | db8500_cpufreq_table[3].index = ARM_MAX_OPP; | 3108 | db8500_cpufreq_table[3].driver_data = ARM_MAX_OPP; |
3109 | } | 3109 | } |
3110 | } | 3110 | } |
3111 | 3111 | ||
diff --git a/drivers/sh/clk/core.c b/drivers/sh/clk/core.c index 7715de2629c1..74727851820d 100644 --- a/drivers/sh/clk/core.c +++ b/drivers/sh/clk/core.c | |||
@@ -63,12 +63,12 @@ void clk_rate_table_build(struct clk *clk, | |||
63 | else | 63 | else |
64 | freq = clk->parent->rate * mult / div; | 64 | freq = clk->parent->rate * mult / div; |
65 | 65 | ||
66 | freq_table[i].index = i; | 66 | freq_table[i].driver_data = i; |
67 | freq_table[i].frequency = freq; | 67 | freq_table[i].frequency = freq; |
68 | } | 68 | } |
69 | 69 | ||
70 | /* Termination entry */ | 70 | /* Termination entry */ |
71 | freq_table[i].index = i; | 71 | freq_table[i].driver_data = i; |
72 | freq_table[i].frequency = CPUFREQ_TABLE_END; | 72 | freq_table[i].frequency = CPUFREQ_TABLE_END; |
73 | } | 73 | } |
74 | 74 | ||
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 1b5b5efa3e3a..d93905633dc7 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -410,7 +410,7 @@ extern struct cpufreq_governor cpufreq_gov_conservative; | |||
410 | #define CPUFREQ_TABLE_END ~1 | 410 | #define CPUFREQ_TABLE_END ~1 |
411 | 411 | ||
412 | struct cpufreq_frequency_table { | 412 | struct cpufreq_frequency_table { |
413 | unsigned int index; /* any */ | 413 | unsigned int driver_data; /* driver specific data, not used by core */ |
414 | unsigned int frequency; /* kHz - doesn't need to be in ascending | 414 | unsigned int frequency; /* kHz - doesn't need to be in ascending |
415 | * order */ | 415 | * order */ |
416 | }; | 416 | }; |