hppa sti(4) diff

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

hppa sti(4) diff

Mark Kettenis
This diff makes the onboard Visualize EG graphics on the C180 (and
possibly other models) work.  I'm fairly sure this makes the current
hack for the Visualize EG unnecessary.  However, this needs some
testing on machines with non-PCI sti(4).  So if you have

sti0 at mainbus0 ...
sti0 at phantomas0 ...
sti0 at uturn ...

or something like

"GIO Graphics" ... not configured

in your dmesg, please give this a go and send me the resulting dmesg.

Thanks,

Mark


Index: arch/hppa/dev/sti_sgc.c
===================================================================
RCS file: /cvs/src/sys/arch/hppa/dev/sti_sgc.c,v
retrieving revision 1.35
diff -u -p -r1.35 sti_sgc.c
--- arch/hppa/dev/sti_sgc.c 11 Jan 2007 21:58:05 -0000 1.35
+++ arch/hppa/dev/sti_sgc.c 16 Aug 2007 14:53:30 -0000
@@ -57,10 +57,6 @@
 /* gecko optional graphics (these share the onboard's prom) */
 char sti_sgc_opt[] = { 0x17, 0x20, 0x30, 0x40, 0x70, 0xc0, 0xd0 };
 
-/* internal EG */
-#define STI_INEG_REV 0x60
-#define STI_INEG_PROM 0xf0011000
-
 extern struct cfdriver sti_cd;
 
 int sti_sgc_probe(struct device *, void *, void *);
@@ -92,10 +88,8 @@ sti_sgc_getrom(int unit, struct confargs
  }
 
  if (rom < HPPA_IOBEGIN) {
- if (unit == 0 &&
-    ca->ca_type.iodc_sv_model == HPPA_FIO_GSGC &&
-    ca->ca_type.iodc_revision == STI_INEG_REV)
- rom = STI_INEG_PROM;
+ if (ca->ca_naddrs > 0)
+ rom = ca->ca_addrs[0].addr;
  else
  rom = ca->ca_hpa;
  }
Index: arch/hppa/hppa/autoconf.c
===================================================================
RCS file: /cvs/src/sys/arch/hppa/hppa/autoconf.c,v
retrieving revision 1.50
diff -u -p -r1.50 autoconf.c
--- arch/hppa/hppa/autoconf.c 1 Jun 2007 22:40:33 -0000 1.50
+++ arch/hppa/hppa/autoconf.c 16 Aug 2007 14:53:30 -0000
@@ -258,7 +258,7 @@ pdc_scanbus(self, ca, maxmod, hpa)
 
  for (ia = 0; !(error = pdc_call((iodcio_t)pdc,
     0, PDC_SYSMAP, PDC_SYSMAP_ADDR, &pdc_addr,
-    im, ia)) && ia < nca.ca_naddrs; ia++) {
+    im, ia + 1)) && ia < nca.ca_naddrs; ia++) {
  nca.ca_addrs[ia].addr = pdc_addr.hpa;
  nca.ca_addrs[ia].size =
     pdc_addr.size << PGSHIFT;