et4000hwgc.c 552 B

12345678910111213141516171819202122232425262728293031323334
  1. #include <u.h>
  2. #include <libc.h>
  3. #include <bio.h>
  4. #include "pci.h"
  5. #include "vga.h"
  6. static void
  7. init(Vga* vga, Ctlr* ctlr)
  8. {
  9. ctlr->flag |= Finit;
  10. /*
  11. * Use of the hwgc requires
  12. * a W32 chip,
  13. * 8-bits,
  14. * not 2x8-bit mode.
  15. */
  16. if(cflag)
  17. return;
  18. if(vga->ctlr == 0 || strncmp(vga->ctlr->name, "et4000-w32", 10))
  19. cflag = 1;
  20. if(vga->mode->z != 8 || (ctlr->flag & Upclk2x8))
  21. cflag = 1;
  22. }
  23. Ctlr et4000hwgc = {
  24. "et4000hwgc", /* name */
  25. 0, /* snarf */
  26. 0, /* options */
  27. init, /* init */
  28. 0, /* load */
  29. 0, /* dump */
  30. };