Lines Matching +full:0 +full:xf3

45 	S1SA	=  0, /* 0x00 */
46 S2SA = 1, /* 0x04 */
47 SP = 2, /* 0x08 */
48 DSA = 3, /* 0x0C */
49 CNT = 4, /* 0x10 */
50 DP_OCTL = 5, /* 0x14 */
51 CLR = 6, /* 0x18 */
52 BI = 8, /* 0x20 */
53 MBC = 9, /* 0x24 */
54 BLTCTL = 10, /* 0x28 */
57 HES = 12, /* 0x30 */
58 HEB = 13, /* 0x34 */
59 HSB = 14, /* 0x38 */
60 HT = 15, /* 0x3C */
61 VES = 16, /* 0x40 */
62 VEB = 17, /* 0x44 */
63 VSB = 18, /* 0x48 */
64 VT = 19, /* 0x4C */
65 HCIV = 20, /* 0x50 */
66 VCIV = 21, /* 0x54 */
67 TCDR = 22, /* 0x58 */
68 VIL = 23, /* 0x5C */
69 STGCTL = 24, /* 0x60 */
72 SSR = 25, /* 0x64 */
73 HRIR = 26, /* 0x68 */
74 SPR = 27, /* 0x6C */
75 CMR = 28, /* 0x70 */
76 SRGCTL = 29, /* 0x74 */
79 RRCIV = 30, /* 0x78 */
80 RRSC = 31, /* 0x7C */
81 RRCR = 34, /* 0x88 */
84 GIOE = 32, /* 0x80 */
85 GIO = 33, /* 0x84 */
86 SCR = 35, /* 0x8C */
87 SSTATUS = 36, /* 0x90 */
88 PRC = 37, /* 0x94 */
90 #if 0
92 DVID = 0x00000000L,
93 SC = 0x00000004L,
94 CCR = 0x00000008L,
95 OG = 0x0000000CL,
96 BARM = 0x00000010L,
97 BARER = 0x00000030L,
103 PADDRW = 0x00,
104 PDATA = 0x04,
105 PPMASK = 0x08,
106 PADDRR = 0x0c,
107 PIDXLO = 0x10,
108 PIDXHI = 0x14,
109 PIDXDATA= 0x18,
110 PIDXCTL = 0x1c
115 CLKCTL = 0x02, /* (0x01) Miscellaneous Clock Control */
116 SYNCCTL = 0x03, /* (0x00) Sync Control */
117 HSYNCPOS = 0x04, /* (0x00) Horizontal Sync Position */
118 PWRMNGMT = 0x05, /* (0x00) Power Management */
119 DACOP = 0x06, /* (0x02) DAC Operation */
120 PALETCTL = 0x07, /* (0x00) Palette Control */
121 SYSCLKCTL = 0x08, /* (0x01) System Clock Control */
122 PIXFMT = 0x0a, /* () Pixel Format [bpp >> 3 + 2] */
123 BPP8 = 0x0b, /* () 8 Bits/Pixel Control */
124 BPP16 = 0x0c, /* () 16 Bits/Pixel Control [bit 1=1 for 565] */
125 BPP24 = 0x0d, /* () 24 Bits/Pixel Control */
126 BPP32 = 0x0e, /* () 32 Bits/Pixel Control */
127 PIXCTL1 = 0x10, /* (0x05) Pixel PLL Control 1 */
128 PIXCTL2 = 0x11, /* (0x00) Pixel PLL Control 2 */
129 SYSCLKN = 0x15, /* () System Clock N (System PLL Reference Divider) */
130 SYSCLKM = 0x16, /* () System Clock M (System PLL VCO Divider) */
131 SYSCLKP = 0x17, /* () System Clock P */
132 SYSCLKC = 0x18, /* () System Clock C */
137 PIXM0 = 0x20, /* () Pixel M 0 */
138 PIXN0 = 0x21, /* () Pixel N 0 */
139 PIXP0 = 0x22, /* () Pixel P 0 */
140 PIXC0 = 0x23, /* () Pixel C 0 */
141 CURSCTL = 0x30, /* (0x00) Cursor Control */
142 CURSXLO = 0x31, /* () Cursor X position, low 8 bits */
143 CURSXHI = 0x32, /* () Cursor X position, high 8 bits */
144 CURSYLO = 0x33, /* () Cursor Y position, low 8 bits */
145 CURSYHI = 0x34, /* () Cursor Y position, high 8 bits */
146 CURSHOTX = 0x35, /* () Cursor Hot Spot X */
147 CURSHOTY = 0x36, /* () Cursor Hot Spot Y */
148 CURSACCTL = 0x37, /* () Advanced Cursor Control Enable */
149 CURSACATTR = 0x38, /* () Advanced Cursor Attribute */
150 CURS1R = 0x40, /* () Cursor 1 Red */
151 CURS1G = 0x41, /* () Cursor 1 Green */
152 CURS1B = 0x42, /* () Cursor 1 Blue */
153 CURS2R = 0x43, /* () Cursor 2 Red */
154 CURS2G = 0x44, /* () Cursor 2 Green */
155 CURS2B = 0x45, /* () Cursor 2 Blue */
156 CURS3R = 0x46, /* () Cursor 3 Red */
157 CURS3G = 0x47, /* () Cursor 3 Green */
158 CURS3B = 0x48, /* () Cursor 3 Blue */
159 BORDR = 0x60, /* () Border Color Red */
160 BORDG = 0x61, /* () Border Color Green */
161 BORDB = 0x62, /* () Border Color Blue */
162 MISCTL1 = 0x70, /* (0x00) Miscellaneous Control 1 */
163 MISCTL2 = 0x71, /* (0x00) Miscellaneous Control 2 */
164 MISCTL3 = 0x72, /* (0x00) Miscellaneous Control 3 */
165 KEYCTL = 0x78 /* (0x00) Key Control/DB Operation */
170 TVPADDRW = 0x00, /* 0 Palette/Cursor RAM Write Address/Index */
171 TVPPDATA = 0x04, /* 1 Palette Data RAM Data */
172 TVPPMASK = 0x08, /* 2 Pixel Read-Mask */
173 TVPPADRR = 0x0c, /* 3 Palette/Cursor RAM Read Address */
174 TVPCADRW = 0x10, /* 4 Cursor/Overscan Color Write Address */
175 TVPCDATA = 0x14, /* 5 Cursor/Overscan Color Data */
177 TVPCADRR = 0x1c, /* 7 Cursor/Overscan Color Read Address */
179 TVPDCCTL = 0x24, /* 9 Direct Cursor Control */
180 TVPIDATA = 0x28, /* 10 Index Data */
181 TVPCRDAT = 0x2c, /* 11 Cursor RAM Data */
182 TVPCXPOL = 0x30, /* 12 Cursor-Position X LSB */
183 TVPCXPOH = 0x34, /* 13 Cursor-Position X MSB */
184 TVPCYPOL = 0x38, /* 14 Cursor-Position Y LSB */
185 TVPCYPOH = 0x3c, /* 15 Cursor-Position Y MSB */
190 TVPIRREV = 0x01, /* Silicon Revision [RO] */
191 TVPIRICC = 0x06, /* Indirect Cursor Control (0x00) */
192 TVPIRBRC = 0x07, /* Byte Router Control (0xe4) */
193 TVPIRLAC = 0x0f, /* Latch Control (0x06) */
194 TVPIRTCC = 0x18, /* True Color Control (0x80) */
195 TVPIRMXC = 0x19, /* Multiplex Control (0x98) */
196 TVPIRCLS = 0x1a, /* Clock Selection (0x07) */
197 TVPIRPPG = 0x1c, /* Palette Page (0x00) */
198 TVPIRGEC = 0x1d, /* General Control (0x00) */
199 TVPIRMIC = 0x1e, /* Miscellaneous Control (0x00) */
200 TVPIRPLA = 0x2c, /* PLL Address */
201 TVPIRPPD = 0x2d, /* Pixel Clock PLL Data */
202 TVPIRMPD = 0x2e, /* Memory Clock PLL Data */
203 TVPIRLPD = 0x2f, /* Loop Clock PLL Data */
204 TVPIRCKL = 0x30, /* Color-Key Overlay Low */
205 TVPIRCKH = 0x31, /* Color-Key Overlay High */
206 TVPIRCRL = 0x32, /* Color-Key Red Low */
207 TVPIRCRH = 0x33, /* Color-Key Red High */
208 TVPIRCGL = 0x34, /* Color-Key Green Low */
209 TVPIRCGH = 0x35, /* Color-Key Green High */
210 TVPIRCBL = 0x36, /* Color-Key Blue Low */
211 TVPIRCBH = 0x37, /* Color-Key Blue High */
212 TVPIRCKC = 0x38, /* Color-Key Control (0x00) */
213 TVPIRMLC = 0x39, /* MCLK/Loop Clock Control (0x18) */
214 TVPIRSEN = 0x3a, /* Sense Test (0x00) */
215 TVPIRTMD = 0x3b, /* Test Mode Data */
216 TVPIRRML = 0x3c, /* CRC Remainder LSB [RO] */
217 TVPIRRMM = 0x3d, /* CRC Remainder MSB [RO] */
218 TVPIRRMS = 0x3e, /* CRC Bit Select [WO] */
219 TVPIRDID = 0x3f, /* Device ID [RO] (0x30) */
220 TVPIRRES = 0xff /* Software Reset [WO] */
228 { CLKCTL, 0x21 },
229 { SYNCCTL, 0x00 },
230 { HSYNCPOS, 0x00 },
231 { PWRMNGMT, 0x00 },
232 { DACOP, 0x02 },
233 { PALETCTL, 0x00 },
234 { SYSCLKCTL, 0x01 },
242 { BPP8, 0x00 },
243 { BPP16, 0x01 },
244 { BPP24, 0x00 },
245 { BPP32, 0x00 },
247 { PIXCTL1, 0x05 },
248 { PIXCTL2, 0x00 },
249 { SYSCLKN, 0x08 },
250 { SYSCLKM, 0x4f },
251 { SYSCLKP, 0x00 },
252 { SYSCLKC, 0x00 },
253 { CURSCTL, 0x00 },
254 { CURSACCTL, 0x01 },
255 { CURSACATTR, 0xa8 },
256 { CURS1R, 0xff },
257 { CURS1G, 0xff },
258 { CURS1B, 0xff },
259 { CURS2R, 0xff },
260 { CURS2G, 0xff },
261 { CURS2B, 0xff },
262 { CURS3R, 0xff },
263 { CURS3G, 0xff },
264 { CURS3B, 0xff },
265 { BORDR, 0xff },
266 { BORDG, 0xff },
267 { BORDB, 0xff },
268 { MISCTL1, 0x01 },
269 { MISCTL2, 0x45 },
270 { MISCTL3, 0x00 },
271 { KEYCTL, 0x00 }
275 { TVPIRICC, 0x00 },
276 { TVPIRBRC, 0xe4 },
277 { TVPIRLAC, 0x06 },
278 { TVPIRTCC, 0x80 },
279 { TVPIRMXC, 0x4d },
280 { TVPIRCLS, 0x05 },
281 { TVPIRPPG, 0x00 },
282 { TVPIRGEC, 0x00 },
283 { TVPIRMIC, 0x08 },
284 { TVPIRCKL, 0xff },
285 { TVPIRCKH, 0xff },
286 { TVPIRCRL, 0xff },
287 { TVPIRCRH, 0xff },
288 { TVPIRCGL, 0xff },
289 { TVPIRCGH, 0xff },
290 { TVPIRCBL, 0xff },
291 { TVPIRCBH, 0xff },
292 { TVPIRCKC, 0x00 },
293 { TVPIRPLA, 0x00 },
294 { TVPIRPPD, 0xc0 },
295 { TVPIRPPD, 0xd5 },
296 { TVPIRPPD, 0xea },
297 { TVPIRPLA, 0x00 },
298 { TVPIRMPD, 0xb9 },
299 { TVPIRMPD, 0x3a },
300 { TVPIRMPD, 0xb1 },
301 { TVPIRPLA, 0x00 },
302 { TVPIRLPD, 0xc1 },
303 { TVPIRLPD, 0x3d },
304 { TVPIRLPD, 0xf3 },
312 __u8 mlc[3]; /* Memory Loop Config 0x39 */
326 IBM = 0,
334 static int inverse = 0;
335 static char fontname[40] __initdata = { 0 };
342 0x0002, 0x0006, 0x0026, 0x0028, 0x0003, 0x0016, 0x0196, 0x0197, 0x0196,
343 0xec, 0x2a, 0xf3,
344 { 0x3c, 0x3b, 0x39 }, { 0xf3, 0xf3, 0xf3 }
349 0x0004, 0x0009, 0x0031, 0x0036, 0x0003, 0x002a, 0x020a, 0x020d, 0x020a,
350 0xef, 0x2e, 0xb2,
351 { 0x39, 0x39, 0x38 }, { 0xf3, 0xf3, 0xf3 }
356 0x0005, 0x000e, 0x0040, 0x0042, 0x0003, 0x018, 0x270, 0x271, 0x270,
357 0xf6, 0x2e, 0xf2,
358 { 0x3a, 0x39, 0x38 }, { 0xf3, 0xf3, 0xf3 }
363 0x0004, 0x0011, 0x0045, 0x0048, 0x0003, 0x002a, 0x029a, 0x029b, 0x0000,
364 0xfe, 0x3e, 0xf1,
365 { 0x39, 0x38, 0x38 }, { 0xf3, 0xf3, 0xf2 }
370 0x0006, 0x0210, 0x0250, 0x0053, 0x1003, 0x0021, 0x0321, 0x0324, 0x0000,
371 0xfc, 0x3a, 0xf1,
372 { 0x39, 0x38, 0x38 }, { 0xf3, 0xf3, 0xf2 }
377 0x0009, 0x0011, 0x059, 0x5b, 0x0003, 0x0031, 0x0397, 0x039a, 0x0000,
378 0xfd, 0x3a, 0xf1,
379 { 0x39, 0x38, 0x38 }, { 0xf3, 0xf3, 0xf2 }
384 0x0009, 0x0016, 0x0066, 0x0069, 0x0003, 0x0027, 0x03e7, 0x03e8, 0x03e7,
385 0xf7, 0x36, 0xf0,
386 { 0x38, 0x38, 0x38 }, { 0xf3, 0xf2, 0xf1 }
391 0x0009, 0x0018, 0x0068, 0x006a, 0x0003, 0x0029, 0x0429, 0x042a, 0x0000,
392 0xf0, 0x2d, 0xf0,
393 { 0x38, 0x38, 0x38 }, { 0xf3, 0xf2, 0xf1 }
440 clk_m = clk_n = 0; in setclkMHz()
441 stage = spilled = 0; in setclkMHz()
444 case 0: in setclkMHz()
458 stage = 0; in setclkMHz()
464 par->init.pclk_p = 0; in setclkMHz()
475 hes = 0x0008; heb = 0x0012; veb = 0x002a; htp = 10; vtp = 2; in compute_imstt_regvals_ibm()
479 hes = 0x0005; heb = 0x0020; veb = 0x0028; htp = 8; vtp = 3; in compute_imstt_regvals_ibm()
483 hes = 0x000a; heb = 0x001c; veb = 0x0020; htp = 8; vtp = 3; in compute_imstt_regvals_ibm()
487 hes = 0x0012; heb = 0x0022; veb = 0x0031; htp = 4; vtp = 3; in compute_imstt_regvals_ibm()
491 hes = 0x0012; heb = 0x002f; veb = 0x0029; htp = 4; vtp = 1; in compute_imstt_regvals_ibm()
495 hes = 0x0018; heb = 0x0040; veb = 0x002a; htp = 4; vtp = 3; in compute_imstt_regvals_ibm()
508 init->ves = 0x0003; in compute_imstt_regvals_ibm()
567 par->cmap_regs[PIDXHI] = 0; eieio(); in set_imstt_regvals_ibm()
575 par->cmap_regs[PIDXDATA] = 0x02; eieio(); in set_imstt_regvals_ibm()
591 tcc = 0x80; in set_imstt_regvals_tvp()
592 mxc = 0x4d; in set_imstt_regvals_tvp()
593 lckl_n = 0xc1; in set_imstt_regvals_tvp()
594 mlc = init->mlc[0]; in set_imstt_regvals_tvp()
595 lckl_p = init->lckl_p[0]; in set_imstt_regvals_tvp()
598 tcc = 0x44; in set_imstt_regvals_tvp()
599 mxc = 0x55; in set_imstt_regvals_tvp()
600 lckl_n = 0xe1; in set_imstt_regvals_tvp()
605 tcc = 0x5e; in set_imstt_regvals_tvp()
606 mxc = 0x5d; in set_imstt_regvals_tvp()
607 lckl_n = 0xf1; in set_imstt_regvals_tvp()
612 tcc = 0x46; in set_imstt_regvals_tvp()
613 mxc = 0x5d; in set_imstt_regvals_tvp()
614 lckl_n = 0xf1; in set_imstt_regvals_tvp()
619 mic = 0x08; in set_imstt_regvals_tvp()
622 par->cmap_regs[TVPIDATA] = 0x00; eieio(); in set_imstt_regvals_tvp()
638 par->cmap_regs[TVPIDATA] = 0x00; eieio(); in set_imstt_regvals_tvp()
643 par->cmap_regs[TVPIDATA] = 0x15; eieio(); in set_imstt_regvals_tvp()
648 par->cmap_regs[TVPIDATA] = 0x2a; eieio(); in set_imstt_regvals_tvp()
672 * 8bpp 0 0 in set_imstt_regvals()
673 * 16bpp 0 1 in set_imstt_regvals()
679 ctl = 0x17b1; in set_imstt_regvals()
681 byteswap = 0x000; in set_imstt_regvals()
684 ctl = 0x17b3; in set_imstt_regvals()
686 byteswap = 0x100; in set_imstt_regvals()
689 ctl = 0x17b9; in set_imstt_regvals()
691 byteswap = 0x200; in set_imstt_regvals()
694 ctl = 0x17b5; in set_imstt_regvals()
696 byteswap = 0x300; in set_imstt_regvals()
700 ctl -= 0x30; in set_imstt_regvals()
715 write_reg_le32(par->dc_regs, RRSC, 0x980); in set_imstt_regvals()
716 write_reg_le32(par->dc_regs, RRCR, 0x11); in set_imstt_regvals()
719 write_reg_le32(par->dc_regs, HRIR, 0x0100); in set_imstt_regvals()
720 write_reg_le32(par->dc_regs, CMR, 0x00ff); in set_imstt_regvals()
721 write_reg_le32(par->dc_regs, SRGCTL, 0x0073); in set_imstt_regvals()
723 write_reg_le32(par->dc_regs, HRIR, 0x0200); in set_imstt_regvals()
724 write_reg_le32(par->dc_regs, CMR, 0x01ff); in set_imstt_regvals()
725 write_reg_le32(par->dc_regs, SRGCTL, 0x0003); in set_imstt_regvals()
729 case 0x200000: in set_imstt_regvals()
730 scr = 0x059d | byteswap; in set_imstt_regvals()
732 /* case 0x400000: in set_imstt_regvals()
733 case 0x800000: */ in set_imstt_regvals()
736 scr = 0x150dd | byteswap; in set_imstt_regvals()
758 par->cmap_regs[PIDXHI] = 0; eieio(); in set_555()
760 par->cmap_regs[PIDXDATA] = 0x01; eieio(); in set_555()
763 par->cmap_regs[TVPIDATA] = 0x44; eieio(); in set_555()
771 par->cmap_regs[PIDXHI] = 0; eieio(); in set_565()
773 par->cmap_regs[PIDXDATA] = 0x03; eieio(); in set_565()
776 par->cmap_regs[TVPIDATA] = 0x45; eieio(); in set_565()
796 var->red.offset = 0; in imsttfb_check_var()
798 var->green.offset = 0; in imsttfb_check_var()
800 var->blue.offset = 0; in imsttfb_check_var()
802 var->transp.offset = 0; in imsttfb_check_var()
803 var->transp.length = 0; in imsttfb_check_var()
812 var->blue.offset = 0; in imsttfb_check_var()
814 var->transp.offset = 0; in imsttfb_check_var()
815 var->transp.length = 0; in imsttfb_check_var()
822 var->blue.offset = 0; in imsttfb_check_var()
824 var->transp.offset = 0; in imsttfb_check_var()
825 var->transp.length = 0; in imsttfb_check_var()
832 var->blue.offset = 0; in imsttfb_check_var()
846 var->red.msb_right = 0; in imsttfb_check_var()
847 var->green.msb_right = 0; in imsttfb_check_var()
848 var->blue.msb_right = 0; in imsttfb_check_var()
849 var->transp.msb_right = 0; in imsttfb_check_var()
856 return 0; in imsttfb_check_var()
873 return 0; in imsttfb_set_par()
891 if (0 && bpp == 16) /* screws up X */ in imsttfb_setcolreg()
918 return 0; in imsttfb_setcolreg()
931 return 0; in imsttfb_pan_display()
941 if (blank > 0) { in imsttfb_blank()
945 ctrl &= ~0x00000380; in imsttfb_blank()
947 par->cmap_regs[PIDXHI] = 0; eieio(); in imsttfb_blank()
949 par->cmap_regs[PIDXDATA] = 0x55; eieio(); in imsttfb_blank()
951 par->cmap_regs[PIDXDATA] = 0x11; eieio(); in imsttfb_blank()
953 par->cmap_regs[PIDXDATA] = 0x0f; eieio(); in imsttfb_blank()
955 par->cmap_regs[PIDXDATA] = 0x1f; eieio(); in imsttfb_blank()
957 par->cmap_regs[PIDXDATA] = 0xc0; in imsttfb_blank()
961 ctrl &= ~0x00000020; in imsttfb_blank()
964 ctrl &= ~0x00000010; in imsttfb_blank()
969 ctrl |= 0x000017b0; in imsttfb_blank()
970 par->cmap_regs[PIDXHI] = 0; eieio(); in imsttfb_blank()
972 par->cmap_regs[PIDXDATA] = 0x01; eieio(); in imsttfb_blank()
974 par->cmap_regs[PIDXDATA] = 0x00; eieio(); in imsttfb_blank()
976 par->cmap_regs[PIDXDATA] = 0x00; eieio(); in imsttfb_blank()
978 par->cmap_regs[PIDXDATA] = 0x01; eieio(); in imsttfb_blank()
980 par->cmap_regs[PIDXDATA] = 0x45; eieio(); in imsttfb_blank()
982 ctrl |= 0x00001780; in imsttfb_blank()
985 return 0; in imsttfb_blank()
1009 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x80); in imsttfb_fillrect()
1013 write_reg_le32(par->dc_regs, BI, 0xffffffff); in imsttfb_fillrect()
1014 write_reg_le32(par->dc_regs, MBC, 0xffffffff); in imsttfb_fillrect()
1016 write_reg_le32(par->dc_regs, BLTCTL, 0x840); /* 0x200000 */ in imsttfb_fillrect()
1017 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x80); in imsttfb_fillrect()
1018 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x40); in imsttfb_fillrect()
1020 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x80); in imsttfb_fillrect()
1026 write_reg_le32(par->dc_regs, BLTCTL, 0x40005); in imsttfb_fillrect()
1027 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x80); in imsttfb_fillrect()
1028 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x40); in imsttfb_fillrect()
1051 bltctl = 0x05; in imsttfb_copyarea()
1058 sp |= -(line_pitch) & 0xffff; in imsttfb_copyarea()
1059 dp_octl = -(line_pitch) & 0xffff; in imsttfb_copyarea()
1067 bltctl |= 0x80; in imsttfb_copyarea()
1068 cnt |= -(width) & 0xffff; in imsttfb_copyarea()
1075 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x80); in imsttfb_copyarea()
1082 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x80); in imsttfb_copyarea()
1083 while(read_reg_le32(par->dc_regs, SSTATUS) & 0x40); in imsttfb_copyarea()
1086 #if 0
1097 for (x = 0; x < 0x100; x++) {
1099 par->cmap_regs[PIDXDATA] = 0x00; eieio();
1102 for (y = 0; y < height; y++)
1103 for (x = 0; x < width >> 2; x++) {
1105 par->cmap_regs[PIDXDATA] = 0xff; eieio();
1107 par->cmap_regs[PIDXHI] = 0; eieio();
1128 par->cmap_regs[TVPIDATA] &= 0x03; eieio();
1129 par->cmap_regs[TVPADDRW] = 0; eieio();
1130 for (x = 0; x < 0x200; x++) {
1131 par->cmap_regs[TVPCRDAT] = 0x00; eieio();
1133 for (x = 0; x < 0x200; x++) {
1134 par->cmap_regs[TVPCRDAT] = 0xff; eieio();
1137 par->cmap_regs[TVPIDATA] &= 0x03; eieio();
1138 for (y = 0; y < height; y++)
1139 for (x = 0; x < width >> 3; x++) {
1141 par->cmap_regs[TVPCRDAT] = 0xff; eieio();
1144 par->cmap_regs[TVPIDATA] |= 0x08; eieio();
1145 for (y = 0; y < height; y++)
1146 for (x = 0; x < width >> 3; x++) {
1148 par->cmap_regs[TVPCRDAT] = 0xff; eieio();
1150 par->cmap_regs[TVPCADRW] = 0x00; eieio();
1151 for (x = 0; x < 12; x++) {
1163 par->cmap_regs[PIDXHI] = 0; eieio();
1166 par->cmap_regs[PIDXDATA] = 0x00; eieio();
1171 par->cmap_regs[PIDXDATA] = d->dx & 0xff;eieio();
1175 par->cmap_regs[PIDXDATA] = d->dy & 0xff;eieio();
1177 par->cmap_regs[PIDXDATA] = 0x02; eieio();
1182 par->cmap_regs[TVPIDATA] = 0x00; eieio();
1184 __u16 x = d->dx + 0x40, y = d->dy + 0x40;
1187 par->cmap_regs[TVPCXPOL] = x & 0xff; eieio();
1189 par->cmap_regs[TVPCYPOL] = y & 0xff; eieio();
1191 par->cmap_regs[TVPIDATA] = 0x02; eieio();
1205 imstt_set_cursor(info, cursor, 0);
1224 for (i = 0; i < cursor->image.height; i++) {
1225 for (j = 0; j < width; j++) {
1236 for (i = 0; i < cursor->image.height; i++) {
1237 for (j = 0; j < width; j++) {
1247 fg = ((info->cmap.red[fg_idx] & 0xf8) << 7) |
1248 ((info->cmap.green[fg_idx] & 0xf8) << 2) |
1249 ((info->cmap.blue[fg_idx] & 0xf8) >> 3) | 1 << 15;
1255 return 0;
1259 #define FBIMSTT_SETREG 0x545401
1260 #define FBIMSTT_GETREG 0x545402
1261 #define FBIMSTT_SETCMAPREG 0x545403
1262 #define FBIMSTT_GETCMAPREG 0x545404
1263 #define FBIMSTT_SETIDXREG 0x545405
1264 #define FBIMSTT_GETIDXREG 0x545406
1276 if (copy_from_user(reg, argp, 8) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0])) in imsttfb_ioctl()
1278 write_reg_le32(par->dc_regs, reg[0], reg[1]); in imsttfb_ioctl()
1279 return 0; in imsttfb_ioctl()
1281 if (copy_from_user(reg, argp, 4) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0])) in imsttfb_ioctl()
1283 reg[1] = read_reg_le32(par->dc_regs, reg[0]); in imsttfb_ioctl()
1286 return 0; in imsttfb_ioctl()
1288 if (copy_from_user(reg, argp, 8) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0])) in imsttfb_ioctl()
1290 write_reg_le32(((u_int __iomem *)par->cmap_regs), reg[0], reg[1]); in imsttfb_ioctl()
1291 return 0; in imsttfb_ioctl()
1293 if (copy_from_user(reg, argp, 4) || reg[0] > (0x1000 - sizeof(reg[0])) / sizeof(reg[0])) in imsttfb_ioctl()
1295 reg[1] = read_reg_le32(((u_int __iomem *)par->cmap_regs), reg[0]); in imsttfb_ioctl()
1298 return 0; in imsttfb_ioctl()
1302 par->cmap_regs[PIDXHI] = 0; eieio(); in imsttfb_ioctl()
1303 par->cmap_regs[PIDXLO] = idx[0]; eieio(); in imsttfb_ioctl()
1305 return 0; in imsttfb_ioctl()
1309 par->cmap_regs[PIDXHI] = 0; eieio(); in imsttfb_ioctl()
1310 par->cmap_regs[PIDXLO] = idx[0]; eieio(); in imsttfb_ioctl()
1314 return 0; in imsttfb_ioctl()
1322 PCI_ANY_ID, PCI_ANY_ID, 0, 0, IBM },
1324 PCI_ANY_ID, PCI_ANY_ID, 0, 0, TVP },
1325 { 0, }
1357 info->fix.smem_len = (tmp & 0x0004) ? 0x400000 : 0x200000; in init_imstt()
1359 info->fix.smem_len = 0x800000; in init_imstt()
1364 *ip++ = 0; in init_imstt()
1368 write_reg_le32(par->dc_regs, STGCTL, tmp & ~0x1); in init_imstt()
1369 write_reg_le32(par->dc_regs, SSR, 0); in init_imstt()
1373 par->cmap_regs[PPMASK] = 0xff; in init_imstt()
1375 par->cmap_regs[PIDXHI] = 0; in init_imstt()
1377 for (i = 0; i < ARRAY_SIZE(ibm_initregs); i++) { in init_imstt()
1384 for (i = 0; i < ARRAY_SIZE(tvp_initregs); i++) { in init_imstt()
1398 if (vmode <= 0 || vmode > VMODE_MAX) in init_imstt()
1427 info->fix.mmio_len = 0x1000; in init_imstt()
1435 info->fix.ywrapstep = 0; in init_imstt()
1455 fb_alloc_cmap(&info->cmap, 0, 0); in init_imstt()
1457 if (register_framebuffer(info) < 0) { in init_imstt()
1462 tmp = (read_reg_le32(par->dc_regs, SSTATUS) & 0x0f00) >> 8; in init_imstt()
1492 addr = pci_resource_start (pdev, 0); in imsttfb_probe()
1493 size = pci_resource_len (pdev, 0); in imsttfb_probe()
1512 printk(KERN_INFO "imsttfb: Device 0x%x unknown, " in imsttfb_probe()
1520 0x400000 : 0x800000); in imsttfb_probe()
1523 info->fix.mmio_start = addr + 0x800000; in imsttfb_probe()
1524 par->dc_regs = ioremap(addr + 0x800000, 0x1000); in imsttfb_probe()
1527 par->cmap_regs_phys = addr + 0x840000; in imsttfb_probe()
1528 par->cmap_regs = (__u8 *)ioremap(addr + 0x840000, 0x1000); in imsttfb_probe()
1535 return 0; in imsttfb_probe()
1551 int size = pci_resource_len(pdev, 0); in imsttfb_remove()
1568 return 0; in imsttfb_setup()
1576 for (i = 0; i < sizeof(fontname) - 1; i++) in imsttfb_setup()
1580 fontname[i] = 0; in imsttfb_setup()
1587 int vmode = simple_strtoul(this_opt+6, NULL, 0); in imsttfb_setup()
1588 if (vmode > 0 && vmode <= VMODE_MAX) in imsttfb_setup()
1591 int cmode = simple_strtoul(this_opt+6, NULL, 0); in imsttfb_setup()
1611 return 0; in imsttfb_setup()