![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * longhaul.h 0004 * (C) 2003 Dave Jones. 0005 * 0006 * VIA-specific information 0007 */ 0008 0009 union msr_bcr2 { 0010 struct { 0011 unsigned Reseved:19, // 18:0 0012 ESOFTBF:1, // 19 0013 Reserved2:3, // 22:20 0014 CLOCKMUL:4, // 26:23 0015 Reserved3:5; // 31:27 0016 } bits; 0017 unsigned long val; 0018 }; 0019 0020 union msr_longhaul { 0021 struct { 0022 unsigned RevisionID:4, // 3:0 0023 RevisionKey:4, // 7:4 0024 EnableSoftBusRatio:1, // 8 0025 EnableSoftVID:1, // 9 0026 EnableSoftBSEL:1, // 10 0027 Reserved:3, // 11:13 0028 SoftBusRatio4:1, // 14 0029 VRMRev:1, // 15 0030 SoftBusRatio:4, // 19:16 0031 SoftVID:5, // 24:20 0032 Reserved2:3, // 27:25 0033 SoftBSEL:2, // 29:28 0034 Reserved3:2, // 31:30 0035 MaxMHzBR:4, // 35:32 0036 MaximumVID:5, // 40:36 0037 MaxMHzFSB:2, // 42:41 0038 MaxMHzBR4:1, // 43 0039 Reserved4:4, // 47:44 0040 MinMHzBR:4, // 51:48 0041 MinimumVID:5, // 56:52 0042 MinMHzFSB:2, // 58:57 0043 MinMHzBR4:1, // 59 0044 Reserved5:4; // 63:60 0045 } bits; 0046 unsigned long long val; 0047 }; 0048 0049 /* 0050 * Clock ratio tables. Div/Mod by 10 to get ratio. 0051 * The eblcr values specify the ratio read from the CPU. 0052 * The mults values specify what to write to the CPU. 0053 */ 0054 0055 /* 0056 * VIA C3 Samuel 1 & Samuel 2 (stepping 0) 0057 */ 0058 static const int samuel1_mults[16] = { 0059 -1, /* 0000 -> RESERVED */ 0060 30, /* 0001 -> 3.0x */ 0061 40, /* 0010 -> 4.0x */ 0062 -1, /* 0011 -> RESERVED */ 0063 -1, /* 0100 -> RESERVED */ 0064 35, /* 0101 -> 3.5x */ 0065 45, /* 0110 -> 4.5x */ 0066 55, /* 0111 -> 5.5x */ 0067 60, /* 1000 -> 6.0x */ 0068 70, /* 1001 -> 7.0x */ 0069 80, /* 1010 -> 8.0x */ 0070 50, /* 1011 -> 5.0x */ 0071 65, /* 1100 -> 6.5x */ 0072 75, /* 1101 -> 7.5x */ 0073 -1, /* 1110 -> RESERVED */ 0074 -1, /* 1111 -> RESERVED */ 0075 }; 0076 0077 static const int samuel1_eblcr[16] = { 0078 50, /* 0000 -> RESERVED */ 0079 30, /* 0001 -> 3.0x */ 0080 40, /* 0010 -> 4.0x */ 0081 -1, /* 0011 -> RESERVED */ 0082 55, /* 0100 -> 5.5x */ 0083 35, /* 0101 -> 3.5x */ 0084 45, /* 0110 -> 4.5x */ 0085 -1, /* 0111 -> RESERVED */ 0086 -1, /* 1000 -> RESERVED */ 0087 70, /* 1001 -> 7.0x */ 0088 80, /* 1010 -> 8.0x */ 0089 60, /* 1011 -> 6.0x */ 0090 -1, /* 1100 -> RESERVED */ 0091 75, /* 1101 -> 7.5x */ 0092 -1, /* 1110 -> RESERVED */ 0093 65, /* 1111 -> 6.5x */ 0094 }; 0095 0096 /* 0097 * VIA C3 Samuel2 Stepping 1->15 0098 */ 0099 static const int samuel2_eblcr[16] = { 0100 50, /* 0000 -> 5.0x */ 0101 30, /* 0001 -> 3.0x */ 0102 40, /* 0010 -> 4.0x */ 0103 100, /* 0011 -> 10.0x */ 0104 55, /* 0100 -> 5.5x */ 0105 35, /* 0101 -> 3.5x */ 0106 45, /* 0110 -> 4.5x */ 0107 110, /* 0111 -> 11.0x */ 0108 90, /* 1000 -> 9.0x */ 0109 70, /* 1001 -> 7.0x */ 0110 80, /* 1010 -> 8.0x */ 0111 60, /* 1011 -> 6.0x */ 0112 120, /* 1100 -> 12.0x */ 0113 75, /* 1101 -> 7.5x */ 0114 130, /* 1110 -> 13.0x */ 0115 65, /* 1111 -> 6.5x */ 0116 }; 0117 0118 /* 0119 * VIA C3 Ezra 0120 */ 0121 static const int ezra_mults[16] = { 0122 100, /* 0000 -> 10.0x */ 0123 30, /* 0001 -> 3.0x */ 0124 40, /* 0010 -> 4.0x */ 0125 90, /* 0011 -> 9.0x */ 0126 95, /* 0100 -> 9.5x */ 0127 35, /* 0101 -> 3.5x */ 0128 45, /* 0110 -> 4.5x */ 0129 55, /* 0111 -> 5.5x */ 0130 60, /* 1000 -> 6.0x */ 0131 70, /* 1001 -> 7.0x */ 0132 80, /* 1010 -> 8.0x */ 0133 50, /* 1011 -> 5.0x */ 0134 65, /* 1100 -> 6.5x */ 0135 75, /* 1101 -> 7.5x */ 0136 85, /* 1110 -> 8.5x */ 0137 120, /* 1111 -> 12.0x */ 0138 }; 0139 0140 static const int ezra_eblcr[16] = { 0141 50, /* 0000 -> 5.0x */ 0142 30, /* 0001 -> 3.0x */ 0143 40, /* 0010 -> 4.0x */ 0144 100, /* 0011 -> 10.0x */ 0145 55, /* 0100 -> 5.5x */ 0146 35, /* 0101 -> 3.5x */ 0147 45, /* 0110 -> 4.5x */ 0148 95, /* 0111 -> 9.5x */ 0149 90, /* 1000 -> 9.0x */ 0150 70, /* 1001 -> 7.0x */ 0151 80, /* 1010 -> 8.0x */ 0152 60, /* 1011 -> 6.0x */ 0153 120, /* 1100 -> 12.0x */ 0154 75, /* 1101 -> 7.5x */ 0155 85, /* 1110 -> 8.5x */ 0156 65, /* 1111 -> 6.5x */ 0157 }; 0158 0159 /* 0160 * VIA C3 (Ezra-T) [C5M]. 0161 */ 0162 static const int ezrat_mults[32] = { 0163 100, /* 0000 -> 10.0x */ 0164 30, /* 0001 -> 3.0x */ 0165 40, /* 0010 -> 4.0x */ 0166 90, /* 0011 -> 9.0x */ 0167 95, /* 0100 -> 9.5x */ 0168 35, /* 0101 -> 3.5x */ 0169 45, /* 0110 -> 4.5x */ 0170 55, /* 0111 -> 5.5x */ 0171 60, /* 1000 -> 6.0x */ 0172 70, /* 1001 -> 7.0x */ 0173 80, /* 1010 -> 8.0x */ 0174 50, /* 1011 -> 5.0x */ 0175 65, /* 1100 -> 6.5x */ 0176 75, /* 1101 -> 7.5x */ 0177 85, /* 1110 -> 8.5x */ 0178 120, /* 1111 -> 12.0x */ 0179 0180 -1, /* 0000 -> RESERVED (10.0x) */ 0181 110, /* 0001 -> 11.0x */ 0182 -1, /* 0010 -> 12.0x */ 0183 -1, /* 0011 -> RESERVED (9.0x)*/ 0184 105, /* 0100 -> 10.5x */ 0185 115, /* 0101 -> 11.5x */ 0186 125, /* 0110 -> 12.5x */ 0187 135, /* 0111 -> 13.5x */ 0188 140, /* 1000 -> 14.0x */ 0189 150, /* 1001 -> 15.0x */ 0190 160, /* 1010 -> 16.0x */ 0191 130, /* 1011 -> 13.0x */ 0192 145, /* 1100 -> 14.5x */ 0193 155, /* 1101 -> 15.5x */ 0194 -1, /* 1110 -> RESERVED (13.0x) */ 0195 -1, /* 1111 -> RESERVED (12.0x) */ 0196 }; 0197 0198 static const int ezrat_eblcr[32] = { 0199 50, /* 0000 -> 5.0x */ 0200 30, /* 0001 -> 3.0x */ 0201 40, /* 0010 -> 4.0x */ 0202 100, /* 0011 -> 10.0x */ 0203 55, /* 0100 -> 5.5x */ 0204 35, /* 0101 -> 3.5x */ 0205 45, /* 0110 -> 4.5x */ 0206 95, /* 0111 -> 9.5x */ 0207 90, /* 1000 -> 9.0x */ 0208 70, /* 1001 -> 7.0x */ 0209 80, /* 1010 -> 8.0x */ 0210 60, /* 1011 -> 6.0x */ 0211 120, /* 1100 -> 12.0x */ 0212 75, /* 1101 -> 7.5x */ 0213 85, /* 1110 -> 8.5x */ 0214 65, /* 1111 -> 6.5x */ 0215 0216 -1, /* 0000 -> RESERVED (9.0x) */ 0217 110, /* 0001 -> 11.0x */ 0218 120, /* 0010 -> 12.0x */ 0219 -1, /* 0011 -> RESERVED (10.0x)*/ 0220 135, /* 0100 -> 13.5x */ 0221 115, /* 0101 -> 11.5x */ 0222 125, /* 0110 -> 12.5x */ 0223 105, /* 0111 -> 10.5x */ 0224 130, /* 1000 -> 13.0x */ 0225 150, /* 1001 -> 15.0x */ 0226 160, /* 1010 -> 16.0x */ 0227 140, /* 1011 -> 14.0x */ 0228 -1, /* 1100 -> RESERVED (12.0x) */ 0229 155, /* 1101 -> 15.5x */ 0230 -1, /* 1110 -> RESERVED (13.0x) */ 0231 145, /* 1111 -> 14.5x */ 0232 }; 0233 0234 /* 0235 * VIA C3 Nehemiah */ 0236 0237 static const int nehemiah_mults[32] = { 0238 100, /* 0000 -> 10.0x */ 0239 -1, /* 0001 -> 16.0x */ 0240 40, /* 0010 -> 4.0x */ 0241 90, /* 0011 -> 9.0x */ 0242 95, /* 0100 -> 9.5x */ 0243 -1, /* 0101 -> RESERVED */ 0244 45, /* 0110 -> 4.5x */ 0245 55, /* 0111 -> 5.5x */ 0246 60, /* 1000 -> 6.0x */ 0247 70, /* 1001 -> 7.0x */ 0248 80, /* 1010 -> 8.0x */ 0249 50, /* 1011 -> 5.0x */ 0250 65, /* 1100 -> 6.5x */ 0251 75, /* 1101 -> 7.5x */ 0252 85, /* 1110 -> 8.5x */ 0253 120, /* 1111 -> 12.0x */ 0254 -1, /* 0000 -> 10.0x */ 0255 110, /* 0001 -> 11.0x */ 0256 -1, /* 0010 -> 12.0x */ 0257 -1, /* 0011 -> 9.0x */ 0258 105, /* 0100 -> 10.5x */ 0259 115, /* 0101 -> 11.5x */ 0260 125, /* 0110 -> 12.5x */ 0261 135, /* 0111 -> 13.5x */ 0262 140, /* 1000 -> 14.0x */ 0263 150, /* 1001 -> 15.0x */ 0264 160, /* 1010 -> 16.0x */ 0265 130, /* 1011 -> 13.0x */ 0266 145, /* 1100 -> 14.5x */ 0267 155, /* 1101 -> 15.5x */ 0268 -1, /* 1110 -> RESERVED (13.0x) */ 0269 -1, /* 1111 -> 12.0x */ 0270 }; 0271 0272 static const int nehemiah_eblcr[32] = { 0273 50, /* 0000 -> 5.0x */ 0274 160, /* 0001 -> 16.0x */ 0275 40, /* 0010 -> 4.0x */ 0276 100, /* 0011 -> 10.0x */ 0277 55, /* 0100 -> 5.5x */ 0278 -1, /* 0101 -> RESERVED */ 0279 45, /* 0110 -> 4.5x */ 0280 95, /* 0111 -> 9.5x */ 0281 90, /* 1000 -> 9.0x */ 0282 70, /* 1001 -> 7.0x */ 0283 80, /* 1010 -> 8.0x */ 0284 60, /* 1011 -> 6.0x */ 0285 120, /* 1100 -> 12.0x */ 0286 75, /* 1101 -> 7.5x */ 0287 85, /* 1110 -> 8.5x */ 0288 65, /* 1111 -> 6.5x */ 0289 90, /* 0000 -> 9.0x */ 0290 110, /* 0001 -> 11.0x */ 0291 120, /* 0010 -> 12.0x */ 0292 100, /* 0011 -> 10.0x */ 0293 135, /* 0100 -> 13.5x */ 0294 115, /* 0101 -> 11.5x */ 0295 125, /* 0110 -> 12.5x */ 0296 105, /* 0111 -> 10.5x */ 0297 130, /* 1000 -> 13.0x */ 0298 150, /* 1001 -> 15.0x */ 0299 160, /* 1010 -> 16.0x */ 0300 140, /* 1011 -> 14.0x */ 0301 120, /* 1100 -> 12.0x */ 0302 155, /* 1101 -> 15.5x */ 0303 -1, /* 1110 -> RESERVED (13.0x) */ 0304 145 /* 1111 -> 14.5x */ 0305 }; 0306 0307 /* 0308 * Voltage scales. Div/Mod by 1000 to get actual voltage. 0309 * Which scale to use depends on the VRM type in use. 0310 */ 0311 0312 struct mV_pos { 0313 unsigned short mV; 0314 unsigned short pos; 0315 }; 0316 0317 static const struct mV_pos vrm85_mV[32] = { 0318 {1250, 8}, {1200, 6}, {1150, 4}, {1100, 2}, 0319 {1050, 0}, {1800, 30}, {1750, 28}, {1700, 26}, 0320 {1650, 24}, {1600, 22}, {1550, 20}, {1500, 18}, 0321 {1450, 16}, {1400, 14}, {1350, 12}, {1300, 10}, 0322 {1275, 9}, {1225, 7}, {1175, 5}, {1125, 3}, 0323 {1075, 1}, {1825, 31}, {1775, 29}, {1725, 27}, 0324 {1675, 25}, {1625, 23}, {1575, 21}, {1525, 19}, 0325 {1475, 17}, {1425, 15}, {1375, 13}, {1325, 11} 0326 }; 0327 0328 static const unsigned char mV_vrm85[32] = { 0329 0x04, 0x14, 0x03, 0x13, 0x02, 0x12, 0x01, 0x11, 0330 0x00, 0x10, 0x0f, 0x1f, 0x0e, 0x1e, 0x0d, 0x1d, 0331 0x0c, 0x1c, 0x0b, 0x1b, 0x0a, 0x1a, 0x09, 0x19, 0332 0x08, 0x18, 0x07, 0x17, 0x06, 0x16, 0x05, 0x15 0333 }; 0334 0335 static const struct mV_pos mobilevrm_mV[32] = { 0336 {1750, 31}, {1700, 30}, {1650, 29}, {1600, 28}, 0337 {1550, 27}, {1500, 26}, {1450, 25}, {1400, 24}, 0338 {1350, 23}, {1300, 22}, {1250, 21}, {1200, 20}, 0339 {1150, 19}, {1100, 18}, {1050, 17}, {1000, 16}, 0340 {975, 15}, {950, 14}, {925, 13}, {900, 12}, 0341 {875, 11}, {850, 10}, {825, 9}, {800, 8}, 0342 {775, 7}, {750, 6}, {725, 5}, {700, 4}, 0343 {675, 3}, {650, 2}, {625, 1}, {600, 0} 0344 }; 0345 0346 static const unsigned char mV_mobilevrm[32] = { 0347 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, 0348 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0349 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0350 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 0351 }; 0352
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |