Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- speedstep-centrino_original_unpatched_2.6.32.c 2010-04-11 02:59:55.000000000 +0200
- +++ speedstep-centrino.c 2010-04-11 02:29:35.000000000 +0200
- @@ -45,6 +45,7 @@
- CPU_DOTHAN_A1,
- CPU_DOTHAN_A2,
- CPU_DOTHAN_B0,
- + CPU_DOTHAN_C0,
- CPU_MP4HT_D0,
- CPU_MP4HT_E0,
- };
- @@ -54,6 +55,7 @@
- [CPU_DOTHAN_A1] = { 6, 13, 1 },
- [CPU_DOTHAN_A2] = { 6, 13, 2 },
- [CPU_DOTHAN_B0] = { 6, 13, 6 },
- + [CPU_DOTHAN_C0] = { 6, 13, 8 },
- [CPU_MP4HT_D0] = {15, 3, 4 },
- [CPU_MP4HT_E0] = {15, 4, 1 },
- };
- @@ -196,6 +198,170 @@
- };
- #undef OP
- +
- +/* Dothan processor datasheet 30218903.pdf defines 4 voltages for each
- + frequency (VID#A through VID#D) - this macro allows us to define all
- + of these but we only use the VID#A voltages at compile time - this may
- + need some work if we want to select the voltage profile at runtime. */
- +
- +#define OP(mhz, mva, mvb, mvc, mvd) \
- + { \
- + .frequency = (mhz) * 1000, \
- + .index = (((mhz)/100) << 8) | ((mva - 700) / 16) \
- + }
- +
- +/* Intel Pentium M processor 715 / 1.50GHz (Dothan) */
- +static struct cpufreq_frequency_table dothan_1500[] =
- +{
- + OP( 600, 988, 988, 988, 988),
- + OP( 800, 1068, 1068, 1068, 1052),
- + OP(1000, 1148, 1148, 1132, 1116),
- + OP(1200, 1228, 1212, 1212, 1180),
- + OP(1500, 1340, 1324, 1308, 1276),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +/* Intel Pentium M processor 725 / 1.60GHz (Dothan) */
- +static struct cpufreq_frequency_table dothan_1600[] =
- +{
- + OP( 600, 988, 988, 988, 988),
- + OP( 800, 1068, 1068, 1052, 1052),
- + OP(1000, 1132, 1132, 1116, 1116),
- + OP(1200, 1212, 1196, 1180, 1164),
- + OP(1400, 1276, 1260, 1244, 1228),
- + OP(1600, 1340, 1324, 1308, 1276),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +/* Intel Pentium M processor 735 / 1.70GHz (Dothan) */
- +static struct cpufreq_frequency_table dothan_1700[] =
- +{
- + OP( 600, 988, 988, 988, 988),
- + OP( 800, 1052, 1052, 1052, 1052),
- + OP(1000, 1116, 1116, 1116, 1100),
- + OP(1200, 1180, 1180, 1164, 1148),
- + OP(1400, 1244, 1244, 1228, 1212),
- + OP(1700, 1340, 1324, 1308, 1276),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +/* Intel Pentium M processor 745 / 1.80GHz (Dothan) */
- +static struct cpufreq_frequency_table dothan_1800[] =
- +{
- + OP( 600, 988, 988, 988, 988),
- + OP( 800, 1052, 1052, 1052, 1036),
- + OP(1000, 1116, 1100, 1100, 1084),
- + OP(1200, 1164, 1164, 1148, 1132),
- + OP(1400, 1228, 1212, 1212, 1180),
- + OP(1600, 1292, 1276, 1260, 1228),
- + OP(1800, 1340, 1324, 1308, 1276),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +/* Intel Pentium M processor 755 / 2.00GHz (Dothan) */
- +static struct cpufreq_frequency_table dothan_2000[] =
- +{
- + OP( 600, 988, 988, 988, 988),
- + OP( 800, 1052, 1036, 1036, 1036),
- + OP(1000, 1100, 1084, 1084, 1084),
- + OP(1200, 1148, 1132, 1132, 1116),
- + OP(1400, 1196, 1180, 1180, 1164),
- + OP(1600, 1244, 1228, 1228, 1196),
- + OP(1800, 1292, 1276, 1276, 1244),
- + OP(2000, 1340, 1324, 1308, 1276),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +#undef OP
- +
- +
- +#define OPEX(mhz, base, mva, mvb, mvc, mvd) \
- +{ \
- + .frequency = (mhz) * 1000, \
- + .index = (((mhz)/(base)) << 8) | ((mva - 700) / 16) \
- +}
- +
- +/* Intel Pentium M processor 730 / 1.60 GHz (Sonoma) */
- +static struct cpufreq_frequency_table sonoma_1596[] =
- +{
- + OPEX( 798, 133, 988, 988, 988, 988),
- + OPEX(1064, 133, 1116, 1111, 1084, 1079),
- + OPEX(1330, 133, 1244, 1233, 1180, 1169),
- + OPEX(1596, 133, 1356, 1356, 1260, 1260),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +/* Intel Pentium M processor 740 / 1.73 GHz (Sonoma) */
- +static struct cpufreq_frequency_table sonoma_1729[] =
- +{
- + OPEX( 798, 133, 988, 988, 988, 988),
- + OPEX(1064, 133, 1100, 1093, 1068, 1066),
- + OPEX(1330, 133, 1212, 1198, 1148, 1143),
- + OPEX(1729, 133, 1356, 1356, 1260, 1260),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +/* Intel Pentium M processor 750 / 1.86 GHz (Sonoma) */
- +static struct cpufreq_frequency_table sonoma_1862[] =
- +{
- + OPEX( 798, 133, 988, 988, 988, 988),
- + OPEX(1064, 133, 1084, 1080, 1068, 1056),
- + OPEX(1330, 133, 1180, 1172, 1132, 1124),
- + OPEX(1596, 133, 1276, 1264, 1196, 1192),
- + OPEX(1862, 133, 1356, 1356, 1260, 1260),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +/* Intel Pentium M processor 760 / 2.00 GHz (Sonoma) */
- +static struct cpufreq_frequency_table sonoma_1995[] =
- +{
- + OPEX( 798, 133, 988, 988, 988, 988),
- + OPEX(1064, 133, 1084, 1070, 1052, 1048),
- + OPEX(1330, 133, 1164, 1152, 1116, 1109),
- + OPEX(1596, 133, 1244, 1233, 1180, 1169),
- + OPEX(1995, 133, 1356, 1356, 1260, 1260),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +/* Intel Pentium M processor 770 / 2.13 GHz (Sonoma) */
- +static struct cpufreq_frequency_table sonoma_2128[] =
- +{
- + OPEX( 798, 133, 988, 988, 988, 988),
- + OPEX(1064, 133, 1068, 1065, 1052, 1042),
- + OPEX(1330, 133, 1148, 1142, 1100, 1097),
- + OPEX(1596, 133, 1228, 1218, 1164, 1151),
- + OPEX(1862, 133, 1308, 1295, 1212, 1206),
- + OPEX(2128, 133, 1372, 1372, 1260, 1260),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +/* Intel Pentium M processor 780 / 2.26 GHz (Sonoma) */
- +static struct cpufreq_frequency_table sonoma_2261[] =
- +{
- + OPEX( 798, 133, 988, 988, 988, 988),
- + OPEX(1064, 133, 1068, 1064, 1052, 1037),
- + OPEX(1330, 133, 1148, 1139, 1100, 1087),
- + OPEX(1596, 133, 1228, 1215, 1148, 1136),
- + OPEX(1862, 133, 1292, 1291, 1196, 1186),
- + OPEX(2261, 133, 1404, 1404, 1260, 1260),
- + { .frequency = CPUFREQ_TABLE_END }
- +};
- +
- +#undef OPEX
- +
- +#define SONOMA(cpuid, max, base, name) \
- +{ .cpu_id = cpuid, \
- + .model_name = "Intel(R) Pentium(R) M processor " name "GHz", \
- + .max_freq = (max)*1000, \
- + .op_points = sonoma_##max, \
- +}
- +
- +#define DOTHAN(cpuid, max, name) \
- +{ .cpu_id = cpuid, \
- + .model_name = "Intel(R) Pentium(R) M processor " name "GHz", \
- + .max_freq = (max)*1000, \
- + .op_points = dothan_##max, \
- +}
- +
- #define _BANIAS(cpuid, max, name) \
- { .cpu_id = cpuid, \
- .model_name = "Intel(R) Pentium(R) M processor " name "MHz", \
- @@ -218,6 +384,21 @@
- BANIAS(1600),
- BANIAS(1700),
- + DOTHAN(&cpu_ids[CPU_DOTHAN_B0], 1500, "1.50"),
- + DOTHAN(&cpu_ids[CPU_DOTHAN_B0], 1600, "1.60"),
- + DOTHAN(&cpu_ids[CPU_DOTHAN_B0], 1700, "1.70"),
- + DOTHAN(&cpu_ids[CPU_DOTHAN_B0], 1800, "1.80"),
- + DOTHAN(&cpu_ids[CPU_DOTHAN_B0], 2000, "2.00"),
- +
- + /* Builtin tables for Dothan C0 CPUs, a.k.a Sonoma */
- + SONOMA(&cpu_ids[CPU_DOTHAN_C0], 1596, 133, "1.60"),
- + SONOMA(&cpu_ids[CPU_DOTHAN_C0], 1729, 133, "1.73"),
- + SONOMA(&cpu_ids[CPU_DOTHAN_C0], 1862, 133, "1.86"),
- + SONOMA(&cpu_ids[CPU_DOTHAN_C0], 1995, 133, "2.00"),
- + SONOMA(&cpu_ids[CPU_DOTHAN_C0], 2128, 133, "2.13"),
- + SONOMA(&cpu_ids[CPU_DOTHAN_C0], 2261, 133, "2.26"),
- +
- +
- /* NULL model_name is a wildcard */
- { &cpu_ids[CPU_DOTHAN_A1], NULL, 0, NULL },
- { &cpu_ids[CPU_DOTHAN_A2], NULL, 0, NULL },
- @@ -229,6 +410,8 @@
- };
- #undef _BANIAS
- #undef BANIAS
- +#undef DOTHAN
- +#undef SONOMA
- static int centrino_cpu_init_table(struct cpufreq_policy *policy)
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement