[zaptel-commits] kpfleming: branch mogorman/zaptel-1.2-transcoder r1931 - /team/mogorman/zapte...

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Tue Jan 23 10:56:34 MST 2007


Author: kpfleming
Date: Tue Jan 23 11:56:33 2007
New Revision: 1931

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1931
Log:
more name changing stuff

Modified:
    team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c

Modified: team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c?view=diff&rev=1931&r1=1930&r2=1931
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c (original)
+++ team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c Tue Jan 23 11:56:33 2007
@@ -52,14 +52,14 @@
 #include <linux/moduleparam.h>
 #ifdef HOTPLUG_FIRMWARE
 #include <linux/firmware.h>
-static const char *dte_firmware = "wctc4xxb_firm.bin";
+static const char *dte_firmware = "tc400m-firmware.bin";
 #else
 struct firmware {
 	size_t size;
 	u8 *data;
 };
-extern const u8 _binary_wctc4xxb_firm_bin_start[];
-extern const size_t _binary_wctc4xxb_firm_bin_size;
+extern const u8 _binary_tc400m_firmware_bin_start[];
+extern const size_t _binary_tc400m_firmware_bin_size;
 #endif
 
 /* #define USE_TEST_HW */
@@ -344,7 +344,7 @@
 	int flags;
 };
 
-static const struct wcdte_desc wcdte = { "Wildcard TC400B", 0 };
+static const struct wcdte_desc wcdte = { "Wildcard TC400P+TC400M", 0 };
 
 static struct wcdte *ifaces[WC_MAX_IFACES];
 
@@ -731,7 +731,7 @@
 	o2 += ERING_SIZE * 4;
 	
 	if (debug_packets) {
-		printk("wctc4xxb: RX: ");
+		printk("wctc4xxp: RX: ");
 		for (i = 0; i < debug_packets; i++)
 			printk("%02X", readchunk[i]);
 		printk("\n");
@@ -984,28 +984,28 @@
 	}
 		
 	if ((ints & 0x00008000) && debug)
-		printk("wctc4xxb: Abnormal Interrupt: ");
+		printk("wctc4xxp: Abnormal Interrupt: ");
 
 	if ((ints & 0x00002000) && debug)
-		printk("wctc4xxb: Fatal Bus Error INT\n");
+		printk("wctc4xxp: Fatal Bus Error INT\n");
 
 	if ((ints & 0x00000100) && debug)
-		printk("wctc4xxb: Receive Stopped INT\n");
+		printk("wctc4xxp: Receive Stopped INT\n");
 
 	if ((ints & 0x00000080) && debug)
-		printk("wctc4xxb: Receive Desciptor Unavailable INT\n");
+		printk("wctc4xxp: Receive Desciptor Unavailable INT\n");
 
 	if ((ints & 0x00000020) && debug)
-		printk("wctc4xxb: Transmit Under-flow INT\n");
+		printk("wctc4xxp: Transmit Under-flow INT\n");
 
 	if ((ints & 0x00000008) && debug)
-		printk("wctc4xxb: Jabber Timer Time-out INT\n");
+		printk("wctc4xxp: Jabber Timer Time-out INT\n");
 
 	if ((ints & 0x00000004) && debug)
-		printk("wctc4xxb: Transmit Descriptor Unavailable INT\n");
+		printk("wctc4xxp: Transmit Descriptor Unavailable INT\n");
 
 	if ((ints & 0x00000002) && debug)
-		printk("wctc4xxb: Transmit Processor Stopped INT\n");
+		printk("wctc4xxp: Transmit Processor Stopped INT\n");
 
 	return IRQ_RETVAL(1);
 }
@@ -1197,7 +1197,7 @@
 	/* Turn off auto negotiation */
 	write_phy(wc, 0, 0x2100);
 	if (debug)
-		printk("wctc4xxb: PHY register 0 = %X", read_phy(wc, 0));
+		printk("wctc4xxp: PHY register 0 = %X", read_phy(wc, 0));
 	
 	/* Set reset */
 	setctl(wc, 0x00A0, 0x04000000);
@@ -1227,7 +1227,7 @@
 
 	reg = getctl(wc, 0x00fc);
 	if (debug)
-		printk("wctc4xxb: LINK STATUS: reg(0xfc) = %X\n", reg);
+		printk("wctc4xxp: LINK STATUS: reg(0xfc) = %X\n", reg);
 
 	reg = getctl(wc, 0x00A0);
 
@@ -1270,7 +1270,7 @@
 	/* Turn on booted LED */
 	setctl(wc, 0x00A0, 0x04080000);
 	if (debug)
-		printk("wctc4xxb: Successfully booted DTE processor.\n");
+		printk("wctc4xxp: Successfully booted DTE processor.\n");
 
 	return(0);
 }
@@ -1379,15 +1379,15 @@
 	struct firmware embedded_firmware;
 	const struct firmware *firmware = &embedded_firmware;
 #if !defined(HOTPLUG_FIRMWARE)
-	extern const u8 _binary_wctc4xxb_firm_bin_start[];
-	extern const size_t _binary_wctc4xxb_firm_bin_size;
+	extern const u8 _binary_wctc4xxp_firm_bin_start[];
+	extern const size_t _binary_wctc4xxp_firm_bin_size;
 #endif
 
 	for (x = 0; x < (sizeof(ifaces) / sizeof(ifaces[0])); x++)
 		if (!ifaces[x]) break;
 
 	if (x >= WC_MAX_IFACES) {
-		printk("wctc4xxb: Too many interfaces\n");
+		printk("wctc4xxp: Too many interfaces\n");
 		return -EIO;
 	}
 
@@ -1411,13 +1411,13 @@
 	wc->timeout = 1 * HZ;		/* 1 sec */
 	
 	/* Keep track of whether we need to free the region */
-	if (request_region(wc->iobase, 0xff, "wctc4xxb")) 
+	if (request_region(wc->iobase, 0xff, "wctc4xxp")) 
 		wc->freeregion = 1;
 	
 	/* Allocate enough memory for all TX buffers, RX buffers, and descriptors */
 	wc->writechunk = (int *) pci_alloc_consistent(pdev, PCI_WINDOW_SIZE, &wc->writedma);
 	if (!wc->writechunk) {
-		printk("wctc4xxb: Unable to allocate DMA-able memory\n");
+		printk("wctc4xxp: Unable to allocate DMA-able memory\n");
 		if (wc->freeregion)
 			release_region(wc->iobase, 0xff);
 
@@ -1437,18 +1437,18 @@
 	init_waitqueue_head(&wc->regq);
 	
 	/* Initialize the work queue */
-	wc->dte_wq = create_workqueue("wctc4xxb");
+	wc->dte_wq = create_workqueue("wctc4xxp");
 
 	INIT_WORK(&wc->dte_work, (void (*)(void *))dte_wque_run, wc);
 
 #ifdef HOTPLUG_FIRMWARE
 	if ((request_firmware(&firmware, dte_firmware, &wc->dev->dev) != 0) || !firmware) {
-		printk("wctc4xxb: firmware %s not available from userspace\n", dte_firmware);
+		printk("wctc4xxp: firmware %s not available from userspace\n", dte_firmware);
 		return -1;
 	}
 #else
-	embedded_firmware.data = _binary_wctc4xxb_firm_bin_start;
-	embedded_firmware.size = _binary_wctc4xxb_firm_bin_size;
+	embedded_firmware.data = _binary_wctc4xxp_firm_bin_start;
+	embedded_firmware.size = _binary_wctc4xxp_firm_bin_size;
 #endif
 
 	dte_firmware_ver = firmware->data[0];
@@ -1519,8 +1519,6 @@
 	zt_transcoder_register(uencode);
 	zt_transcoder_register(udecode);
 	
-	printk("Zaptel DTE (%s) Transcoder support LOADED (firm ver = %d)\n", wc->complexname, dte_firmware_ver);
-	
 	/* Enable bus mastering */
 	pci_set_master(pdev);
 	
@@ -1528,7 +1526,7 @@
 	pci_set_drvdata(pdev, wc);
 	
 	if (request_irq(pdev->irq, interrupt, SA_SHIRQ, "tc400b", wc)) {
-		printk("wctc4xxb: Unable to request IRQ %d\n", pdev->irq);
+		printk("wctc4xxp: Unable to request IRQ %d\n", pdev->irq);
 		if (wc->freeregion)
 			release_region(wc->iobase, 0xFF);
 		pci_free_consistent(pdev, PCI_WINDOW_SIZE, (void *) wc->writechunk, wc->writedma);
@@ -1587,7 +1585,8 @@
 	if (debug)
 		printk("wcdte debug: (post-boot) Reg fc is %08x\n", reg);
 	
-	printk("Found and successfully installed a Wildcard TC: %s\n", wc->variety);
+ 	printk("wctc4xxp: %s supporting '%s' with firmware version '%d'\n", wc->variety, wc->complexname, dte_firmware_ver);
+	
 	res = 0;
 
 	return res;
@@ -1611,8 +1610,8 @@
 		return;
 
 	if (debug) {
-		printk("wctc4xxb debug: wc->ztsnd_rtx = %d\n", wc->ztsnd_rtx);
-		printk("wctc4xxb debug: wc->ztsnd_0010_rtx = %d\n", wc->ztsnd_0010_rtx);
+		printk("wctc4xxp debug: wc->ztsnd_rtx = %d\n", wc->ztsnd_rtx);
+		printk("wctc4xxp debug: wc->ztsnd_0010_rtx = %d\n", wc->ztsnd_0010_rtx);
 		
 		for(i = 0; i < wc->numchannels; i++) {
 			ztc_en = &(wc->uencode->channels[i]);
@@ -1621,8 +1620,8 @@
 			ztc_de = &(wc->udecode->channels[i]);
 			st_de = ztc_de->pvt;
 			
-			printk("wctc4xxb debug: en[%d] snt = %d, rcv = %d [%d]\n", i, st_en->packets_sent, st_en->packets_received, st_en->packets_sent - st_en->packets_received);
-			printk("wctc4xxb debug: de[%d] snt = %d, rcv = %d [%d]\n", i, st_de->packets_sent, st_de->packets_received, st_de->packets_sent - st_de->packets_received);
+			printk("wctc4xxp debug: en[%d] snt = %d, rcv = %d [%d]\n", i, st_en->packets_sent, st_en->packets_received, st_en->packets_sent - st_en->packets_received);
+			printk("wctc4xxp debug: de[%d] snt = %d, rcv = %d [%d]\n", i, st_de->packets_sent, st_de->packets_received, st_de->packets_sent - st_de->packets_received);
 		}
 	}
 	
@@ -1663,7 +1662,7 @@
 MODULE_DEVICE_TABLE(pci, pci_tbl);
 
 static struct pci_driver driver = {
-	name: 	"wctc4xxb",
+	name: 	"wctc4xxp",
 	probe: 	init_one,
 	remove:	__devexit_p(remove_one),
 	suspend: NULL,
@@ -1685,7 +1684,7 @@
 module_param(mode, charp, 0600);
 module_param(debug_packets, int, 0600);
 module_param(debug_cmd_packets, int, 0600);
-MODULE_DESCRIPTION("Wildcard TC400B Transcoder");
+MODULE_DESCRIPTION("Wildcard TC400P+TC400M Transcoder");
 MODULE_AUTHOR("John Sloan <jsloan at digium.com>");
 MODULE_LICENSE("GPL");
 



More information about the zaptel-commits mailing list