2 #include <linux/bitops.h>
18 static void __cpuinit __do_cyrix_devid(
unsigned char *dir0,
unsigned char *dir1)
20 unsigned char ccr2, ccr3;
47 static void __cpuinit do_cyrix_devid(
unsigned char *dir0,
unsigned char *dir1)
52 __do_cyrix_devid(dir0, dir1);
65 "Cx486",
"Cx486",
"5x86 ",
"6x86",
"MediaGX ",
"6x86MX ",
69 "SLC",
"DLC",
"SLC2",
"DLC2",
"SRx",
"DRx",
73 "S",
"S2",
"Se",
"S2e"
76 "DX",
"DX2",
"?",
"?",
"?",
"DX4"
78 static char Cx86_cb[] __cpuinitdata =
"?.5x Core/Bus Clock";
94 if (Cx86_dir0_msb == 3) {
95 unsigned char ccr3, ccr5;
115 static void __cpuinit set_cx86_reorder(
void)
119 printk(
KERN_INFO "Enable Memory access reorder on Cyrix/NSC processor.\n");
121 setCx86(
CX86_CCR3, (ccr3 & 0x0f) | 0x10);
130 static void __cpuinit set_cx86_memwb(
void)
132 printk(
KERN_INFO "Enable Memory-Write-back mode on Cyrix/NSC processor.\n");
146 static void __cpuinit geode_configure(
void)
156 setCx86(
CX86_CCR3, (ccr3 & 0x0f) | 0x10);
171 unsigned char dir0, dir0_msn, dir1 = 0;
173 __do_cyrix_devid(&dir0, &dir1);
174 dir0_msn = dir0 >> 4;
190 unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0;
192 const char *
p =
NULL;
198 clear_cpu_cap(c, 0*32+31);
201 if (test_cpu_cap(c, 1*32+24)) {
202 clear_cpu_cap(c, 1*32+24);
206 do_cyrix_devid(&dir0, &dir1);
210 Cx86_dir0_msb = dir0_msn = dir0 >> 4;
211 dir0_lsn = dir0 & 0xf;
227 p = Cx486_name[dir0_lsn & 7];
231 p = (dir0_lsn & 8) ? Cx486D_name[dir0_lsn & 5]
232 : Cx486S_name[dir0_lsn & 3];
236 Cx86_cb[2] = cyrix_model_mult1[dir0_lsn & 5];
242 Cx86_cb[2] = cyrix_model_mult1[dir0_lsn & 5];
303 if ((0x30 <= dir1 && dir1 <= 0x6f) ||
304 (0x80 <= dir1 && dir1 <= 0x8f))
308 Cx86_cb[2] = (dir0_lsn & 1) ?
'3' :
'4';
322 tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0;
323 Cx86_cb[
tmp] = cyrix_model_mult2[dir0_lsn & 7];
325 if (((dir1 & 0x0f) > 4) || ((dir1 & 0xf0) == 0x20))
335 p = Cx486_name[(c->hard_math) ? 1 : 0];
349 strcpy(buf, Cx86_model[dir0_msn & 7]);
391 static inline int test_cyrix_52div(
void)
404 return (
unsigned char) (test >> 8) == 0x02;
410 if (c->
x86 == 4 && test_cyrix_52div()) {
411 unsigned char dir0, dir1;
420 do_cyrix_devid(&dir0, &dir1);
426 if (dir0 == 5 || dir0 == 3) {
433 setCx86(
CX86_CCR3, (ccr3 & 0x0f) | 0x10);
445 .c_ident = {
"CyrixInstead" },
446 .c_early_init = early_init_cyrix,
447 .c_init = init_cyrix,
448 .c_identify = cyrix_identify,
456 .c_ident = {
"Geode by NSC" },