patch-2.3.16 linux/drivers/video/cyber2000fb.c
Next file: linux/drivers/video/fbcon.c
Previous file: linux/drivers/video/creatorfb.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Mon Aug 30 18:15:21 1999
- Orig file:
v2.3.15/linux/drivers/video/cyber2000fb.c
- Orig date:
Thu Aug 26 13:05:40 1999
diff -u --recursive --new-file v2.3.15/linux/drivers/video/cyber2000fb.c linux/drivers/video/cyber2000fb.c
@@ -631,13 +631,15 @@
cyber2000_outw(width, 0xbf218);
cyber2000_outb(b, 0xbf01c);
-{ int j;
+#if 0
+{ int j; i = 0;
printk(KERN_DEBUG);
for (j = 0; j < 19; j++) printk("%2d ", j); printk("\n"KERN_DEBUG);
for (j = 0; j < 19; j++) printk("%02X ", crtc[j]); printk("\n"KERN_DEBUG);
for (j = 0; j < 18; j++) printk("%02X ", cyber2000_res[i].crtc_regs[j]);
printk("%02X\n", cyber2000_res[i].crtc_ofl);
}
+#endif
}
static inline void
@@ -1143,12 +1145,24 @@
{
struct pci_dev *dev;
u_int h_sync, v_sync;
+ u_long base_p, base_v;
dev = pci_find_device(PCI_VENDOR_ID_INTERG, 0x2000, NULL);
if (!dev)
return -ENXIO;
- CyberRegs = bus_to_virt(dev->base_address[0]) + 0x00800000;/*FIXME*/
+ /* this should be done by PCI generic code */
+ base_p = 0x80000000 + dev->resource[0].start;
+
+ /*
+ * This should be ioremap'd, thus:
+ *
+ * base_v = ioremap(dev->resource[0].start, dev->resource[0].end - dev->resource[0].start + 1);
+ */
+ base_v = (u_long)bus_to_virt(dev->resource[0].start);
+
+ /*FIXME*/
+ CyberRegs = base_v + 0x00800000;
cyber2000_outb(0x18, 0x46e8);
cyber2000_outb(0x01, 0x102);
@@ -1157,13 +1171,10 @@
cyber2000fb_init_fbinfo();
current_par.currcon = -1;
- /* this should be done by PCI generic code */
- current_par.screen_base_p = 0x80000000 + dev->resource[0].start;
- /* and this by ioremap... But I have no such device here to test */
- /* current_par.screen_base = ioremap(dev->resource[0].start, dev->resource[0].end - dev->resource[0].start + 1); */
- current_par.screen_base = (u_int)bus_to_virt(dev->resource[0].start);
+ current_par.screen_base_p = base_p;
+ current_par.screen_base = base_v;
current_par.screen_size = 0x00200000;
- current_par.regs_base_p = 0x80800000 + dev->resource[0].start;
+ current_par.regs_base_p = base_p + 0x00800000;
cyber2000fb_set_var(&init_var, -1, &fb_info);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)