Merge branch 'merge' of git://www.denx.de/git/u-boot-microblaze
[oweals/u-boot.git] / drivers / ct69000.c
index f510f371d1d29a9ed95d24fbbfbb239bce1b9baa..29d82e4c4351976f8b045b82674de3a4d15aa6a0 100644 (file)
@@ -1,6 +1,8 @@
-/*
- * (C) Copyright 2002
- * Denis Peter, MPL AG Switzerland
+/* ported from ctfb.c (linux kernel):
+ * Created in Jan - July 2000 by Thomas Höhenleitner <th@visuelle-maschinen.de>
+ *
+ * Ported to U-Boot:
+ * (C) Copyright 2002 Denis Peter, MPL AG Switzerland
  *
  * See file CREDITS for list of people who contributed to this
  * project.
  * MA 02111-1307 USA
  */
 
-/*
- * ported from ctfb.c (linux kernel) for the U-Boot
- *
- */
-
-
 #include <common.h>
 
 #ifdef CONFIG_VIDEO
@@ -276,6 +272,9 @@ struct ctfb_chips_properties {
 
 static const struct ctfb_chips_properties chips[] = {
        {PCI_DEVICE_ID_CT_69000, 0x200000, 1, 4, -2, 3, 257, 100, 220},
+#ifdef CONFIG_USE_CPCIDVI
+       {PCI_DEVICE_ID_CT_69030, 0x400000, 1, 4, -2, 3, 257, 100, 220},
+#endif
        {PCI_DEVICE_ID_CT_65555, 0x100000, 16, 4, 0, 1, 255, 48, 220},  /* NOT TESTED */
        {0, 0, 0, 0, 0, 0, 0, 0, 0}     /* Terminator */
 };
@@ -961,6 +960,9 @@ SetDrawingEngine (int bits_per_pixel)
 */
 static struct pci_device_id supported[] = {
        {PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69000},
+#ifdef CONFIG_USE_CPCIDVI
+       {PCI_VENDOR_ID_CT, PCI_DEVICE_ID_CT_69030},
+#endif
        {}
 };
 
@@ -1125,7 +1127,22 @@ video_hw_init (void)
        pGD->cprBase = pci_mem_base;    /* Dummy */
        /* set up Hardware */
 
+#ifdef CONFIG_USE_CPCIDVI
+       if (device_id == PCI_DEVICE_ID_CT_69030) {
+               ctWrite (CT_MSR_W_O, 0x0b);
+               ctWrite (0x3cd, 0x13);
+               ctWrite_i (CT_FP_O, 0x02, 0x00);
+               ctWrite_i (CT_FP_O, 0x05, 0x00);
+               ctWrite_i (CT_FP_O, 0x06, 0x00);
+               ctWrite (0x3c2, 0x0b);
+               ctWrite_i (CT_FP_O, 0x02, 0x10);
+               ctWrite_i (CT_FP_O, 0x01, 0x09);
+       } else {
+               ctWrite (CT_MSR_W_O, 0x01);
+       }
+#else
        ctWrite (CT_MSR_W_O, 0x01);
+#endif
 
        /* set the extended Registers */
        ctLoadRegs (CT_XR_O, xreg);