2 * Integrated Circuit Systems, Inc.
3 * ICS2494[A] Dual Video/Memory Clock Generator.
17 static Pattern patterns[] = {
19 50350000, 56644000, 65000000, 72000000, 80000000, 89800000, 63000000, 75000000,
20 25175000, 28322000, 31500000, 36000000, 40000000, 44900000, 50000000, 65000000,
24 50350000, 56644000, 65000000, 72000000, 80000000, 89800000, 63000000, 75000000,
25 83078000, 93463000, 100000000, 104000000, 108000000, 120000000, 130000000, 134700000,
33 init(Vga* vga, Ctlr* ctlr)
37 int f, index, divisor, maxdivisor;
39 if(ctlr->flag & Finit)
43 vga->f[0] = vga->mode->frequency;
45 if((p = strchr(ctlr->name, '-')) == 0)
46 error("%s: unknown pattern\n", ctlr->name);
49 for(pattern = patterns; pattern->name[0]; pattern++){
50 if(strcmp(pattern->name[0], p) == 0)
52 if(pattern->name[1] && strcmp(pattern->name[1], p) == 0)
55 if(pattern->name[0] == 0)
56 error("%s: unknown pattern\n", ctlr->name);
59 if(vga->ctlr && (vga->ctlr->flag & Hclkdiv))
61 for(index = 0; index < 16; index++){
62 for(divisor = 1; divisor <= maxdivisor; divisor <<= 1){
63 f = vga->f[0] - pattern->frequency[index]/divisor;
67 /*vga->f = pattern->frequency[index];*/
76 error("%s: can't find frequency %ld\n", ctlr->name, vga->f[0]);
89 "ics2494a", /* name */