hgafb.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  1. /*
  2. * linux/drivers/video/hgafb.c -- Hercules graphics adaptor frame buffer device
  3. *
  4. * Created 25 Nov 1999 by Ferenc Bakonyi (fero@drama.obuda.kando.hu)
  5. * Based on skeletonfb.c by Geert Uytterhoeven and
  6. * mdacon.c by Andrew Apted
  7. *
  8. * History:
  9. *
  10. * - Revision 0.1.8 (23 Oct 2002): Ported to new framebuffer api.
  11. *
  12. * - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
  13. * being detected as Hercules. (Paul G.)
  14. * - Revision 0.1.6 (17 Aug 2000): new style structs
  15. * documentation
  16. * - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc
  17. * minor fixes
  18. * - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
  19. * HGA-only systems
  20. * - Revision 0.1.3 (22 Jan 2000): modified for the new fb_info structure
  21. * screen is cleared after rmmod
  22. * virtual resolutions
  23. * module parameter 'nologo={0|1}'
  24. * the most important: boot logo :)
  25. * - Revision 0.1.0 (6 Dec 1999): faster scrolling and minor fixes
  26. * - First release (25 Nov 1999)
  27. *
  28. * This file is subject to the terms and conditions of the GNU General Public
  29. * License. See the file COPYING in the main directory of this archive
  30. * for more details.
  31. */
  32. #include <linux/module.h>
  33. #include <linux/kernel.h>
  34. #include <linux/errno.h>
  35. #include <linux/spinlock.h>
  36. #include <linux/string.h>
  37. #include <linux/mm.h>
  38. #include <linux/delay.h>
  39. #include <linux/fb.h>
  40. #include <linux/init.h>
  41. #include <linux/ioport.h>
  42. #include <linux/platform_device.h>
  43. #include <asm/io.h>
  44. #include <asm/vga.h>
  45. #if 0
  46. #define DPRINTK(args...) printk(KERN_DEBUG __FILE__": " ##args)
  47. #else
  48. #define DPRINTK(args...)
  49. #endif
  50. #if 0
  51. #define CHKINFO(ret) if (info != &fb_info) { printk(KERN_DEBUG __FILE__": This should never happen, line:%d \n", __LINE__); return ret; }
  52. #else
  53. #define CHKINFO(ret)
  54. #endif
  55. /* Description of the hardware layout */
  56. static void __iomem *hga_vram; /* Base of video memory */
  57. static unsigned long hga_vram_len; /* Size of video memory */
  58. #define HGA_ROWADDR(row) ((row%4)*8192 + (row>>2)*90)
  59. #define HGA_TXT 0
  60. #define HGA_GFX 1
  61. static inline u8 __iomem * rowaddr(struct fb_info *info, u_int row)
  62. {
  63. return info->screen_base + HGA_ROWADDR(row);
  64. }
  65. static int hga_mode = -1; /* 0 = txt, 1 = gfx mode */
  66. static enum { TYPE_HERC, TYPE_HERCPLUS, TYPE_HERCCOLOR } hga_type;
  67. static char *hga_type_name;
  68. #define HGA_INDEX_PORT 0x3b4 /* Register select port */
  69. #define HGA_VALUE_PORT 0x3b5 /* Register value port */
  70. #define HGA_MODE_PORT 0x3b8 /* Mode control port */
  71. #define HGA_STATUS_PORT 0x3ba /* Status and Config port */
  72. #define HGA_GFX_PORT 0x3bf /* Graphics control port */
  73. /* HGA register values */
  74. #define HGA_CURSOR_BLINKING 0x00
  75. #define HGA_CURSOR_OFF 0x20
  76. #define HGA_CURSOR_SLOWBLINK 0x60
  77. #define HGA_MODE_GRAPHICS 0x02
  78. #define HGA_MODE_VIDEO_EN 0x08
  79. #define HGA_MODE_BLINK_EN 0x20
  80. #define HGA_MODE_GFX_PAGE1 0x80
  81. #define HGA_STATUS_HSYNC 0x01
  82. #define HGA_STATUS_VSYNC 0x80
  83. #define HGA_STATUS_VIDEO 0x08
  84. #define HGA_CONFIG_COL132 0x08
  85. #define HGA_GFX_MODE_EN 0x01
  86. #define HGA_GFX_PAGE_EN 0x02
  87. /* Global locks */
  88. static DEFINE_SPINLOCK(hga_reg_lock);
  89. /* Framebuffer driver structures */
  90. static const struct fb_var_screeninfo hga_default_var = {
  91. .xres = 720,
  92. .yres = 348,
  93. .xres_virtual = 720,
  94. .yres_virtual = 348,
  95. .bits_per_pixel = 1,
  96. .red = {0, 1, 0},
  97. .green = {0, 1, 0},
  98. .blue = {0, 1, 0},
  99. .transp = {0, 0, 0},
  100. .height = -1,
  101. .width = -1,
  102. };
  103. static struct fb_fix_screeninfo hga_fix = {
  104. .id = "HGA",
  105. .type = FB_TYPE_PACKED_PIXELS, /* (not sure) */
  106. .visual = FB_VISUAL_MONO10,
  107. .xpanstep = 8,
  108. .ypanstep = 8,
  109. .line_length = 90,
  110. .accel = FB_ACCEL_NONE
  111. };
  112. /* Don't assume that tty1 will be the initial current console. */
  113. static int release_io_port = 0;
  114. static int release_io_ports = 0;
  115. static bool nologo = 0;
  116. /* -------------------------------------------------------------------------
  117. *
  118. * Low level hardware functions
  119. *
  120. * ------------------------------------------------------------------------- */
  121. static void write_hga_b(unsigned int val, unsigned char reg)
  122. {
  123. outb_p(reg, HGA_INDEX_PORT);
  124. outb_p(val, HGA_VALUE_PORT);
  125. }
  126. static void write_hga_w(unsigned int val, unsigned char reg)
  127. {
  128. outb_p(reg, HGA_INDEX_PORT); outb_p(val >> 8, HGA_VALUE_PORT);
  129. outb_p(reg+1, HGA_INDEX_PORT); outb_p(val & 0xff, HGA_VALUE_PORT);
  130. }
  131. static int test_hga_b(unsigned char val, unsigned char reg)
  132. {
  133. outb_p(reg, HGA_INDEX_PORT);
  134. outb (val, HGA_VALUE_PORT);
  135. udelay(20); val = (inb_p(HGA_VALUE_PORT) == val);
  136. return val;
  137. }
  138. static void hga_clear_screen(void)
  139. {
  140. unsigned char fillchar = 0xbf; /* magic */
  141. unsigned long flags;
  142. spin_lock_irqsave(&hga_reg_lock, flags);
  143. if (hga_mode == HGA_TXT)
  144. fillchar = ' ';
  145. else if (hga_mode == HGA_GFX)
  146. fillchar = 0x00;
  147. spin_unlock_irqrestore(&hga_reg_lock, flags);
  148. if (fillchar != 0xbf)
  149. memset_io(hga_vram, fillchar, hga_vram_len);
  150. }
  151. static void hga_txt_mode(void)
  152. {
  153. unsigned long flags;
  154. spin_lock_irqsave(&hga_reg_lock, flags);
  155. outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_BLINK_EN, HGA_MODE_PORT);
  156. outb_p(0x00, HGA_GFX_PORT);
  157. outb_p(0x00, HGA_STATUS_PORT);
  158. write_hga_b(0x61, 0x00); /* horizontal total */
  159. write_hga_b(0x50, 0x01); /* horizontal displayed */
  160. write_hga_b(0x52, 0x02); /* horizontal sync pos */
  161. write_hga_b(0x0f, 0x03); /* horizontal sync width */
  162. write_hga_b(0x19, 0x04); /* vertical total */
  163. write_hga_b(0x06, 0x05); /* vertical total adjust */
  164. write_hga_b(0x19, 0x06); /* vertical displayed */
  165. write_hga_b(0x19, 0x07); /* vertical sync pos */
  166. write_hga_b(0x02, 0x08); /* interlace mode */
  167. write_hga_b(0x0d, 0x09); /* maximum scanline */
  168. write_hga_b(0x0c, 0x0a); /* cursor start */
  169. write_hga_b(0x0d, 0x0b); /* cursor end */
  170. write_hga_w(0x0000, 0x0c); /* start address */
  171. write_hga_w(0x0000, 0x0e); /* cursor location */
  172. hga_mode = HGA_TXT;
  173. spin_unlock_irqrestore(&hga_reg_lock, flags);
  174. }
  175. static void hga_gfx_mode(void)
  176. {
  177. unsigned long flags;
  178. spin_lock_irqsave(&hga_reg_lock, flags);
  179. outb_p(0x00, HGA_STATUS_PORT);
  180. outb_p(HGA_GFX_MODE_EN, HGA_GFX_PORT);
  181. outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_GRAPHICS, HGA_MODE_PORT);
  182. write_hga_b(0x35, 0x00); /* horizontal total */
  183. write_hga_b(0x2d, 0x01); /* horizontal displayed */
  184. write_hga_b(0x2e, 0x02); /* horizontal sync pos */
  185. write_hga_b(0x07, 0x03); /* horizontal sync width */
  186. write_hga_b(0x5b, 0x04); /* vertical total */
  187. write_hga_b(0x02, 0x05); /* vertical total adjust */
  188. write_hga_b(0x57, 0x06); /* vertical displayed */
  189. write_hga_b(0x57, 0x07); /* vertical sync pos */
  190. write_hga_b(0x02, 0x08); /* interlace mode */
  191. write_hga_b(0x03, 0x09); /* maximum scanline */
  192. write_hga_b(0x00, 0x0a); /* cursor start */
  193. write_hga_b(0x00, 0x0b); /* cursor end */
  194. write_hga_w(0x0000, 0x0c); /* start address */
  195. write_hga_w(0x0000, 0x0e); /* cursor location */
  196. hga_mode = HGA_GFX;
  197. spin_unlock_irqrestore(&hga_reg_lock, flags);
  198. }
  199. static void hga_show_logo(struct fb_info *info)
  200. {
  201. /*
  202. void __iomem *dest = hga_vram;
  203. char *logo = linux_logo_bw;
  204. int x, y;
  205. for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup *
  206. for (x = 0; x < 10 ; x++)
  207. writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40));
  208. */
  209. }
  210. static void hga_pan(unsigned int xoffset, unsigned int yoffset)
  211. {
  212. unsigned int base;
  213. unsigned long flags;
  214. base = (yoffset / 8) * 90 + xoffset;
  215. spin_lock_irqsave(&hga_reg_lock, flags);
  216. write_hga_w(base, 0x0c); /* start address */
  217. spin_unlock_irqrestore(&hga_reg_lock, flags);
  218. DPRINTK("hga_pan: base:%d\n", base);
  219. }
  220. static void hga_blank(int blank_mode)
  221. {
  222. unsigned long flags;
  223. spin_lock_irqsave(&hga_reg_lock, flags);
  224. if (blank_mode) {
  225. outb_p(0x00, HGA_MODE_PORT); /* disable video */
  226. } else {
  227. outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_GRAPHICS, HGA_MODE_PORT);
  228. }
  229. spin_unlock_irqrestore(&hga_reg_lock, flags);
  230. }
  231. static int hga_card_detect(void)
  232. {
  233. int count = 0;
  234. void __iomem *p, *q;
  235. unsigned short p_save, q_save;
  236. hga_vram_len = 0x08000;
  237. hga_vram = ioremap(0xb0000, hga_vram_len);
  238. if (!hga_vram)
  239. return -ENOMEM;
  240. if (request_region(0x3b0, 12, "hgafb"))
  241. release_io_ports = 1;
  242. if (request_region(0x3bf, 1, "hgafb"))
  243. release_io_port = 1;
  244. /* do a memory check */
  245. p = hga_vram;
  246. q = hga_vram + 0x01000;
  247. p_save = readw(p); q_save = readw(q);
  248. writew(0xaa55, p); if (readw(p) == 0xaa55) count++;
  249. writew(0x55aa, p); if (readw(p) == 0x55aa) count++;
  250. writew(p_save, p);
  251. if (count != 2)
  252. goto error;
  253. /* Ok, there is definitely a card registering at the correct
  254. * memory location, so now we do an I/O port test.
  255. */
  256. if (!test_hga_b(0x66, 0x0f)) /* cursor low register */
  257. goto error;
  258. if (!test_hga_b(0x99, 0x0f)) /* cursor low register */
  259. goto error;
  260. /* See if the card is a Hercules, by checking whether the vsync
  261. * bit of the status register is changing. This test lasts for
  262. * approximately 1/10th of a second.
  263. */
  264. p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
  265. for (count=0; count < 50000 && p_save == q_save; count++) {
  266. q_save = inb(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
  267. udelay(2);
  268. }
  269. if (p_save == q_save)
  270. goto error;
  271. switch (inb_p(HGA_STATUS_PORT) & 0x70) {
  272. case 0x10:
  273. hga_type = TYPE_HERCPLUS;
  274. hga_type_name = "HerculesPlus";
  275. break;
  276. case 0x50:
  277. hga_type = TYPE_HERCCOLOR;
  278. hga_type_name = "HerculesColor";
  279. break;
  280. default:
  281. hga_type = TYPE_HERC;
  282. hga_type_name = "Hercules";
  283. break;
  284. }
  285. return 0;
  286. error:
  287. if (release_io_ports)
  288. release_region(0x3b0, 12);
  289. if (release_io_port)
  290. release_region(0x3bf, 1);
  291. iounmap(hga_vram);
  292. pr_err("hgafb: HGA card not detected.\n");
  293. return -EINVAL;
  294. }
  295. /**
  296. * hgafb_open - open the framebuffer device
  297. * @info:pointer to fb_info object containing info for current hga board
  298. * @int:open by console system or userland.
  299. */
  300. static int hgafb_open(struct fb_info *info, int init)
  301. {
  302. hga_gfx_mode();
  303. hga_clear_screen();
  304. if (!nologo) hga_show_logo(info);
  305. return 0;
  306. }
  307. /**
  308. * hgafb_open - open the framebuffer device
  309. * @info:pointer to fb_info object containing info for current hga board
  310. * @int:open by console system or userland.
  311. */
  312. static int hgafb_release(struct fb_info *info, int init)
  313. {
  314. hga_txt_mode();
  315. hga_clear_screen();
  316. return 0;
  317. }
  318. /**
  319. * hgafb_setcolreg - set color registers
  320. * @regno:register index to set
  321. * @red:red value, unused
  322. * @green:green value, unused
  323. * @blue:blue value, unused
  324. * @transp:transparency value, unused
  325. * @info:unused
  326. *
  327. * This callback function is used to set the color registers of a HGA
  328. * board. Since we have only two fixed colors only @regno is checked.
  329. * A zero is returned on success and 1 for failure.
  330. */
  331. static int hgafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
  332. u_int transp, struct fb_info *info)
  333. {
  334. if (regno > 1)
  335. return 1;
  336. return 0;
  337. }
  338. /**
  339. * hga_pan_display - pan or wrap the display
  340. * @var:contains new xoffset, yoffset and vmode values
  341. * @info:pointer to fb_info object containing info for current hga board
  342. *
  343. * This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP
  344. * flag in @var. If input parameters are correct it calls hga_pan() to
  345. * program the hardware. @info->var is updated to the new values.
  346. * A zero is returned on success and %-EINVAL for failure.
  347. */
  348. static int hgafb_pan_display(struct fb_var_screeninfo *var,
  349. struct fb_info *info)
  350. {
  351. if (var->vmode & FB_VMODE_YWRAP) {
  352. if (var->yoffset >= info->var.yres_virtual ||
  353. var->xoffset)
  354. return -EINVAL;
  355. } else {
  356. if (var->xoffset + info->var.xres > info->var.xres_virtual
  357. || var->yoffset + info->var.yres > info->var.yres_virtual
  358. || var->yoffset % 8)
  359. return -EINVAL;
  360. }
  361. hga_pan(var->xoffset, var->yoffset);
  362. return 0;
  363. }
  364. /**
  365. * hgafb_blank - (un)blank the screen
  366. * @blank_mode:blanking method to use
  367. * @info:unused
  368. *
  369. * Blank the screen if blank_mode != 0, else unblank.
  370. * Implements VESA suspend and powerdown modes on hardware that supports
  371. * disabling hsync/vsync:
  372. * @blank_mode == 2 means suspend vsync,
  373. * @blank_mode == 3 means suspend hsync,
  374. * @blank_mode == 4 means powerdown.
  375. */
  376. static int hgafb_blank(int blank_mode, struct fb_info *info)
  377. {
  378. hga_blank(blank_mode);
  379. return 0;
  380. }
  381. /*
  382. * Accel functions
  383. */
  384. static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
  385. {
  386. u_int rows, y;
  387. u8 __iomem *dest;
  388. y = rect->dy;
  389. for (rows = rect->height; rows--; y++) {
  390. dest = rowaddr(info, y) + (rect->dx >> 3);
  391. switch (rect->rop) {
  392. case ROP_COPY:
  393. memset_io(dest, rect->color, (rect->width >> 3));
  394. break;
  395. case ROP_XOR:
  396. fb_writeb(~(fb_readb(dest)), dest);
  397. break;
  398. }
  399. }
  400. }
  401. static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
  402. {
  403. u_int rows, y1, y2;
  404. u8 __iomem *src;
  405. u8 __iomem *dest;
  406. if (area->dy <= area->sy) {
  407. y1 = area->sy;
  408. y2 = area->dy;
  409. for (rows = area->height; rows--; ) {
  410. src = rowaddr(info, y1) + (area->sx >> 3);
  411. dest = rowaddr(info, y2) + (area->dx >> 3);
  412. memmove(dest, src, (area->width >> 3));
  413. y1++;
  414. y2++;
  415. }
  416. } else {
  417. y1 = area->sy + area->height - 1;
  418. y2 = area->dy + area->height - 1;
  419. for (rows = area->height; rows--;) {
  420. src = rowaddr(info, y1) + (area->sx >> 3);
  421. dest = rowaddr(info, y2) + (area->dx >> 3);
  422. memmove(dest, src, (area->width >> 3));
  423. y1--;
  424. y2--;
  425. }
  426. }
  427. }
  428. static void hgafb_imageblit(struct fb_info *info, const struct fb_image *image)
  429. {
  430. u8 __iomem *dest;
  431. u8 *cdat = (u8 *) image->data;
  432. u_int rows, y = image->dy;
  433. u_int x;
  434. u8 d;
  435. for (rows = image->height; rows--; y++) {
  436. for (x = 0; x < image->width; x+= 8) {
  437. d = *cdat++;
  438. dest = rowaddr(info, y) + ((image->dx + x)>> 3);
  439. fb_writeb(d, dest);
  440. }
  441. }
  442. }
  443. static struct fb_ops hgafb_ops = {
  444. .owner = THIS_MODULE,
  445. .fb_open = hgafb_open,
  446. .fb_release = hgafb_release,
  447. .fb_setcolreg = hgafb_setcolreg,
  448. .fb_pan_display = hgafb_pan_display,
  449. .fb_blank = hgafb_blank,
  450. .fb_fillrect = hgafb_fillrect,
  451. .fb_copyarea = hgafb_copyarea,
  452. .fb_imageblit = hgafb_imageblit,
  453. };
  454. /* ------------------------------------------------------------------------- *
  455. *
  456. * Functions in fb_info
  457. *
  458. * ------------------------------------------------------------------------- */
  459. /* ------------------------------------------------------------------------- */
  460. /*
  461. * Initialization
  462. */
  463. static int hgafb_probe(struct platform_device *pdev)
  464. {
  465. struct fb_info *info;
  466. int ret;
  467. ret = hga_card_detect();
  468. if (ret)
  469. return ret;
  470. printk(KERN_INFO "hgafb: %s with %ldK of memory detected.\n",
  471. hga_type_name, hga_vram_len/1024);
  472. info = framebuffer_alloc(0, &pdev->dev);
  473. if (!info) {
  474. iounmap(hga_vram);
  475. return -ENOMEM;
  476. }
  477. hga_fix.smem_start = (unsigned long)hga_vram;
  478. hga_fix.smem_len = hga_vram_len;
  479. info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
  480. info->var = hga_default_var;
  481. info->fix = hga_fix;
  482. info->monspecs.hfmin = 0;
  483. info->monspecs.hfmax = 0;
  484. info->monspecs.vfmin = 10000;
  485. info->monspecs.vfmax = 10000;
  486. info->monspecs.dpms = 0;
  487. info->fbops = &hgafb_ops;
  488. info->screen_base = hga_vram;
  489. if (register_framebuffer(info) < 0) {
  490. framebuffer_release(info);
  491. iounmap(hga_vram);
  492. return -EINVAL;
  493. }
  494. fb_info(info, "%s frame buffer device\n", info->fix.id);
  495. platform_set_drvdata(pdev, info);
  496. return 0;
  497. }
  498. static int hgafb_remove(struct platform_device *pdev)
  499. {
  500. struct fb_info *info = platform_get_drvdata(pdev);
  501. hga_txt_mode();
  502. hga_clear_screen();
  503. if (info) {
  504. unregister_framebuffer(info);
  505. framebuffer_release(info);
  506. }
  507. iounmap(hga_vram);
  508. if (release_io_ports)
  509. release_region(0x3b0, 12);
  510. if (release_io_port)
  511. release_region(0x3bf, 1);
  512. return 0;
  513. }
  514. static struct platform_driver hgafb_driver = {
  515. .probe = hgafb_probe,
  516. .remove = hgafb_remove,
  517. .driver = {
  518. .name = "hgafb",
  519. },
  520. };
  521. static struct platform_device *hgafb_device;
  522. static int __init hgafb_init(void)
  523. {
  524. int ret;
  525. if (fb_get_options("hgafb", NULL))
  526. return -ENODEV;
  527. ret = platform_driver_register(&hgafb_driver);
  528. if (!ret) {
  529. hgafb_device = platform_device_register_simple("hgafb", 0, NULL, 0);
  530. if (IS_ERR(hgafb_device)) {
  531. platform_driver_unregister(&hgafb_driver);
  532. ret = PTR_ERR(hgafb_device);
  533. }
  534. }
  535. return ret;
  536. }
  537. static void __exit hgafb_exit(void)
  538. {
  539. platform_device_unregister(hgafb_device);
  540. platform_driver_unregister(&hgafb_driver);
  541. }
  542. /* -------------------------------------------------------------------------
  543. *
  544. * Modularization
  545. *
  546. * ------------------------------------------------------------------------- */
  547. MODULE_AUTHOR("Ferenc Bakonyi (fero@drama.obuda.kando.hu)");
  548. MODULE_DESCRIPTION("FBDev driver for Hercules Graphics Adaptor");
  549. MODULE_LICENSE("GPL");
  550. module_param(nologo, bool, 0);
  551. MODULE_PARM_DESC(nologo, "Disables startup logo if != 0 (default=0)");
  552. module_init(hgafb_init);
  553. module_exit(hgafb_exit);