2 * platinumfb.c -- frame buffer device for the PowerMac 'platinum' display
4 * Copyright (C) 1998 Franz Sirl
6 * Frame buffer structure from:
7 * drivers/video/controlfb.c -- frame buffer device for
8 * Apple 'control' display chip.
9 * Copyright (C) 1998 Dan Jacobowitz
11 * Hardware information from:
12 * platinum.c: Console support for PowerMac "platinum" display adaptor.
13 * Copyright (C) 1996 Paul Mackerras and Mark Abene
15 * This file is subject to the terms and conditions of the GNU General Public
16 * License. See the file COPYING in the main directory of this archive for
22 #include <linux/module.h>
23 #include <linux/kernel.h>
24 #include <linux/errno.h>
25 #include <linux/string.h>
27 #include <linux/slab.h>
28 #include <linux/vmalloc.h>
29 #include <linux/delay.h>
30 #include <linux/interrupt.h>
32 #include <linux/init.h>
33 #include <linux/nvram.h>
34 #include <linux/of_device.h>
35 #include <linux/of_platform.h>
38 #include <asm/pgtable.h>
41 #include "platinumfb.h"
43 static int default_vmode
= VMODE_NVRAM
;
44 static int default_cmode
= CMODE_NVRAM
;
46 struct fb_info_platinum
{
55 __u8 red
, green
, blue
;
57 u32 pseudo_palette
[16];
59 volatile struct cmap_regs __iomem
*cmap_regs
;
60 unsigned long cmap_regs_phys
;
62 volatile struct platinum_regs __iomem
*platinum_regs
;
63 unsigned long platinum_regs_phys
;
65 __u8 __iomem
*frame_buffer
;
66 volatile __u8 __iomem
*base_frame_buffer
;
67 unsigned long frame_buffer_phys
;
69 unsigned long total_vram
;
73 struct resource rsrc_fb
, rsrc_reg
;
77 * Frame buffer device API
80 static int platinumfb_setcolreg(u_int regno
, u_int red
, u_int green
, u_int blue
,
81 u_int transp
, struct fb_info
*info
);
82 static int platinumfb_blank(int blank_mode
, struct fb_info
*info
);
83 static int platinumfb_set_par (struct fb_info
*info
);
84 static int platinumfb_check_var (struct fb_var_screeninfo
*var
, struct fb_info
*info
);
90 static inline int platinum_vram_reqd(int video_mode
, int color_mode
);
91 static int read_platinum_sense(struct fb_info_platinum
*pinfo
);
92 static void set_platinum_clock(struct fb_info_platinum
*pinfo
);
93 static void platinum_set_hardware(struct fb_info_platinum
*pinfo
);
94 static int platinum_var_to_par(struct fb_var_screeninfo
*var
,
95 struct fb_info_platinum
*pinfo
,
99 * Interface used by the world
102 static struct fb_ops platinumfb_ops
= {
103 .owner
= THIS_MODULE
,
104 .fb_check_var
= platinumfb_check_var
,
105 .fb_set_par
= platinumfb_set_par
,
106 .fb_setcolreg
= platinumfb_setcolreg
,
107 .fb_blank
= platinumfb_blank
,
108 .fb_fillrect
= cfb_fillrect
,
109 .fb_copyarea
= cfb_copyarea
,
110 .fb_imageblit
= cfb_imageblit
,
114 * Checks a var structure
116 static int platinumfb_check_var (struct fb_var_screeninfo
*var
, struct fb_info
*info
)
118 return platinum_var_to_par(var
, info
->par
, 1);
122 * Applies current var to display
124 static int platinumfb_set_par (struct fb_info
*info
)
126 struct fb_info_platinum
*pinfo
= info
->par
;
127 struct platinum_regvals
*init
;
128 int err
, offset
= 0x20;
130 if((err
= platinum_var_to_par(&info
->var
, pinfo
, 0))) {
131 printk (KERN_ERR
"platinumfb_set_par: error calling"
132 " platinum_var_to_par: %d.\n", err
);
136 platinum_set_hardware(pinfo
);
138 init
= platinum_reg_init
[pinfo
->vmode
-1];
140 if ((pinfo
->vmode
== VMODE_832_624_75
) && (pinfo
->cmode
> CMODE_8
))
143 info
->screen_base
= pinfo
->frame_buffer
+ init
->fb_offset
+ offset
;
144 mutex_lock(&info
->mm_lock
);
145 info
->fix
.smem_start
= (pinfo
->frame_buffer_phys
) + init
->fb_offset
+ offset
;
146 mutex_unlock(&info
->mm_lock
);
147 info
->fix
.visual
= (pinfo
->cmode
== CMODE_8
) ?
148 FB_VISUAL_PSEUDOCOLOR
: FB_VISUAL_DIRECTCOLOR
;
149 info
->fix
.line_length
= vmode_attrs
[pinfo
->vmode
-1].hres
* (1<<pinfo
->cmode
)
151 printk("line_length: %x\n", info
->fix
.line_length
);
155 static int platinumfb_blank(int blank
, struct fb_info
*fb
)
158 * Blank the screen if blank_mode != 0, else unblank. If blank == NULL
159 * then the caller blanks by setting the CLUT (Color Look Up Table) to all
160 * black. Return 0 if blanking succeeded, != 0 if un-/blanking failed due
161 * to e.g. a video mode which doesn't support it. Implements VESA suspend
162 * and powerdown modes on hardware that supports disabling hsync/vsync:
163 * blank_mode == 2: suspend vsync
164 * blank_mode == 3: suspend hsync
165 * blank_mode == 4: powerdown
167 /* [danj] I think there's something fishy about those constants... */
169 struct fb_info_platinum *info = (struct fb_info_platinum *) fb;
172 ctrl = ld_le32(&info->platinum_regs->ctrl.r) | 0x33;
175 if (blank & VESA_VSYNC_SUSPEND)
177 if (blank & VESA_HSYNC_SUSPEND)
179 out_le32(&info->platinum_regs->ctrl.r, ctrl);
181 /* TODO: Figure out how the heck to powerdown this thing! */
185 static int platinumfb_setcolreg(u_int regno
, u_int red
, u_int green
, u_int blue
,
186 u_int transp
, struct fb_info
*info
)
188 struct fb_info_platinum
*pinfo
= info
->par
;
189 volatile struct cmap_regs __iomem
*cmap_regs
= pinfo
->cmap_regs
;
198 pinfo
->palette
[regno
].red
= red
;
199 pinfo
->palette
[regno
].green
= green
;
200 pinfo
->palette
[regno
].blue
= blue
;
202 out_8(&cmap_regs
->addr
, regno
); /* tell clut what addr to fill */
203 out_8(&cmap_regs
->lut
, red
); /* send one color channel at */
204 out_8(&cmap_regs
->lut
, green
); /* a time... */
205 out_8(&cmap_regs
->lut
, blue
);
209 u32
*pal
= info
->pseudo_palette
;
210 switch (pinfo
->cmode
) {
212 pal
[regno
] = (regno
<< 10) | (regno
<< 5) | regno
;
215 i
= (regno
<< 8) | regno
;
216 pal
[regno
] = (i
<< 16) | i
;
224 static inline int platinum_vram_reqd(int video_mode
, int color_mode
)
226 int baseval
= vmode_attrs
[video_mode
-1].hres
* (1<<color_mode
);
228 if ((video_mode
== VMODE_832_624_75
) && (color_mode
> CMODE_8
))
233 return vmode_attrs
[video_mode
-1].vres
* baseval
+ 0x1000;
236 #define STORE_D2(a, d) { \
237 out_8(&cmap_regs->addr, (a+32)); \
238 out_8(&cmap_regs->d2, (d)); \
241 static void set_platinum_clock(struct fb_info_platinum
*pinfo
)
243 volatile struct cmap_regs __iomem
*cmap_regs
= pinfo
->cmap_regs
;
244 struct platinum_regvals
*init
;
246 init
= platinum_reg_init
[pinfo
->vmode
-1];
249 out_8(&cmap_regs
->addr
,3+32);
251 if (in_8(&cmap_regs
->d2
) == 2) {
252 STORE_D2(7, init
->clock_params
[pinfo
->clktype
][0]);
253 STORE_D2(8, init
->clock_params
[pinfo
->clktype
][1]);
256 STORE_D2(4, init
->clock_params
[pinfo
->clktype
][0]);
257 STORE_D2(5, init
->clock_params
[pinfo
->clktype
][1]);
266 /* Now how about actually saying, Make it so! */
267 /* Some things in here probably don't need to be done each time. */
268 static void platinum_set_hardware(struct fb_info_platinum
*pinfo
)
270 volatile struct platinum_regs __iomem
*platinum_regs
= pinfo
->platinum_regs
;
271 volatile struct cmap_regs __iomem
*cmap_regs
= pinfo
->cmap_regs
;
272 struct platinum_regvals
*init
;
276 vmode
= pinfo
->vmode
;
277 cmode
= pinfo
->cmode
;
279 init
= platinum_reg_init
[vmode
- 1];
281 /* Initialize display timing registers */
282 out_be32(&platinum_regs
->reg
[24].r
, 7); /* turn display off */
284 for (i
= 0; i
< 26; ++i
)
285 out_be32(&platinum_regs
->reg
[i
+32].r
, init
->regs
[i
]);
287 out_be32(&platinum_regs
->reg
[26+32].r
, (pinfo
->total_vram
== 0x100000 ?
288 init
->offset
[cmode
] + 4 - cmode
:
289 init
->offset
[cmode
]));
290 out_be32(&platinum_regs
->reg
[16].r
, (unsigned) pinfo
->frame_buffer_phys
+init
->fb_offset
+0x10);
291 out_be32(&platinum_regs
->reg
[18].r
, init
->pitch
[cmode
]);
292 out_be32(&platinum_regs
->reg
[19].r
, (pinfo
->total_vram
== 0x100000 ?
293 init
->mode
[cmode
+1] :
295 out_be32(&platinum_regs
->reg
[20].r
, (pinfo
->total_vram
== 0x100000 ? 0x11 : 0x1011));
296 out_be32(&platinum_regs
->reg
[21].r
, 0x100);
297 out_be32(&platinum_regs
->reg
[22].r
, 1);
298 out_be32(&platinum_regs
->reg
[23].r
, 1);
299 out_be32(&platinum_regs
->reg
[26].r
, 0xc00);
300 out_be32(&platinum_regs
->reg
[27].r
, 0x235);
301 /* out_be32(&platinum_regs->reg[27].r, 0x2aa); */
303 STORE_D2(0, (pinfo
->total_vram
== 0x100000 ?
304 init
->dacula_ctrl
[cmode
] & 0xf :
305 init
->dacula_ctrl
[cmode
]));
309 set_platinum_clock(pinfo
);
311 out_be32(&platinum_regs
->reg
[24].r
, 0); /* turn display on */
315 * Set misc info vars for this driver
317 static void __devinit
platinum_init_info(struct fb_info
*info
, struct fb_info_platinum
*pinfo
)
320 info
->fbops
= &platinumfb_ops
;
321 info
->pseudo_palette
= pinfo
->pseudo_palette
;
322 info
->flags
= FBINFO_DEFAULT
;
323 info
->screen_base
= pinfo
->frame_buffer
+ 0x20;
325 fb_alloc_cmap(&info
->cmap
, 256, 0);
327 /* Fill fix common fields */
328 strcpy(info
->fix
.id
, "platinum");
329 info
->fix
.mmio_start
= pinfo
->platinum_regs_phys
;
330 info
->fix
.mmio_len
= 0x1000;
331 info
->fix
.type
= FB_TYPE_PACKED_PIXELS
;
332 info
->fix
.smem_start
= pinfo
->frame_buffer_phys
+ 0x20; /* will be updated later */
333 info
->fix
.smem_len
= pinfo
->total_vram
- 0x20;
334 info
->fix
.ywrapstep
= 0;
335 info
->fix
.xpanstep
= 0;
336 info
->fix
.ypanstep
= 0;
337 info
->fix
.type_aux
= 0;
338 info
->fix
.accel
= FB_ACCEL_NONE
;
342 static int __devinit
platinum_init_fb(struct fb_info
*info
)
344 struct fb_info_platinum
*pinfo
= info
->par
;
345 struct fb_var_screeninfo var
;
348 sense
= read_platinum_sense(pinfo
);
349 printk(KERN_INFO
"platinumfb: Monitor sense value = 0x%x, ", sense
);
350 if (default_vmode
== VMODE_NVRAM
) {
352 default_vmode
= nvram_read_byte(NV_VMODE
);
353 if (default_vmode
<= 0 || default_vmode
> VMODE_MAX
||
354 !platinum_reg_init
[default_vmode
-1])
356 default_vmode
= VMODE_CHOOSE
;
358 if (default_vmode
== VMODE_CHOOSE
) {
359 default_vmode
= mac_map_monitor_sense(sense
);
361 if (default_vmode
<= 0 || default_vmode
> VMODE_MAX
)
362 default_vmode
= VMODE_640_480_60
;
364 if (default_cmode
== CMODE_NVRAM
)
365 default_cmode
= nvram_read_byte(NV_CMODE
);
367 if (default_cmode
< CMODE_8
|| default_cmode
> CMODE_32
)
368 default_cmode
= CMODE_8
;
370 * Reduce the pixel size if we don't have enough VRAM.
372 while(default_cmode
> CMODE_8
&&
373 platinum_vram_reqd(default_vmode
, default_cmode
) > pinfo
->total_vram
)
376 printk("platinumfb: Using video mode %d and color mode %d.\n", default_vmode
, default_cmode
);
378 /* Setup default var */
379 if (mac_vmode_to_var(default_vmode
, default_cmode
, &var
) < 0) {
380 /* This shouldn't happen! */
381 printk("mac_vmode_to_var(%d, %d,) failed\n", default_vmode
, default_cmode
);
383 default_vmode
= VMODE_640_480_60
;
384 default_cmode
= CMODE_8
;
385 if (mac_vmode_to_var(default_vmode
, default_cmode
, &var
) < 0) {
386 printk(KERN_ERR
"platinumfb: mac_vmode_to_var() failed\n");
391 /* Initialize info structure */
392 platinum_init_info(info
, pinfo
);
394 /* Apply default var */
396 var
.activate
= FB_ACTIVATE_NOW
;
397 rc
= fb_set_var(info
, &var
);
398 if (rc
&& (default_vmode
!= VMODE_640_480_60
|| default_cmode
!= CMODE_8
))
401 /* Register with fbdev layer */
402 rc
= register_framebuffer(info
);
406 printk(KERN_INFO
"fb%d: Apple Platinum frame buffer device\n", info
->node
);
412 * Get the monitor sense value.
413 * Note that this can be called before calibrate_delay,
414 * so we can't use udelay.
416 static int read_platinum_sense(struct fb_info_platinum
*info
)
418 volatile struct platinum_regs __iomem
*platinum_regs
= info
->platinum_regs
;
421 out_be32(&platinum_regs
->reg
[23].r
, 7); /* turn off drivers */
423 sense
= (~in_be32(&platinum_regs
->reg
[23].r
) & 7) << 8;
425 /* drive each sense line low in turn and collect the other 2 */
426 out_be32(&platinum_regs
->reg
[23].r
, 3); /* drive A low */
428 sense
|= (~in_be32(&platinum_regs
->reg
[23].r
) & 3) << 4;
429 out_be32(&platinum_regs
->reg
[23].r
, 5); /* drive B low */
431 sense
|= (~in_be32(&platinum_regs
->reg
[23].r
) & 4) << 1;
432 sense
|= (~in_be32(&platinum_regs
->reg
[23].r
) & 1) << 2;
433 out_be32(&platinum_regs
->reg
[23].r
, 6); /* drive C low */
435 sense
|= (~in_be32(&platinum_regs
->reg
[23].r
) & 6) >> 1;
437 out_be32(&platinum_regs
->reg
[23].r
, 7); /* turn off drivers */
443 * This routine takes a user-supplied var, and picks the best vmode/cmode from it.
444 * It also updates the var structure to the actual mode data obtained
446 static int platinum_var_to_par(struct fb_var_screeninfo
*var
,
447 struct fb_info_platinum
*pinfo
,
452 if (mac_var_to_vmode(var
, &vmode
, &cmode
) != 0) {
453 printk(KERN_ERR
"platinum_var_to_par: mac_var_to_vmode unsuccessful.\n");
454 printk(KERN_ERR
"platinum_var_to_par: var->xres = %d\n", var
->xres
);
455 printk(KERN_ERR
"platinum_var_to_par: var->yres = %d\n", var
->yres
);
456 printk(KERN_ERR
"platinum_var_to_par: var->xres_virtual = %d\n", var
->xres_virtual
);
457 printk(KERN_ERR
"platinum_var_to_par: var->yres_virtual = %d\n", var
->yres_virtual
);
458 printk(KERN_ERR
"platinum_var_to_par: var->bits_per_pixel = %d\n", var
->bits_per_pixel
);
459 printk(KERN_ERR
"platinum_var_to_par: var->pixclock = %d\n", var
->pixclock
);
460 printk(KERN_ERR
"platinum_var_to_par: var->vmode = %d\n", var
->vmode
);
464 if (!platinum_reg_init
[vmode
-1]) {
465 printk(KERN_ERR
"platinum_var_to_par, vmode %d not valid.\n", vmode
);
469 if (platinum_vram_reqd(vmode
, cmode
) > pinfo
->total_vram
) {
470 printk(KERN_ERR
"platinum_var_to_par, not enough ram for vmode %d, cmode %d.\n", vmode
, cmode
);
474 if (mac_vmode_to_var(vmode
, cmode
, var
))
480 pinfo
->vmode
= vmode
;
481 pinfo
->cmode
= cmode
;
482 pinfo
->xres
= vmode_attrs
[vmode
-1].hres
;
483 pinfo
->yres
= vmode_attrs
[vmode
-1].vres
;
486 pinfo
->vxres
= pinfo
->xres
;
487 pinfo
->vyres
= pinfo
->yres
;
494 * Parse user speficied options (`video=platinumfb:')
496 static int __init
platinumfb_setup(char *options
)
500 if (!options
|| !*options
)
503 while ((this_opt
= strsep(&options
, ",")) != NULL
) {
504 if (!strncmp(this_opt
, "vmode:", 6)) {
505 int vmode
= simple_strtoul(this_opt
+6, NULL
, 0);
506 if (vmode
> 0 && vmode
<= VMODE_MAX
)
507 default_vmode
= vmode
;
508 } else if (!strncmp(this_opt
, "cmode:", 6)) {
509 int depth
= simple_strtoul(this_opt
+6, NULL
, 0);
513 default_cmode
= CMODE_8
;
517 default_cmode
= CMODE_16
;
521 default_cmode
= CMODE_32
;
530 #define invalidate_cache(addr) \
531 asm volatile("eieio; dcbf 0,%1" \
532 : "=m" (*(addr)) : "r" (addr) : "memory");
534 #define invalidate_cache(addr)
537 static int __devinit
platinumfb_probe(struct of_device
* odev
,
538 const struct of_device_id
*match
)
540 struct device_node
*dp
= odev
->node
;
541 struct fb_info
*info
;
542 struct fb_info_platinum
*pinfo
;
543 volatile __u8
*fbuffer
;
544 int bank0
, bank1
, bank2
, bank3
, rc
;
546 dev_info(&odev
->dev
, "Found Apple Platinum video hardware\n");
548 info
= framebuffer_alloc(sizeof(*pinfo
), &odev
->dev
);
550 dev_err(&odev
->dev
, "Failed to allocate fbdev !\n");
555 if (of_address_to_resource(dp
, 0, &pinfo
->rsrc_reg
) ||
556 of_address_to_resource(dp
, 1, &pinfo
->rsrc_fb
)) {
557 dev_err(&odev
->dev
, "Can't get resources\n");
558 framebuffer_release(info
);
561 dev_dbg(&odev
->dev
, " registers : 0x%llx...0x%llx\n",
562 (unsigned long long)pinfo
->rsrc_reg
.start
,
563 (unsigned long long)pinfo
->rsrc_reg
.end
);
564 dev_dbg(&odev
->dev
, " framebuffer: 0x%llx...0x%llx\n",
565 (unsigned long long)pinfo
->rsrc_fb
.start
,
566 (unsigned long long)pinfo
->rsrc_fb
.end
);
568 /* Do not try to request register space, they overlap with the
569 * northbridge and that can fail. Only request framebuffer
571 if (!request_mem_region(pinfo
->rsrc_fb
.start
,
572 pinfo
->rsrc_fb
.end
- pinfo
->rsrc_fb
.start
+ 1,
573 "platinumfb framebuffer")) {
574 printk(KERN_ERR
"platinumfb: Can't request framebuffer !\n");
575 framebuffer_release(info
);
579 /* frame buffer - map only 4MB */
580 pinfo
->frame_buffer_phys
= pinfo
->rsrc_fb
.start
;
581 pinfo
->frame_buffer
= __ioremap(pinfo
->rsrc_fb
.start
, 0x400000,
583 pinfo
->base_frame_buffer
= pinfo
->frame_buffer
;
586 pinfo
->platinum_regs_phys
= pinfo
->rsrc_reg
.start
;
587 pinfo
->platinum_regs
= ioremap(pinfo
->rsrc_reg
.start
, 0x1000);
589 pinfo
->cmap_regs_phys
= 0xf301b000; /* XXX not in prom? */
590 request_mem_region(pinfo
->cmap_regs_phys
, 0x1000, "platinumfb cmap");
591 pinfo
->cmap_regs
= ioremap(pinfo
->cmap_regs_phys
, 0x1000);
593 /* Grok total video ram */
594 out_be32(&pinfo
->platinum_regs
->reg
[16].r
, (unsigned)pinfo
->frame_buffer_phys
);
595 out_be32(&pinfo
->platinum_regs
->reg
[20].r
, 0x1011); /* select max vram */
596 out_be32(&pinfo
->platinum_regs
->reg
[24].r
, 0); /* switch in vram */
598 fbuffer
= pinfo
->base_frame_buffer
;
599 fbuffer
[0x100000] = 0x34;
600 fbuffer
[0x100008] = 0x0;
601 invalidate_cache(&fbuffer
[0x100000]);
602 fbuffer
[0x200000] = 0x56;
603 fbuffer
[0x200008] = 0x0;
604 invalidate_cache(&fbuffer
[0x200000]);
605 fbuffer
[0x300000] = 0x78;
606 fbuffer
[0x300008] = 0x0;
607 invalidate_cache(&fbuffer
[0x300000]);
608 bank0
= 1; /* builtin 1MB vram, always there */
609 bank1
= fbuffer
[0x100000] == 0x34;
610 bank2
= fbuffer
[0x200000] == 0x56;
611 bank3
= fbuffer
[0x300000] == 0x78;
612 pinfo
->total_vram
= (bank0
+ bank1
+ bank2
+ bank3
) * 0x100000;
613 printk(KERN_INFO
"platinumfb: Total VRAM = %dMB (%d%d%d%d)\n",
614 (unsigned int) (pinfo
->total_vram
/ 1024 / 1024),
615 bank3
, bank2
, bank1
, bank0
);
618 * Try to determine whether we have an old or a new DACula.
620 out_8(&pinfo
->cmap_regs
->addr
, 0x40);
621 pinfo
->dactype
= in_8(&pinfo
->cmap_regs
->d2
);
622 switch (pinfo
->dactype
) {
625 printk(KERN_INFO
"platinumfb: DACula type 0x3c\n");
629 printk(KERN_INFO
"platinumfb: DACula type 0x84\n");
633 printk(KERN_INFO
"platinumfb: Unknown DACula type: %x\n", pinfo
->dactype
);
636 dev_set_drvdata(&odev
->dev
, info
);
638 rc
= platinum_init_fb(info
);
640 iounmap(pinfo
->frame_buffer
);
641 iounmap(pinfo
->platinum_regs
);
642 iounmap(pinfo
->cmap_regs
);
643 dev_set_drvdata(&odev
->dev
, NULL
);
644 framebuffer_release(info
);
650 static int __devexit
platinumfb_remove(struct of_device
* odev
)
652 struct fb_info
*info
= dev_get_drvdata(&odev
->dev
);
653 struct fb_info_platinum
*pinfo
= info
->par
;
655 unregister_framebuffer (info
);
657 /* Unmap frame buffer and registers */
658 iounmap(pinfo
->frame_buffer
);
659 iounmap(pinfo
->platinum_regs
);
660 iounmap(pinfo
->cmap_regs
);
662 release_mem_region(pinfo
->rsrc_fb
.start
,
664 pinfo
->rsrc_fb
.start
+ 1);
666 release_mem_region(pinfo
->cmap_regs_phys
, 0x1000);
668 framebuffer_release(info
);
673 static struct of_device_id platinumfb_match
[] =
681 static struct of_platform_driver platinum_driver
=
683 .name
= "platinumfb",
684 .match_table
= platinumfb_match
,
685 .probe
= platinumfb_probe
,
686 .remove
= platinumfb_remove
,
689 static int __init
platinumfb_init(void)
694 if (fb_get_options("platinumfb", &option
))
696 platinumfb_setup(option
);
698 of_register_platform_driver(&platinum_driver
);
703 static void __exit
platinumfb_exit(void)
705 of_unregister_platform_driver(&platinum_driver
);
708 MODULE_LICENSE("GPL");
709 MODULE_DESCRIPTION("framebuffer driver for Apple Platinum video");
710 module_init(platinumfb_init
);
713 module_exit(platinumfb_exit
);