17 #include <linux/module.h>
120 #define FRAMEMASTER_SIZE 0x200000
121 #define FRAMEMASTER_REG 0x1ffff8
123 #define FRAMEMASTER_NOLACE 1
124 #define FRAMEMASTER_ENABLE 2
125 #define FRAMEMASTER_COMPL 4
126 #define FRAMEMASTER_ROM 8
128 static volatile unsigned char *fm2fb_reg;
134 .line_length = (768 << 2),
139 static int fm2fb_mode __devinitdata = -1;
141 #define FM2FB_MODE_PAL 0
142 #define FM2FB_MODE_NTSC 1
147 768, 576, 768, 576, 0, 0, 32, 0,
148 { 16, 8, 0 }, { 8, 8, 0 }, { 0, 8, 0 }, { 24, 8, 0 },
153 768, 480, 768, 480, 0, 0, 32, 0,
154 { 16, 8, 0 }, { 8, 8, 0 }, { 0, 8, 0 }, { 24, 8, 0 },
166 static int fm2fb_blank(
int blank,
struct fb_info *
info);
168 static struct fb_ops fm2fb_ops = {
170 .fb_setcolreg = fm2fb_setcolreg,
171 .fb_blank = fm2fb_blank,
180 static int fm2fb_blank(
int blank,
struct fb_info *
info)
214 static int __devinit fm2fb_probe(
struct zorro_dev *z,
224 static struct zorro_driver fm2fb_driver = {
226 .id_table = fm2fb_devices,
227 .probe = fm2fb_probe,
230 static int __devinit fm2fb_probe(
struct zorro_dev *z,
240 if (!zorro_request_device(z,
"fm2fb"))
245 zorro_release_device(z);
251 zorro_release_device(z);
256 fb_fix.smem_start = zorro_resource_start(z);
261 strcpy(fb_fix.id, is_fm ?
"FrameMaster II" :
"Rainbow II");
264 ptr = (
unsigned long *)fb_fix.smem_start;
265 for (y = 0; y < 576; y++) {
266 for (x = 0; x < 96; x++) *ptr++ = 0xffffff;
267 for (x = 0; x < 96; x++) *ptr++ = 0xffff00;
268 for (x = 0; x < 96; x++) *ptr++ = 0x00ffff;
269 for (x = 0; x < 96; x++) *ptr++ = 0x00ff00;
270 for (x = 0; x < 96; x++) *ptr++ = 0xff00ff;
271 for (x = 0; x < 96; x++) *ptr++ = 0xff0000;
272 for (x = 0; x < 96; x++) *ptr++ = 0x0000ff;
273 for (x = 0; x < 96; x++) *ptr++ = 0x000000;
275 fm2fb_blank(0, info);
277 if (fm2fb_mode == -1)
280 info->
fbops = &fm2fb_ops;
281 info->
var = fb_var_modes[fm2fb_mode];
291 zorro_release_device(z);
294 printk(
"fb%d: %s frame buffer device\n", info->
node, fb_fix.id);
302 if (!options || !*options)
305 while ((this_opt =
strsep(&options,
",")) !=
NULL) {
306 if (!
strncmp(this_opt,
"pal", 3))
308 else if (!
strncmp(this_opt,
"ntsc", 4))