[zaptel-commits] trunk r923 - in /trunk: ./ ChangeLog wctdm24xxp.c

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Tue Jan 31 14:17:58 MST 2006


Author: kpfleming
Date: Mon Jan 30 19:38:30 2006
New Revision: 923

URL: http://svn.digium.com/view/zaptel?rev=923&view=rev
Log:
Merged revisions 907,922 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r907 | russell | 2006-01-17 22:52:46 -0600 (Tue, 17 Jan 2006) | 2 lines

remove extremely old ChangeLog ... they will now only exist in tags

........
r922 | markster | 2006-01-30 19:26:56 -0600 (Mon, 30 Jan 2006) | 2 lines

Add support for VPM100M Rev B

........

Removed:
    trunk/ChangeLog
Modified:
    trunk/   (props changed)
    trunk/wctdm24xxp.c

Propchange: trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 30 19:38:30 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-884,886-891,893-906,908-911
+/branches/1.2:1-916,918-922

Modified: trunk/wctdm24xxp.c
URL: http://svn.digium.com/view/zaptel/trunk/wctdm24xxp.c?rev=923&r1=922&r2=923&view=diff
==============================================================================
--- trunk/wctdm24xxp.c (original)
+++ trunk/wctdm24xxp.c Mon Jan 30 19:38:30 2006
@@ -2462,6 +2462,7 @@
 	unsigned char reg;
 	unsigned int mask;
 	unsigned int ver;
+	unsigned char vpmver;
 	unsigned int i, x, y;
 
 	if (!vpmsupport) {
@@ -2483,10 +2484,19 @@
 			return;
 		}	
 
+		if (!x) {
+			vpmver = wctdm_vpm_in(wc, x, 0x1a6) & 0xf;
+			printk("VPM Revision: %02x\n", vpmver);
+		}
+
+
 		/* Setup GPIO's */
 		for (y=0;y<4;y++) {
 			wctdm_vpm_out(wc, x, 0x1a8 + y, 0x00); /* GPIO out */
-			wctdm_vpm_out(wc, x, 0x1ac + y, 0x00); /* GPIO dir */
+			if (x != 3)
+				wctdm_vpm_out(wc, x, 0x1ac + y, 0x00); /* GPIO dir */
+			else
+				wctdm_vpm_out(wc, x, 0x1ac + y, 0xff); /* GPIO dir */
 			wctdm_vpm_out(wc, x, 0x1b0 + y, 0x00); /* GPIO sel */
 		}
 
@@ -2494,15 +2504,21 @@
 		reg = wctdm_vpm_in(wc, x, 0x1a3); /* misc_con */
 		wctdm_vpm_out(wc, x, 0x1a3, reg & ~2);
 
-		/* Setup timeslots */
-		wctdm_vpm_out(wc, x, 0x02f, 0x20 | (x << 3)); 
-
 		/* Setup Echo length (256 taps) */
 		wctdm_vpm_out(wc, x, 0x022, 0);
-		wctdm_vpm_out(wc, x, 0x023, 0x7f);
-		
+
+		/* Setup timeslots */
+		if (vpmver == 0x01) {
+			wctdm_vpm_out(wc, x, 0x02f, 0x00); 
+			wctdm_vpm_out(wc, x, 0x023, 0xff);
+			mask = 0x11111111 << x;
+		} else {
+			wctdm_vpm_out(wc, x, 0x02f, 0x20  | (x << 3)); 
+			wctdm_vpm_out(wc, x, 0x023, 0x3f);
+			mask = 0x0000003f;
+		}
+
 		/* Setup the tdm channel masks for all chips*/
-		mask = 0x0000003f;
 		for (i = 0; i < 4; i++)
 			wctdm_vpm_out(wc, x, 0x33 - i, (mask >> (i << 3)) & 0xff);
 
@@ -2544,7 +2560,10 @@
       
 		/* Enable DTMF detectors (always DTMF detect all spans) */
 		for (i = 0; i < 6; i++) {
-			wctdm_vpm_out(wc, x, 0x98 + i, 0x40 | i);
+			if (vpmver == 0x01) 
+				wctdm_vpm_out(wc, x, 0x98 + i, 0x40 | (i << 2) | x);
+			else
+				wctdm_vpm_out(wc, x, 0x98 + i, 0x40 | i);
 		}
 
 		for (i = 0xB8; i < 0xC0; i++)



More information about the zaptel-commits mailing list