[zaptel-commits] tzafrir: branch 1.2 r4454 - /branches/1.2/xpp/init_card_3_30

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon Aug 4 10:39:02 CDT 2008


Author: tzafrir
Date: Mon Aug  4 10:39:01 2008
New Revision: 4454

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4454
Log:
Minor BRI initlization improvements.

Modified:
    branches/1.2/xpp/init_card_3_30

Modified: branches/1.2/xpp/init_card_3_30
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/init_card_3_30?view=diff&rev=4454&r1=4453&r2=4454
==============================================================================
--- branches/1.2/xpp/init_card_3_30 (original)
+++ branches/1.2/xpp/init_card_3_30 Mon Aug  4 10:39:01 2008
@@ -286,20 +286,20 @@
 	#main::logit "xhfc_ph_command(portnum=$portnum)";
 	if ("$cmd" eq "HFC_L1_ACTIVATE_TE") {
 		su_sel($portnum);	# Select port
-		BRI::gen "$portnum	WD	30	60";			# A_SU_WR_STA = (M_SU_ACT & 0x03)
-								# (set activation)
+		BRI::gen "$portnum	WD	30	60";		# A_SU_WR_STA = (M_SU_ACT & 0x03)
+									# (set activation)
 	} elsif ("$cmd" eq "HFC_L1_FORCE_DEACTIVATE_TE") {
 		su_sel($portnum);	# Select port
-		BRI::gen "$portnum	WD	30	40";			# A_SU_WR_STA = (M_SU_ACT & 0x02)
-								# (set deactivation)
+		BRI::gen "$portnum	WD	30	40";		# A_SU_WR_STA = (M_SU_ACT & 0x02)
+									# (set deactivation)
 	} elsif ("$cmd" eq "HFC_L1_ACTIVATE_NT") {
 		su_sel($portnum);	# Select port
-		BRI::gen "$portnum	WD	30	E0";			# A_SU_WR_STA = (M_SU_ACT & 0x03) | 0x80
-								# (set activation + NT)
+		BRI::gen "$portnum	WD	30	E0";		# A_SU_WR_STA = (M_SU_ACT & 0x03) | 0x80
+									# (set activation + NT)
 	} elsif ("$cmd" eq "HFC_L1_DEACTIVATE_NT") {
 		su_sel($portnum);	# Select port
-		BRI::gen "$portnum	WD	30	40";			# A_SU_WR_STA = (M_SU_ACT & 0x02)
-								# (set deactivation)
+		BRI::gen "$portnum	WD	30	40";		# A_SU_WR_STA = (M_SU_ACT & 0x02)
+									# (set deactivation)
 	}
 }
 
@@ -347,7 +347,7 @@
 	main::logit "init_xhfc($portnum)";
 	BRI::gen "#--------------------------- init_xhfc";
 	BRI::gen "$portnum	WD	0D	00";	# r_FIFO_MD: 16 fifos,
-					# 64 bytes for TX and RX each (FIFO mode config)
+							# 64 bytes for TX and RX each (FIFO mode config)
 
 	# software reset to enable R_FIFO_MD setting
 	BRI::gen "$portnum	WD	00	08";	# R_CIRM = M_SRES (soft reset)
@@ -356,29 +356,22 @@
 
 	# amplitude
 	BRI::gen "$portnum	WD	46	80";	# R_PWM_MD: (PWM output mode register)
-					#           PWM push to zero only
+							#           PWM push to zero only
 	BRI::gen "$portnum	WD	39	18";	# R_PWM1: (modulator register for PWM1)
-					#          set duty cycle
+							#          set duty cycle
 
 	BRI::gen "$portnum	WD	0C	11";	# R_FIFO_THRES: (FIFO fill lvl control register)
-					#               RX/TX threshold = 16 bytes
-
-	#	--> Wait until (R_STATUS & (M_BUSY | M_PCM_INIT))
- 	# M_BUSY status will be checked after fifo selection
-	BRI::gen "$portnum	WD	0F	80";
-	# set PCM !master mode
+							#               RX/TX threshold = 16 bytes
+
+	# set PCM bus mode to slave by default
 	BRI::gen "$portnum	WD	14	08";	# R_PCM_MD0 = PCM slave mode, F0IO duration is 2 HFC_PCLK's
-
-					# (C4IO, F0IO are inputs)
-
-	# set pll adjust
-	#	WD	14	90	# R_PCM_MD0: Index value to select
-					#            the register at address 15
-	#	WD	15	2C	# R_PCM_MD1: V_PLL_ADJ (DPLL adjust speed), C4IO is 16.384MHz(128 time slots) 
-					#            in the last slot of PCM frame
-	BRI::gen "$portnum	WI	14	98	20";	# R_PCM_MD1: V_PLL_ADJ
-						#            (DPLL adjust speed) in the
-						#            last slot of PCM frame
+							# (C4IO, F0IO are inputs)
+
+	BRI::gen "$portnum	WD	14	98";	# R_PCM_MD0: Index value to select
+										#            the register at address 15
+	BRI::gen "$portnum	WD	15	20";	# R_PCM_MD1: V_PLL_ADJ (DPLL adjust speed), 
+							#            in the last slot of PCM frame
+							#            V_PCM_DR, C4IO  is 16.384MHz(128 time slots) 
 
 	BRI::gen "$portnum	WD	4C	03";	# GPIOGPIO function (not PWM) on GPIO0 and GPIO1 pins
 	BRI::gen "$portnum	WD	4A	03";	# Output enable for GPIO0 and GPIO1 pins




More information about the zaptel-commits mailing list