hgafb.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  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/slab.h>
  39. #include <linux/delay.h>
  40. #include <linux/fb.h>
  41. #include <linux/init.h>
  42. #include <linux/ioport.h>
  43. #include <linux/platform_device.h>
  44. #include <asm/io.h>
  45. #include <asm/vga.h>
  46. #if 0
  47. #define DPRINTK(args...) printk(KERN_DEBUG __FILE__": " ##args)
  48. #else
  49. #define DPRINTK(args...)
  50. #endif
  51. #if 0
  52. #define CHKINFO(ret) if (info != &fb_info) { printk(KERN_DEBUG __FILE__": This should never happen, line:%d \n", __LINE__); return ret; }
  53. #else
  54. #define CHKINFO(ret)
  55. #endif
  56. /* Description of the hardware layout */
  57. static void __iomem *hga_vram; /* Base of video memory */
  58. static unsigned long hga_vram_len; /* Size of video memory */
  59. #define HGA_ROWADDR(row) ((row%4)*8192 + (row>>2)*90)
  60. #define HGA_TXT 0
  61. #define HGA_GFX 1
  62. static inline u8 __iomem * rowaddr(struct fb_info *info, u_int row)
  63. {
  64. return info->screen_base + HGA_ROWADDR(row);
  65. }
  66. static int hga_mode = -1; /* 0 = txt, 1 = gfx mode */
  67. static enum { TYPE_HERC, TYPE_HERCPLUS, TYPE_HERCCOLOR } hga_type;
  68. static char *hga_type_name;
  69. #define HGA_INDEX_PORT 0x3b4 /* Register select port */
  70. #define HGA_VALUE_PORT 0x3b5 /* Register value port */
  71. #define HGA_MODE_PORT 0x3b8 /* Mode control port */
  72. #define HGA_STATUS_PORT 0x3ba /* Status and Config port */
  73. #define HGA_GFX_PORT 0x3bf /* Graphics control port */
  74. /* HGA register values */
  75. #define HGA_CURSOR_BLINKING 0x00
  76. #define HGA_CURSOR_OFF 0x20
  77. #define HGA_CURSOR_SLOWBLINK 0x60
  78. #define HGA_MODE_GRAPHICS 0x02
  79. #define HGA_MODE_VIDEO_EN 0x08
  80. #define HGA_MODE_BLINK_EN 0x20
  81. #define HGA_MODE_GFX_PAGE1 0x80
  82. #define HGA_STATUS_HSYNC 0x01
  83. #define HGA_STATUS_VSYNC 0x80
  84. #define HGA_STATUS_VIDEO 0x08
  85. #define HGA_CONFIG_COL132 0x08
  86. #define HGA_GFX_MODE_EN 0x01
  87. #define HGA_GFX_PAGE_EN 0x02
  88. /* Global locks */
  89. static DEFINE_SPINLOCK(hga_reg_lock);
  90. /* Framebuffer driver structures */
  91. static struct fb_var_screeninfo __initdata hga_default_var = {
  92. .xres = 720,
  93. .yres = 348,
  94. .xres_virtual = 720,
  95. .yres_virtual = 348,
  96. .bits_per_pixel = 1,
  97. .red = {0, 1, 0},
  98. .green = {0, 1, 0},
  99. .blue = {0, 1, 0},
  100. .transp = {0, 0, 0},
  101. .height = -1,
  102. .width = -1,
  103. };
  104. static struct fb_fix_screeninfo __initdata hga_fix = {
  105. .id = "HGA",
  106. .type = FB_TYPE_PACKED_PIXELS, /* (not sure) */
  107. .visual = FB_VISUAL_MONO10,
  108. .xpanstep = 8,
  109. .ypanstep = 8,
  110. .line_length = 90,
  111. .accel = FB_ACCEL_NONE
  112. };
  113. /* Don't assume that tty1 will be the initial current console. */
  114. static int release_io_port = 0;
  115. static int release_io_ports = 0;
  116. static int nologo = 0;
  117. /* -------------------------------------------------------------------------
  118. *
  119. * Low level hardware functions
  120. *
  121. * ------------------------------------------------------------------------- */
  122. static void write_hga_b(unsigned int val, unsigned char reg)
  123. {
  124. outb_p(reg, HGA_INDEX_PORT);
  125. outb_p(val, HGA_VALUE_PORT);
  126. }
  127. static void write_hga_w(unsigned int val, unsigned char reg)
  128. {
  129. outb_p(reg, HGA_INDEX_PORT); outb_p(val >> 8, HGA_VALUE_PORT);
  130. outb_p(reg+1, HGA_INDEX_PORT); outb_p(val & 0xff, HGA_VALUE_PORT);
  131. }
  132. static int test_hga_b(unsigned char val, unsigned char reg)
  133. {
  134. outb_p(reg, HGA_INDEX_PORT);
  135. outb (val, HGA_VALUE_PORT);
  136. udelay(20); val = (inb_p(HGA_VALUE_PORT) == val);
  137. return val;
  138. }
  139. static void hga_clear_screen(void)
  140. {
  141. unsigned char fillchar = 0xbf; /* magic */
  142. unsigned long flags;
  143. spin_lock_irqsave(&hga_reg_lock, flags);
  144. if (hga_mode == HGA_TXT)
  145. fillchar = ' ';
  146. else if (hga_mode == HGA_GFX)
  147. fillchar = 0x00;
  148. spin_unlock_irqrestore(&hga_reg_lock, flags);
  149. if (fillchar != 0xbf)
  150. memset_io(hga_vram, fillchar, hga_vram_len);
  151. }
  152. static void hga_txt_mode(void)
  153. {
  154. unsigned long flags;
  155. spin_lock_irqsave(&hga_reg_lock, flags);
  156. outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_BLINK_EN, HGA_MODE_PORT);
  157. outb_p(0x00, HGA_GFX_PORT);
  158. outb_p(0x00, HGA_STATUS_PORT);
  159. write_hga_b(0x61, 0x00); /* horizontal total */
  160. write_hga_b(0x50, 0x01); /* horizontal displayed */
  161. write_hga_b(0x52, 0x02); /* horizontal sync pos */
  162. write_hga_b(0x0f, 0x03); /* horizontal sync width */
  163. write_hga_b(0x19, 0x04); /* vertical total */
  164. write_hga_b(0x06, 0x05); /* vertical total adjust */
  165. write_hga_b(0x19, 0x06); /* vertical displayed */
  166. write_hga_b(0x19, 0x07); /* vertical sync pos */
  167. write_hga_b(0x02, 0x08); /* interlace mode */
  168. write_hga_b(0x0d, 0x09); /* maximum scanline */
  169. write_hga_b(0x0c, 0x0a); /* cursor start */
  170. write_hga_b(0x0d, 0x0b); /* cursor end */
  171. write_hga_w(0x0000, 0x0c); /* start address */
  172. write_hga_w(0x0000, 0x0e); /* cursor location */
  173. hga_mode = HGA_TXT;
  174. spin_unlock_irqrestore(&hga_reg_lock, flags);
  175. }
  176. static void hga_gfx_mode(void)
  177. {
  178. unsigned long flags;
  179. spin_lock_irqsave(&hga_reg_lock, flags);
  180. outb_p(0x00, HGA_STATUS_PORT);
  181. outb_p(HGA_GFX_MODE_EN, HGA_GFX_PORT);
  182. outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_GRAPHICS, HGA_MODE_PORT);
  183. write_hga_b(0x35, 0x00); /* horizontal total */
  184. write_hga_b(0x2d, 0x01); /* horizontal displayed */
  185. write_hga_b(0x2e, 0x02); /* horizontal sync pos */
  186. write_hga_b(0x07, 0x03); /* horizontal sync width */
  187. write_hga_b(0x5b, 0x04); /* vertical total */
  188. write_hga_b(0x02, 0x05); /* vertical total adjust */
  189. write_hga_b(0x57, 0x06); /* vertical displayed */
  190. write_hga_b(0x57, 0x07); /* vertical sync pos */
  191. write_hga_b(0x02, 0x08); /* interlace mode */
  192. write_hga_b(0x03, 0x09); /* maximum scanline */
  193. write_hga_b(0x00, 0x0a); /* cursor start */
  194. write_hga_b(0x00, 0x0b); /* cursor end */
  195. write_hga_w(0x0000, 0x0c); /* start address */
  196. write_hga_w(0x0000, 0x0e); /* cursor location */
  197. hga_mode = HGA_GFX;
  198. spin_unlock_irqrestore(&hga_reg_lock, flags);
  199. }
  200. static void hga_show_logo(struct fb_info *info)
  201. {
  202. /*
  203. void __iomem *dest = hga_vram;
  204. char *logo = linux_logo_bw;
  205. int x, y;
  206. for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup *
  207. for (x = 0; x < 10 ; x++)
  208. writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40));
  209. */
  210. }
  211. static void hga_pan(unsigned int xoffset, unsigned int yoffset)
  212. {
  213. unsigned int base;
  214. unsigned long flags;
  215. base = (yoffset / 8) * 90 + xoffset;
  216. spin_lock_irqsave(&hga_reg_lock, flags);
  217. write_hga_w(base, 0x0c); /* start address */
  218. spin_unlock_irqrestore(&hga_reg_lock, flags);
  219. DPRINTK("hga_pan: base:%d\n", base);
  220. }
  221. static void hga_blank(int blank_mode)
  222. {
  223. unsigned long flags;
  224. spin_lock_irqsave(&hga_reg_lock, flags);
  225. if (blank_mode) {
  226. outb_p(0x00, HGA_MODE_PORT); /* disable video */
  227. } else {
  228. outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_GRAPHICS, HGA_MODE_PORT);
  229. }
  230. spin_unlock_irqrestore(&hga_reg_lock, flags);
  231. }
  232. static int __init hga_card_detect(void)
  233. {
  234. int count=0;
  235. void __iomem *p, *q;
  236. unsigned short p_save, q_save;
  237. hga_vram_len = 0x08000;
  238. hga_vram = ioremap(0xb0000, hga_vram_len);
  239. if (request_region(0x3b0, 12, "hgafb"))
  240. release_io_ports = 1;
  241. if (request_region(0x3bf, 1, "hgafb"))
  242. release_io_port = 1;
  243. /* do a memory check */
  244. p = hga_vram;
  245. q = hga_vram + 0x01000;
  246. p_save = readw(p); q_save = readw(q);
  247. writew(0xaa55, p); if (readw(p) == 0xaa55) count++;
  248. writew(0x55aa, p); if (readw(p) == 0x55aa) count++;
  249. writew(p_save, p);
  250. if (count != 2) {
  251. return 0;
  252. }
  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. return 0;
  258. }
  259. if (!test_hga_b(0x99, 0x0f)) { /* cursor low register */
  260. return 0;
  261. }
  262. /* See if the card is a Hercules, by checking whether the vsync
  263. * bit of the status register is changing. This test lasts for
  264. * approximately 1/10th of a second.
  265. */
  266. p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
  267. for (count=0; count < 50000 && p_save == q_save; count++) {
  268. q_save = inb(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
  269. udelay(2);
  270. }
  271. if (p_save == q_save)
  272. return 0;
  273. switch (inb_p(HGA_STATUS_PORT) & 0x70) {
  274. case 0x10:
  275. hga_type = TYPE_HERCPLUS;
  276. hga_type_name = "HerculesPlus";
  277. break;
  278. case 0x50:
  279. hga_type = TYPE_HERCCOLOR;
  280. hga_type_name = "HerculesColor";
  281. break;
  282. default:
  283. hga_type = TYPE_HERC;
  284. hga_type_name = "Hercules";
  285. break;
  286. }
  287. return 1;
  288. }
  289. /**
  290. * hgafb_open - open the framebuffer device
  291. * @info:pointer to fb_info object containing info for current hga board
  292. * @int:open by console system or userland.
  293. */
  294. static int hgafb_open(struct fb_info *info, int init)
  295. {
  296. hga_gfx_mode();
  297. hga_clear_screen();
  298. if (!nologo) hga_show_logo(info);
  299. return 0;
  300. }
  301. /**
  302. * hgafb_open - open the framebuffer device
  303. * @info:pointer to fb_info object containing info for current hga board
  304. * @int:open by console system or userland.
  305. */
  306. static int hgafb_release(struct fb_info *info, int init)
  307. {
  308. hga_txt_mode();
  309. hga_clear_screen();
  310. return 0;
  311. }
  312. /**
  313. * hgafb_setcolreg - set color registers
  314. * @regno:register index to set
  315. * @red:red value, unused
  316. * @green:green value, unused
  317. * @blue:blue value, unused
  318. * @transp:transparency value, unused
  319. * @info:unused
  320. *
  321. * This callback function is used to set the color registers of a HGA
  322. * board. Since we have only two fixed colors only @regno is checked.
  323. * A zero is returned on success and 1 for failure.
  324. */
  325. static int hgafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
  326. u_int transp, struct fb_info *info)
  327. {
  328. if (regno > 1)
  329. return 1;
  330. return 0;
  331. }
  332. /**
  333. * hga_pan_display - pan or wrap the display
  334. * @var:contains new xoffset, yoffset and vmode values
  335. * @info:pointer to fb_info object containing info for current hga board
  336. *
  337. * This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP
  338. * flag in @var. If input parameters are correct it calls hga_pan() to
  339. * program the hardware. @info->var is updated to the new values.
  340. * A zero is returned on success and %-EINVAL for failure.
  341. */
  342. static int hgafb_pan_display(struct fb_var_screeninfo *var,
  343. struct fb_info *info)
  344. {
  345. if (var->vmode & FB_VMODE_YWRAP) {
  346. if (var->yoffset < 0 ||
  347. var->yoffset >= info->var.yres_virtual ||
  348. var->xoffset)
  349. return -EINVAL;
  350. } else {
  351. if (var->xoffset + var->xres > info->var.xres_virtual
  352. || var->yoffset + var->yres > info->var.yres_virtual
  353. || var->yoffset % 8)
  354. return -EINVAL;
  355. }
  356. hga_pan(var->xoffset, var->yoffset);
  357. return 0;
  358. }
  359. /**
  360. * hgafb_blank - (un)blank the screen
  361. * @blank_mode:blanking method to use
  362. * @info:unused
  363. *
  364. * Blank the screen if blank_mode != 0, else unblank.
  365. * Implements VESA suspend and powerdown modes on hardware that supports
  366. * disabling hsync/vsync:
  367. * @blank_mode == 2 means suspend vsync,
  368. * @blank_mode == 3 means suspend hsync,
  369. * @blank_mode == 4 means powerdown.
  370. */
  371. static int hgafb_blank(int blank_mode, struct fb_info *info)
  372. {
  373. hga_blank(blank_mode);
  374. return 0;
  375. }
  376. /*
  377. * Accel functions
  378. */
  379. #ifdef CONFIG_FB_HGA_ACCEL
  380. static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
  381. {
  382. u_int rows, y;
  383. u8 __iomem *dest;
  384. y = rect->dy;
  385. for (rows = rect->height; rows--; y++) {
  386. dest = rowaddr(info, y) + (rect->dx >> 3);
  387. switch (rect->rop) {
  388. case ROP_COPY:
  389. //fb_memset(dest, rect->color, (rect->width >> 3));
  390. break;
  391. case ROP_XOR:
  392. fb_writeb(~(fb_readb(dest)), dest);
  393. break;
  394. }
  395. }
  396. }
  397. static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
  398. {
  399. u_int rows, y1, y2;
  400. u8 __iomem *src;
  401. u8 __iomem *dest;
  402. if (area->dy <= area->sy) {
  403. y1 = area->sy;
  404. y2 = area->dy;
  405. for (rows = area->height; rows--; ) {
  406. src = rowaddr(info, y1) + (area->sx >> 3);
  407. dest = rowaddr(info, y2) + (area->dx >> 3);
  408. //fb_memmove(dest, src, (area->width >> 3));
  409. y1++;
  410. y2++;
  411. }
  412. } else {
  413. y1 = area->sy + area->height - 1;
  414. y2 = area->dy + area->height - 1;
  415. for (rows = area->height; rows--;) {
  416. src = rowaddr(info, y1) + (area->sx >> 3);
  417. dest = rowaddr(info, y2) + (area->dx >> 3);
  418. //fb_memmove(dest, src, (area->width >> 3));
  419. y1--;
  420. y2--;
  421. }
  422. }
  423. }
  424. static void hgafb_imageblit(struct fb_info *info, const struct fb_image *image)
  425. {
  426. u8 __iomem *dest;
  427. u8 *cdat = (u8 *) image->data;
  428. u_int rows, y = image->dy;
  429. u8 d;
  430. for (rows = image->height; rows--; y++) {
  431. d = *cdat++;
  432. dest = rowaddr(info, y) + (image->dx >> 3);
  433. fb_writeb(d, dest);
  434. }
  435. }
  436. #else /* !CONFIG_FB_HGA_ACCEL */
  437. #define hgafb_fillrect cfb_fillrect
  438. #define hgafb_copyarea cfb_copyarea
  439. #define hgafb_imageblit cfb_imageblit
  440. #endif /* CONFIG_FB_HGA_ACCEL */
  441. static struct fb_ops hgafb_ops = {
  442. .owner = THIS_MODULE,
  443. .fb_open = hgafb_open,
  444. .fb_release = hgafb_release,
  445. .fb_setcolreg = hgafb_setcolreg,
  446. .fb_pan_display = hgafb_pan_display,
  447. .fb_blank = hgafb_blank,
  448. .fb_fillrect = hgafb_fillrect,
  449. .fb_copyarea = hgafb_copyarea,
  450. .fb_imageblit = hgafb_imageblit,
  451. };
  452. /* ------------------------------------------------------------------------- *
  453. *
  454. * Functions in fb_info
  455. *
  456. * ------------------------------------------------------------------------- */
  457. /* ------------------------------------------------------------------------- */
  458. /*
  459. * Initialization
  460. */
  461. static int __init hgafb_probe(struct device *device)
  462. {
  463. struct fb_info *info;
  464. if (! hga_card_detect()) {
  465. printk(KERN_INFO "hgafb: HGA card not detected.\n");
  466. if (hga_vram)
  467. iounmap(hga_vram);
  468. return -EINVAL;
  469. }
  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, NULL);
  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. printk(KERN_INFO "fb%d: %s frame buffer device\n",
  495. info->node, info->fix.id);
  496. dev_set_drvdata(device, info);
  497. return 0;
  498. }
  499. static int hgafb_remove(struct device *device)
  500. {
  501. struct fb_info *info = dev_get_drvdata(device);
  502. hga_txt_mode();
  503. hga_clear_screen();
  504. if (info) {
  505. unregister_framebuffer(info);
  506. framebuffer_release(info);
  507. }
  508. iounmap(hga_vram);
  509. if (release_io_ports)
  510. release_region(0x3b0, 12);
  511. if (release_io_port)
  512. release_region(0x3bf, 1);
  513. return 0;
  514. }
  515. static struct device_driver hgafb_driver = {
  516. .name = "hgafb",
  517. .bus = &platform_bus_type,
  518. .probe = hgafb_probe,
  519. .remove = hgafb_remove,
  520. };
  521. static struct platform_device hgafb_device = {
  522. .name = "hgafb",
  523. };
  524. static int __init hgafb_init(void)
  525. {
  526. int ret;
  527. if (fb_get_options("hgafb", NULL))
  528. return -ENODEV;
  529. ret = driver_register(&hgafb_driver);
  530. if (!ret) {
  531. ret = platform_device_register(&hgafb_device);
  532. if (ret)
  533. driver_unregister(&hgafb_driver);
  534. }
  535. return ret;
  536. }
  537. static void __exit hgafb_exit(void)
  538. {
  539. platform_device_unregister(&hgafb_device);
  540. 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);