[Pkg-voip-commits] r5756 - in /zaptel/trunk: debian/changelog kernel/qozap/qozap.c

paravoid at alioth.debian.org paravoid at alioth.debian.org
Wed May 21 00:47:05 UTC 2008


Author: paravoid
Date: Wed May 21 00:47:04 2008
New Revision: 5756

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5756
Log:
* Update qozap from bristuff-0.4.0-RC1
  - fixed duoBRI miniPCI detection in qozap.
  - added support for PCIe variants of duoBRI and quadBRI.

Modified:
    zaptel/trunk/debian/changelog
    zaptel/trunk/kernel/qozap/qozap.c

Modified: zaptel/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/debian/changelog?rev=5756&op=diff
==============================================================================
--- zaptel/trunk/debian/changelog (original)
+++ zaptel/trunk/debian/changelog Wed May 21 00:47:04 2008
@@ -1,3 +1,11 @@
+zaptel (1:1.4.10.1~dfsg-2) UNRELEASED; urgency=low
+
+  * Update qozap from bristuff-0.4.0-RC1
+    - fixed duoBRI miniPCI detection in qozap.
+    - added support for PCIe variants of duoBRI and quadBRI.
+
+ -- Faidon Liambotis <paravoid at debian.org>  Wed, 21 May 2008 03:46:52 +0300
+
 zaptel (1:1.4.10.1~dfsg-1) unstable; urgency=low
 
   [ Tzafrir Cohen ]

Modified: zaptel/trunk/kernel/qozap/qozap.c
URL: http://svn.debian.org/wsvn/pkg-voip/zaptel/trunk/kernel/qozap/qozap.c?rev=5756&op=diff
==============================================================================
--- zaptel/trunk/kernel/qozap/qozap.c (original)
+++ zaptel/trunk/kernel/qozap/qozap.c Wed May 21 00:47:04 2008
@@ -116,7 +116,7 @@
 	    qoz_outb(qoztmp,qoz_R_GPIO_SEL,0x20 | 0x10);
     	    qoz_outb(qoztmp,qoz_R_GPIO_EN1,0xf);
 	    qoz_outb(qoztmp,qoz_R_GPIO_OUT1,(qoztmp->leds[0] | (qoztmp->leds[1] << 1) | (qoztmp->leds[2] << 2) | (qoztmp->leds[3] << 3)));
-    } else if (((qoztmp->type == 0xb550)  || (qoztmp->type == 0xb556)) && (qoztmp->stports == 4)){
+    } else if (((qoztmp->type == 0xb550)  || (qoztmp->type == 0xb556) || (qoztmp->type == 0xb752)) && (qoztmp->stports == 4)){
 	    qoz_outb(qoztmp,qoz_R_GPIO_SEL,0x80 | 0x40 | 0x20 | 0x10);
     	    qoz_outb(qoztmp,qoz_R_GPIO_EN1,0xff);
 	    leds = 0x10;
@@ -147,7 +147,7 @@
     */
 	    qoz_outb(qoztmp,qoz_R_GPIO_OUT1, leds);
 
-    } else if ((qoztmp->type == 0xb556) && (qoztmp->stports == 2)){
+    } else if (((qoztmp->type == 0xb556) || (qoztmp->type == 0xb751)) && (qoztmp->stports == 2)){
 	    qoz_outb(qoztmp,qoz_R_GPIO_SEL,0x80 | 0x40 | 0x20 | 0x10);
     	    qoz_outb(qoztmp,qoz_R_GPIO_EN1,0xff);
 	    leds = 0x0;
@@ -337,11 +337,15 @@
 	    qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x20); 
 	} else if (qoztmp->type == 0xb556) {
 	    qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x20); 
-	} else if (qoztmp->type == 0xb557) {
+	} else if (qoztmp->type == 0xb559) {
 	    qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x20); 
 	} else if (qoztmp->type == 0xb558) {
 	    qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x20); 
 	} else if (qoztmp->type == 0xb520) {
+	    qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x20); 
+	} else if (qoztmp->type == 0xb752) {
+	    qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x20); 
+	} else if (qoztmp->type == 0xb751) {
 	    qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x20); 
 	} else {
 	    /* you are on your own here! */
@@ -366,7 +370,9 @@
 	qoztmp->stports = 8;
     } else if (qoztmp->type == 0xb556) {
 	qoztmp->stports = 2;
-    } else if (qoztmp->type == 0xb557) {
+    } else if (qoztmp->type == 0xb559) {
+	qoztmp->stports = 2;
+    } else if (qoztmp->type == 0xb751) {
 	qoztmp->stports = 2;
     } else {
 	qoztmp->stports = 4;
@@ -1725,6 +1731,20 @@
 		}
 		qoz_outb(qoztmp,qoz_R_BRG_PCM_CFG,0x20); 
 		printk(KERN_CRIT "dips = %#x cid = %d\n", dips, cid);
+	} else if (((tmp->subsystem_device==0xb752) || (tmp->subsystem_device==0xb751)) && (pcidid == PCI_DEVICE_ID_CCD_M4)){
+		qoz_outb(qoztmp,qoz_R_GPIO_SEL,0xF0);
+		qoz_outb(qoztmp,qoz_R_GPIO_EN0,0x00);
+		qoz_outb(qoztmp,qoz_R_GPIO_EN1,0x00);
+//		dips = qoz_inb(qoztmp,qoz_R_GPIO_IN1) >> 5;
+		dips = ((qoz_inb(qoztmp,qoz_R_GPI_IN3) & 80) >> 1) | ((qoz_inb(qoztmp,qoz_R_GPI_IN3) & 8) << 2) | qoz_inb(qoztmp,qoz_R_GPIO_IN1);
+
+		cid = 0;
+		for (i=0;i<3;i++) {
+	    	    if ((dips & (1 << i)) == 0) {
+	    		cid += (1 << i);
+		    }
+		}
+		printk(KERN_CRIT "dips = %#x cid = %d\n", dips, cid);
         } else {
 	    cid = 0xff;
         }
@@ -1765,6 +1785,28 @@
 		    printk(KERN_CRIT "gpi_in3 %#x \n", qoz_inb(qoztmp,qoz_R_GPI_IN3));
 		}
 		modes = qoz_inb(qoztmp,qoz_R_GPI_IN3) >> 4;
+    	    } else if ((tmp->subsystem_device==0xb751) && (pcidid == PCI_DEVICE_ID_CCD_M4)) {
+		qoz_outb(qoztmp,qoz_R_GPIO_SEL,0xf0);
+		qoz_outb(qoztmp,qoz_R_GPIO_EN0,0x00);
+		if (debug) {
+		    printk(KERN_CRIT "gpio_in0 %#x \n", qoz_inb(qoztmp,qoz_R_GPIO_IN0));
+		    printk(KERN_CRIT "gpio_in1 %#x \n", qoz_inb(qoztmp,qoz_R_GPIO_IN1));
+		    printk(KERN_CRIT "gpi_in1 %#x \n", qoz_inb(qoztmp,qoz_R_GPI_IN1));
+		    printk(KERN_CRIT "gpi_in2 %#x \n", qoz_inb(qoztmp,qoz_R_GPI_IN2));
+		    printk(KERN_CRIT "gpi_in3 %#x \n", qoz_inb(qoztmp,qoz_R_GPI_IN3));
+		}
+		modes = qoz_inb(qoztmp,qoz_R_GPI_IN3) >> 4;	    
+    	    } else if ((tmp->subsystem_device==0xb752) && (pcidid == PCI_DEVICE_ID_CCD_M4)) {
+		qoz_outb(qoztmp,qoz_R_GPIO_SEL,0xf0);
+		qoz_outb(qoztmp,qoz_R_GPIO_EN0,0x00);
+		if (debug) {
+		    printk(KERN_CRIT "gpio_in0 %#x \n", qoz_inb(qoztmp,qoz_R_GPIO_IN0));
+		    printk(KERN_CRIT "gpio_in1 %#x \n", qoz_inb(qoztmp,qoz_R_GPIO_IN1));
+		    printk(KERN_CRIT "gpi_in1 %#x \n", qoz_inb(qoztmp,qoz_R_GPI_IN1));
+		    printk(KERN_CRIT "gpi_in2 %#x \n", qoz_inb(qoztmp,qoz_R_GPI_IN2));
+		    printk(KERN_CRIT "gpi_in3 %#x \n", qoz_inb(qoztmp,qoz_R_GPI_IN3));
+		}
+		modes = qoz_inb(qoztmp,qoz_R_GPI_IN3) >> 4;	    
 	    } else {
 		modes = 0; // assume TE mode
 	    }
@@ -1803,9 +1845,16 @@
 		        qoztmp->irq, HZ, cid);
 		        totalBRIs += 2;
 		    break;
-		case 0xb557:
+		case 0xb559:
 			printk(KERN_INFO
 		        "qozap: Junghanns.NET duoBRI miniPCI card configured at io port %#x IRQ %d HZ %d CardID %d\n",
+		          (u_int) qoztmp->ioport,
+		        qoztmp->irq, HZ, cid);
+		        totalBRIs += 2;
+		    break;
+		case 0xb751:
+			printk(KERN_INFO
+		        "qozap: Junghanns.NET duoBRI PCIe card configured at io port %#x IRQ %d HZ %d CardID %d\n",
 		          (u_int) qoztmp->ioport,
 		        qoztmp->irq, HZ, cid);
 		        totalBRIs += 2;
@@ -1813,6 +1862,13 @@
 		case 0xb558:
 			printk(KERN_INFO
 		        "qozap: Junghanns.NET quadBRI miniPCI card configured at io port %#x IRQ %d HZ %d CardID %d\n",
+		          (u_int) qoztmp->ioport,
+		        qoztmp->irq, HZ, cid);
+		        totalBRIs += 4;
+		    break;
+		case 0xb752:
+			printk(KERN_INFO
+		        "qozap: Junghanns.NET quadBRI PCIe card configured at io port %#x IRQ %d HZ %d CardID %d\n",
 		          (u_int) qoztmp->ioport,
 		        qoztmp->irq, HZ, cid);
 		        totalBRIs += 4;




More information about the Pkg-voip-commits mailing list