valkyriefb.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. /*
  2. * valkyriefb.c -- frame buffer device for the PowerMac 'valkyrie' display
  3. *
  4. * Created 8 August 1998 by
  5. * Martin Costabel <costabel@wanadoo.fr> and Kevin Schoedel
  6. *
  7. * Vmode-switching changes and vmode 15/17 modifications created 29 August
  8. * 1998 by Barry K. Nathan <barryn@pobox.com>.
  9. *
  10. * Ported to m68k Macintosh by David Huggins-Daines <dhd@debian.org>
  11. *
  12. * Derived directly from:
  13. *
  14. * controlfb.c -- frame buffer device for the PowerMac 'control' display
  15. * Copyright (C) 1998 Dan Jacobowitz <dan@debian.org>
  16. *
  17. * pmc-valkyrie.c -- Console support for PowerMac "valkyrie" display adaptor.
  18. * Copyright (C) 1997 Paul Mackerras.
  19. *
  20. * and indirectly:
  21. *
  22. * Frame buffer structure from:
  23. * drivers/video/chipsfb.c -- frame buffer device for
  24. * Chips & Technologies 65550 chip.
  25. *
  26. * Copyright (C) 1998 Paul Mackerras
  27. *
  28. * This file is derived from the Powermac "chips" driver:
  29. * Copyright (C) 1997 Fabio Riccardi.
  30. * And from the frame buffer device for Open Firmware-initialized devices:
  31. * Copyright (C) 1997 Geert Uytterhoeven.
  32. *
  33. * Hardware information from:
  34. * control.c: Console support for PowerMac "control" display adaptor.
  35. * Copyright (C) 1996 Paul Mackerras
  36. *
  37. * This file is subject to the terms and conditions of the GNU General Public
  38. * License. See the file COPYING in the main directory of this archive for
  39. * more details.
  40. */
  41. #include <linux/module.h>
  42. #include <linux/kernel.h>
  43. #include <linux/errno.h>
  44. #include <linux/string.h>
  45. #include <linux/mm.h>
  46. #include <linux/tty.h>
  47. #include <linux/slab.h>
  48. #include <linux/vmalloc.h>
  49. #include <linux/delay.h>
  50. #include <linux/interrupt.h>
  51. #include <linux/fb.h>
  52. #include <linux/selection.h>
  53. #include <linux/init.h>
  54. #include <linux/pci.h>
  55. #include <linux/nvram.h>
  56. #include <linux/adb.h>
  57. #include <linux/cuda.h>
  58. #include <asm/io.h>
  59. #ifdef CONFIG_MAC
  60. #include <asm/bootinfo.h>
  61. #include <asm/macintosh.h>
  62. #else
  63. #include <asm/prom.h>
  64. #endif
  65. #include <asm/pgtable.h>
  66. #include "macmodes.h"
  67. #include "valkyriefb.h"
  68. #ifdef CONFIG_MAC
  69. /* We don't yet have functions to read the PRAM... perhaps we can
  70. adapt them from the PPC code? */
  71. static int default_vmode = VMODE_640_480_67;
  72. static int default_cmode = CMODE_8;
  73. #else
  74. static int default_vmode = VMODE_NVRAM;
  75. static int default_cmode = CMODE_NVRAM;
  76. #endif
  77. struct fb_par_valkyrie {
  78. int vmode, cmode;
  79. int xres, yres;
  80. int vxres, vyres;
  81. struct valkyrie_regvals *init;
  82. };
  83. struct fb_info_valkyrie {
  84. struct fb_info info;
  85. struct fb_par_valkyrie par;
  86. struct cmap_regs __iomem *cmap_regs;
  87. unsigned long cmap_regs_phys;
  88. struct valkyrie_regs __iomem *valkyrie_regs;
  89. unsigned long valkyrie_regs_phys;
  90. __u8 __iomem *frame_buffer;
  91. unsigned long frame_buffer_phys;
  92. int sense;
  93. unsigned long total_vram;
  94. u32 pseudo_palette[16];
  95. };
  96. /*
  97. * Exported functions
  98. */
  99. int valkyriefb_init(void);
  100. int valkyriefb_setup(char*);
  101. static int valkyriefb_check_var(struct fb_var_screeninfo *var,
  102. struct fb_info *info);
  103. static int valkyriefb_set_par(struct fb_info *info);
  104. static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
  105. u_int transp, struct fb_info *info);
  106. static int valkyriefb_blank(int blank_mode, struct fb_info *info);
  107. static int read_valkyrie_sense(struct fb_info_valkyrie *p);
  108. static void set_valkyrie_clock(unsigned char *params);
  109. static int valkyrie_var_to_par(struct fb_var_screeninfo *var,
  110. struct fb_par_valkyrie *par, const struct fb_info *fb_info);
  111. static void valkyrie_init_info(struct fb_info *info, struct fb_info_valkyrie *p);
  112. static void valkyrie_par_to_fix(struct fb_par_valkyrie *par, struct fb_fix_screeninfo *fix);
  113. static void valkyrie_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_valkyrie *p);
  114. static struct fb_ops valkyriefb_ops = {
  115. .owner = THIS_MODULE,
  116. .fb_check_var = valkyriefb_check_var,
  117. .fb_set_par = valkyriefb_set_par,
  118. .fb_setcolreg = valkyriefb_setcolreg,
  119. .fb_blank = valkyriefb_blank,
  120. .fb_fillrect = cfb_fillrect,
  121. .fb_copyarea = cfb_copyarea,
  122. .fb_imageblit = cfb_imageblit,
  123. };
  124. /* Sets the video mode according to info->var */
  125. static int valkyriefb_set_par(struct fb_info *info)
  126. {
  127. struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info;
  128. volatile struct valkyrie_regs __iomem *valkyrie_regs = p->valkyrie_regs;
  129. struct fb_par_valkyrie *par = info->par;
  130. struct valkyrie_regvals *init;
  131. int err;
  132. if ((err = valkyrie_var_to_par(&info->var, par, info)))
  133. return err;
  134. valkyrie_par_to_fix(par, &info->fix);
  135. /* Reset the valkyrie */
  136. out_8(&valkyrie_regs->status.r, 0);
  137. udelay(100);
  138. /* Initialize display timing registers */
  139. init = par->init;
  140. out_8(&valkyrie_regs->mode.r, init->mode | 0x80);
  141. out_8(&valkyrie_regs->depth.r, par->cmode + 3);
  142. set_valkyrie_clock(init->clock_params);
  143. udelay(100);
  144. /* Turn on display */
  145. out_8(&valkyrie_regs->mode.r, init->mode);
  146. return 0;
  147. }
  148. static inline int valkyrie_par_to_var(struct fb_par_valkyrie *par,
  149. struct fb_var_screeninfo *var)
  150. {
  151. return mac_vmode_to_var(par->vmode, par->cmode, var);
  152. }
  153. static int
  154. valkyriefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
  155. {
  156. int err;
  157. struct fb_par_valkyrie par;
  158. if ((err = valkyrie_var_to_par(var, &par, info)))
  159. return err;
  160. valkyrie_par_to_var(&par, var);
  161. return 0;
  162. }
  163. /*
  164. * Blank the screen if blank_mode != 0, else unblank. If blank_mode == NULL
  165. * then the caller blanks by setting the CLUT (Color Look Up Table) to all
  166. * black. Return 0 if blanking succeeded, != 0 if un-/blanking failed due
  167. * to e.g. a video mode which doesn't support it. Implements VESA suspend
  168. * and powerdown modes on hardware that supports disabling hsync/vsync:
  169. * blank_mode == 2: suspend vsync
  170. * blank_mode == 3: suspend hsync
  171. * blank_mode == 4: powerdown
  172. */
  173. static int valkyriefb_blank(int blank_mode, struct fb_info *info)
  174. {
  175. struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info;
  176. struct fb_par_valkyrie *par = info->par;
  177. struct valkyrie_regvals *init = par->init;
  178. if (init == NULL)
  179. return 1;
  180. switch (blank_mode) {
  181. case FB_BLANK_UNBLANK: /* unblank */
  182. out_8(&p->valkyrie_regs->mode.r, init->mode);
  183. break;
  184. case FB_BLANK_NORMAL:
  185. return 1; /* get caller to set CLUT to all black */
  186. case FB_BLANK_VSYNC_SUSPEND:
  187. case FB_BLANK_HSYNC_SUSPEND:
  188. /*
  189. * [kps] Value extracted from MacOS. I don't know
  190. * whether this bit disables hsync or vsync, or
  191. * whether the hardware can do the other as well.
  192. */
  193. out_8(&p->valkyrie_regs->mode.r, init->mode | 0x40);
  194. break;
  195. case FB_BLANK_POWERDOWN:
  196. out_8(&p->valkyrie_regs->mode.r, 0x66);
  197. break;
  198. }
  199. return 0;
  200. }
  201. static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
  202. u_int transp, struct fb_info *info)
  203. {
  204. struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) info;
  205. volatile struct cmap_regs __iomem *cmap_regs = p->cmap_regs;
  206. struct fb_par_valkyrie *par = info->par;
  207. if (regno > 255)
  208. return 1;
  209. red >>= 8;
  210. green >>= 8;
  211. blue >>= 8;
  212. /* tell clut which address to fill */
  213. out_8(&p->cmap_regs->addr, regno);
  214. udelay(1);
  215. /* send one color channel at a time */
  216. out_8(&cmap_regs->lut, red);
  217. out_8(&cmap_regs->lut, green);
  218. out_8(&cmap_regs->lut, blue);
  219. if (regno < 16 && par->cmode == CMODE_16)
  220. ((u32 *)info->pseudo_palette)[regno] =
  221. (regno << 10) | (regno << 5) | regno;
  222. return 0;
  223. }
  224. static inline int valkyrie_vram_reqd(int video_mode, int color_mode)
  225. {
  226. int pitch;
  227. struct valkyrie_regvals *init = valkyrie_reg_init[video_mode-1];
  228. if ((pitch = init->pitch[color_mode]) == 0)
  229. pitch = 2 * init->pitch[0];
  230. return init->vres * pitch;
  231. }
  232. static void set_valkyrie_clock(unsigned char *params)
  233. {
  234. struct adb_request req;
  235. int i;
  236. #ifdef CONFIG_ADB_CUDA
  237. for (i = 0; i < 3; ++i) {
  238. cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC,
  239. 0x50, i + 1, params[i]);
  240. while (!req.complete)
  241. cuda_poll();
  242. }
  243. #endif
  244. }
  245. static void __init valkyrie_choose_mode(struct fb_info_valkyrie *p)
  246. {
  247. p->sense = read_valkyrie_sense(p);
  248. printk(KERN_INFO "Monitor sense value = 0x%x\n", p->sense);
  249. /* Try to pick a video mode out of NVRAM if we have one. */
  250. #ifndef CONFIG_MAC
  251. if (default_vmode == VMODE_NVRAM) {
  252. default_vmode = nvram_read_byte(NV_VMODE);
  253. if (default_vmode <= 0
  254. || default_vmode > VMODE_MAX
  255. || !valkyrie_reg_init[default_vmode - 1])
  256. default_vmode = VMODE_CHOOSE;
  257. }
  258. #endif
  259. if (default_vmode == VMODE_CHOOSE)
  260. default_vmode = mac_map_monitor_sense(p->sense);
  261. if (!valkyrie_reg_init[default_vmode - 1])
  262. default_vmode = VMODE_640_480_67;
  263. #ifndef CONFIG_MAC
  264. if (default_cmode == CMODE_NVRAM)
  265. default_cmode = nvram_read_byte(NV_CMODE);
  266. #endif
  267. /*
  268. * Reduce the pixel size if we don't have enough VRAM or bandwidth.
  269. */
  270. if (default_cmode < CMODE_8 || default_cmode > CMODE_16
  271. || valkyrie_reg_init[default_vmode-1]->pitch[default_cmode] == 0
  272. || valkyrie_vram_reqd(default_vmode, default_cmode) > p->total_vram)
  273. default_cmode = CMODE_8;
  274. printk(KERN_INFO "using video mode %d and color mode %d.\n",
  275. default_vmode, default_cmode);
  276. }
  277. int __init valkyriefb_init(void)
  278. {
  279. struct fb_info_valkyrie *p;
  280. unsigned long frame_buffer_phys, cmap_regs_phys, flags;
  281. int err;
  282. char *option = NULL;
  283. if (fb_get_options("valkyriefb", &option))
  284. return -ENODEV;
  285. valkyriefb_setup(option);
  286. #ifdef CONFIG_MAC
  287. if (!MACH_IS_MAC)
  288. return 0;
  289. if (!(mac_bi_data.id == MAC_MODEL_Q630
  290. /* I'm not sure about this one */
  291. || mac_bi_data.id == MAC_MODEL_P588))
  292. return 0;
  293. /* Hardcoded addresses... welcome to 68k Macintosh country :-) */
  294. frame_buffer_phys = 0xf9000000;
  295. cmap_regs_phys = 0x50f24000;
  296. flags = IOMAP_NOCACHE_SER; /* IOMAP_WRITETHROUGH?? */
  297. #else /* ppc (!CONFIG_MAC) */
  298. {
  299. struct device_node *dp;
  300. struct resource r;
  301. dp = of_find_node_by_name(NULL, "valkyrie");
  302. if (dp == 0)
  303. return 0;
  304. if (of_address_to_resource(dp, 0, &r)) {
  305. printk(KERN_ERR "can't find address for valkyrie\n");
  306. return 0;
  307. }
  308. frame_buffer_phys = r.start;
  309. cmap_regs_phys = r.start + 0x304000;
  310. flags = _PAGE_WRITETHRU;
  311. }
  312. #endif /* ppc (!CONFIG_MAC) */
  313. p = kmalloc(sizeof(*p), GFP_ATOMIC);
  314. if (p == 0)
  315. return -ENOMEM;
  316. memset(p, 0, sizeof(*p));
  317. /* Map in frame buffer and registers */
  318. if (!request_mem_region(frame_buffer_phys, 0x100000, "valkyriefb")) {
  319. kfree(p);
  320. return 0;
  321. }
  322. p->total_vram = 0x100000;
  323. p->frame_buffer_phys = frame_buffer_phys;
  324. p->frame_buffer = __ioremap(frame_buffer_phys, p->total_vram, flags);
  325. p->cmap_regs_phys = cmap_regs_phys;
  326. p->cmap_regs = ioremap(p->cmap_regs_phys, 0x1000);
  327. p->valkyrie_regs_phys = cmap_regs_phys+0x6000;
  328. p->valkyrie_regs = ioremap(p->valkyrie_regs_phys, 0x1000);
  329. err = -ENOMEM;
  330. if (p->frame_buffer == NULL || p->cmap_regs == NULL
  331. || p->valkyrie_regs == NULL) {
  332. printk(KERN_ERR "valkyriefb: couldn't map resources\n");
  333. goto out_free;
  334. }
  335. valkyrie_choose_mode(p);
  336. mac_vmode_to_var(default_vmode, default_cmode, &p->info.var);
  337. valkyrie_init_info(&p->info, p);
  338. valkyrie_init_fix(&p->info.fix, p);
  339. if (valkyriefb_set_par(&p->info))
  340. /* "can't happen" */
  341. printk(KERN_ERR "valkyriefb: can't set default video mode\n");
  342. if ((err = register_framebuffer(&p->info)) != 0)
  343. goto out_free;
  344. printk(KERN_INFO "fb%d: valkyrie frame buffer device\n", p->info.node);
  345. return 0;
  346. out_free:
  347. if (p->frame_buffer)
  348. iounmap(p->frame_buffer);
  349. if (p->cmap_regs)
  350. iounmap(p->cmap_regs);
  351. if (p->valkyrie_regs)
  352. iounmap(p->valkyrie_regs);
  353. kfree(p);
  354. return err;
  355. }
  356. /*
  357. * Get the monitor sense value.
  358. */
  359. static int read_valkyrie_sense(struct fb_info_valkyrie *p)
  360. {
  361. int sense, in;
  362. out_8(&p->valkyrie_regs->msense.r, 0); /* release all lines */
  363. __delay(20000);
  364. sense = ((in = in_8(&p->valkyrie_regs->msense.r)) & 0x70) << 4;
  365. /* drive each sense line low in turn and collect the other 2 */
  366. out_8(&p->valkyrie_regs->msense.r, 4); /* drive A low */
  367. __delay(20000);
  368. sense |= ((in = in_8(&p->valkyrie_regs->msense.r)) & 0x30);
  369. out_8(&p->valkyrie_regs->msense.r, 2); /* drive B low */
  370. __delay(20000);
  371. sense |= ((in = in_8(&p->valkyrie_regs->msense.r)) & 0x40) >> 3;
  372. sense |= (in & 0x10) >> 2;
  373. out_8(&p->valkyrie_regs->msense.r, 1); /* drive C low */
  374. __delay(20000);
  375. sense |= ((in = in_8(&p->valkyrie_regs->msense.r)) & 0x60) >> 5;
  376. out_8(&p->valkyrie_regs->msense.r, 7);
  377. return sense;
  378. }
  379. /*
  380. * This routine takes a user-supplied var,
  381. * and picks the best vmode/cmode from it.
  382. */
  383. /* [bkn] I did a major overhaul of this function.
  384. *
  385. * Much of the old code was "swiped by jonh from atyfb.c". Because
  386. * macmodes has mac_var_to_vmode, I felt that it would be better to
  387. * rework this function to use that, instead of reinventing the wheel to
  388. * add support for vmode 17. This was reinforced by the fact that
  389. * the previously swiped atyfb.c code is no longer there.
  390. *
  391. * So, I swiped and adapted platinum_var_to_par (from platinumfb.c), replacing
  392. * most, but not all, of the old code in the process. One side benefit of
  393. * swiping the platinumfb code is that we now have more comprehensible error
  394. * messages when a vmode/cmode switch fails. (Most of the error messages are
  395. * platinumfb.c, but I added two of my own, and I also changed some commas
  396. * into colons to make the messages more consistent with other Linux error
  397. * messages.) In addition, I think the new code *might* fix some vmode-
  398. * switching oddities, but I'm not sure.
  399. *
  400. * There may be some more opportunities for cleanup in here, but this is a
  401. * good start...
  402. */
  403. static int valkyrie_var_to_par(struct fb_var_screeninfo *var,
  404. struct fb_par_valkyrie *par, const struct fb_info *fb_info)
  405. {
  406. int vmode, cmode;
  407. struct valkyrie_regvals *init;
  408. struct fb_info_valkyrie *p = (struct fb_info_valkyrie *) fb_info;
  409. if (mac_var_to_vmode(var, &vmode, &cmode) != 0) {
  410. printk(KERN_ERR "valkyriefb: can't do %dx%dx%d.\n",
  411. var->xres, var->yres, var->bits_per_pixel);
  412. return -EINVAL;
  413. }
  414. /* Check if we know about the wanted video mode */
  415. if (vmode < 1 || vmode > VMODE_MAX || !valkyrie_reg_init[vmode-1]) {
  416. printk(KERN_ERR "valkyriefb: vmode %d not valid.\n", vmode);
  417. return -EINVAL;
  418. }
  419. if (cmode != CMODE_8 && cmode != CMODE_16) {
  420. printk(KERN_ERR "valkyriefb: cmode %d not valid.\n", cmode);
  421. return -EINVAL;
  422. }
  423. if (var->xres_virtual > var->xres || var->yres_virtual > var->yres
  424. || var->xoffset != 0 || var->yoffset != 0) {
  425. return -EINVAL;
  426. }
  427. init = valkyrie_reg_init[vmode-1];
  428. if (init->pitch[cmode] == 0) {
  429. printk(KERN_ERR "valkyriefb: vmode %d does not support "
  430. "cmode %d.\n", vmode, cmode);
  431. return -EINVAL;
  432. }
  433. if (valkyrie_vram_reqd(vmode, cmode) > p->total_vram) {
  434. printk(KERN_ERR "valkyriefb: not enough ram for vmode %d, "
  435. "cmode %d.\n", vmode, cmode);
  436. return -EINVAL;
  437. }
  438. par->vmode = vmode;
  439. par->cmode = cmode;
  440. par->init = init;
  441. par->xres = var->xres;
  442. par->yres = var->yres;
  443. par->vxres = par->xres;
  444. par->vyres = par->yres;
  445. return 0;
  446. }
  447. static void valkyrie_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_valkyrie *p)
  448. {
  449. memset(fix, 0, sizeof(*fix));
  450. strcpy(fix->id, "valkyrie");
  451. fix->mmio_start = p->valkyrie_regs_phys;
  452. fix->mmio_len = sizeof(struct valkyrie_regs);
  453. fix->type = FB_TYPE_PACKED_PIXELS;
  454. fix->smem_start = p->frame_buffer_phys + 0x1000;
  455. fix->smem_len = p->total_vram;
  456. fix->type_aux = 0;
  457. fix->ywrapstep = 0;
  458. fix->ypanstep = 0;
  459. fix->xpanstep = 0;
  460. }
  461. /* Fix must already be inited above */
  462. static void valkyrie_par_to_fix(struct fb_par_valkyrie *par,
  463. struct fb_fix_screeninfo *fix)
  464. {
  465. fix->smem_len = valkyrie_vram_reqd(par->vmode, par->cmode);
  466. fix->visual = (par->cmode == CMODE_8) ?
  467. FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
  468. fix->line_length = par->vxres << par->cmode;
  469. /* ywrapstep, xpanstep, ypanstep */
  470. }
  471. static void __init valkyrie_init_info(struct fb_info *info, struct fb_info_valkyrie *p)
  472. {
  473. info->fbops = &valkyriefb_ops;
  474. info->screen_base = p->frame_buffer + 0x1000;
  475. info->flags = FBINFO_DEFAULT;
  476. info->pseudo_palette = p->pseudo_palette;
  477. fb_alloc_cmap(&info->cmap, 256, 0);
  478. info->par = &p->par;
  479. }
  480. /*
  481. * Parse user speficied options (`video=valkyriefb:')
  482. */
  483. int __init valkyriefb_setup(char *options)
  484. {
  485. char *this_opt;
  486. if (!options || !*options)
  487. return 0;
  488. while ((this_opt = strsep(&options, ",")) != NULL) {
  489. if (!strncmp(this_opt, "vmode:", 6)) {
  490. int vmode = simple_strtoul(this_opt+6, NULL, 0);
  491. if (vmode > 0 && vmode <= VMODE_MAX)
  492. default_vmode = vmode;
  493. }
  494. else if (!strncmp(this_opt, "cmode:", 6)) {
  495. int depth = simple_strtoul(this_opt+6, NULL, 0);
  496. switch (depth) {
  497. case 8:
  498. default_cmode = CMODE_8;
  499. break;
  500. case 15:
  501. case 16:
  502. default_cmode = CMODE_16;
  503. break;
  504. }
  505. }
  506. }
  507. return 0;
  508. }
  509. module_init(valkyriefb_init);
  510. MODULE_LICENSE("GPL");