summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-08 17:28:28 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-12-08 17:28:28 +0000
commit72f1ad2419858a9a591bdd7deabedb750d8688e3 (patch)
tree22adc384b94d18fdee652ad166b2862c0fcd28bc
parent95a838e91d4d7d094be6c76a86d90a8d9a52128a (diff)
Merged revisions 3365 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r3365 | kpfleming | 2007-12-08 11:04:11 -0600 (Sat, 08 Dec 2007) | 5 lines clean up firmware handling across wct4xxp, wctc4xxp, wctdm24xxp and wcte12xp drivers to use consistent methods add non-hotplug firmware loading support to wctdm24xxp and wcte12xp add license and copyright headers to various files that did not have them clean up header inclusion in some files ........ git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3366 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--firmware/Makefile2
-rw-r--r--wct4xxp/base.c23
-rw-r--r--wctc4xxp/base.c46
-rw-r--r--wctdm24xxp/GpakApi.c5
-rw-r--r--wctdm24xxp/GpakCust.c9
-rw-r--r--wctdm24xxp/base.c57
-rw-r--r--wctdm24xxp/wctdm24xxp.h29
-rw-r--r--wcte12xp/GpakApi.c2
-rw-r--r--wcte12xp/base.c11
-rw-r--r--wcte12xp/vpmadt032.c79
-rw-r--r--wcte12xp/vpmadt032.h35
-rw-r--r--wcte12xp/wcte12xp.h34
12 files changed, 240 insertions, 92 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 9ce68d6..46cd2c6 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -1,5 +1,5 @@
#
-# Asterisk -- A telephony toolkit for Linux.
+# Zaptel
#
# Makefile for firmware downloading/installation
#
diff --git a/wct4xxp/base.c b/wct4xxp/base.c
index 45a8d32..19611a8 100644
--- a/wct4xxp/base.c
+++ b/wct4xxp/base.c
@@ -3093,6 +3093,9 @@ static void t4_vpm450_init(struct t4 *wc)
extern void _binary_zaptel_fw_oct6114_128_bin_size;
extern u8 _binary_zaptel_fw_oct6114_064_bin_start[];
extern u8 _binary_zaptel_fw_oct6114_128_bin_start[];
+#else
+ static const char oct064_firmware[] = "zaptel-fw-oct6114-064.bin";
+ static const char oct128_firmware[] = "zaptel-fw-oct6114-128.bin";
#endif
if (!vpmsupport) {
@@ -3122,9 +3125,9 @@ static void t4_vpm450_init(struct t4 *wc)
switch ((vpm_capacity = get_vpm450m_capacity(wc))) {
case 64:
#if defined(HOTPLUG_FIRMWARE)
- if ((request_firmware(&firmware, "zaptel-fw-oct6114-064.bin", &wc->dev->dev) != 0) ||
+ if ((request_firmware(&firmware, oct064_firmware, &wc->dev->dev) != 0) ||
!firmware) {
- printk("VPM450: firmware zaptel-fw-oct6114-064.bin not available from userspace\n");
+ printk("VPM450: firmware %s not available from userspace\n", oct064_firmware);
return;
}
#else
@@ -3134,15 +3137,15 @@ static void t4_vpm450_init(struct t4 *wc)
the size. The only way we can get the value of the symbol
is to take its address, so we define it as a pointer and
then cast that value to the proper type.
- */
+ */
embedded_firmware.size = (size_t) &_binary_zaptel_fw_oct6114_064_bin_size;
#endif
break;
case 128:
#if defined(HOTPLUG_FIRMWARE)
- if ((request_firmware(&firmware, "zaptel-fw-oct6114-128.bin", &wc->dev->dev) != 0) ||
+ if ((request_firmware(&firmware, oct128_firmware, &wc->dev->dev) != 0) ||
!firmware) {
- printk("VPM450: firmware zaptel-fw-oct6114-128.bin not available from userspace\n");
+ printk("VPM450: firmware %s not available from userspace\n", oct128_firmware);
return;
}
#else
@@ -3163,15 +3166,13 @@ static void t4_vpm450_init(struct t4 *wc)
if (!(wc->vpm450m = init_vpm450m(wc, laws, wc->numspans, firmware))) {
printk("VPM450: Failed to initialize\n");
-#if defined(HOTPLUG_FIRMWARE)
- release_firmware(firmware);
-#endif
+ if (firmware != &embedded_firmware)
+ release_firmware(firmware);
return;
}
-#if defined(HOTPLUG_FIRMWARE)
- release_firmware(firmware);
-#endif
+ if (firmware != &embedded_firmware)
+ release_firmware(firmware);
if (vpmdtmfsupport == -1) {
printk("VPM450: hardware DTMF disabled.\n");
diff --git a/wctc4xxp/base.c b/wctc4xxp/base.c
index 27aeb36..e30476a 100644
--- a/wctc4xxp/base.c
+++ b/wctc4xxp/base.c
@@ -52,14 +52,6 @@
#include <linux/zaptel.h>
#endif
-#ifdef HOTPLUG_FIRMWARE
-static const char *dte_firmware = "zaptel-fw-tc400m.bin";
-#else
-extern u8 _binary_tc400m_firmware_bin_start[];
-extern void _binary_tc400m_firmware_bin_size;
-#endif
-
-
/* #define USE_TEST_HW */
#define USE_TDM_CONFIG
#define QUIET_DSP
@@ -1669,19 +1661,15 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
static int initd_ifaces=0;
unsigned char g729_numchannels, g723_numchannels, min_numchannels, dte_firmware_ver, dte_firmware_ver_minor;
unsigned int complexfmts;
- struct firmware embedded_firmware = {
+
+ struct firmware embedded_firmware;
+ const struct firmware *firmware = &embedded_firmware;
#if !defined(HOTPLUG_FIRMWARE)
- /* Yes... this is weird. objcopy gives us a symbol containing
- the size of the firmware, not a pointer to a variable containing
- the size. The only way we can get the value of the symbol
- is to take its address, so we define it as a pointer and
- then cast that value to the proper type.
- */
- .size = (size_t) &_binary_tc400m_firmware_bin_size,
- .data = _binary_tc400m_firmware_bin_start,
+ extern void _binary_tc400m_firmware_bin_size;
+ extern u8 _binary_tc400m_firmware_bin_start[];
+#else
+ static const char tc400m_firmware[] = "zaptel-fw-tc400m.bin";
#endif
- };
- const struct firmware *firmware = &embedded_firmware;
if (!initd_ifaces) {
memset((void *)ifaces,0,(sizeof(struct wcdte *))*WC_MAX_IFACES);
@@ -1760,12 +1748,17 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
INIT_WORK(&wc->dte_work, dte_wque_run, wc);
#endif
-#ifdef HOTPLUG_FIRMWARE
- if ((request_firmware(&firmware, dte_firmware, &wc->dev->dev) != 0) || !firmware) {
- printk("TC400B: firmware %s not available from userspace\n", dte_firmware);
- return -1;
+#if defined(HOTPLUG_FIRMWARE)
+ if ((request_firmware(&firmware, tc400m_firmware, &wc->dev->dev) != 0) ||
+ !firmware) {
+ printk("TC400M: firmware %s not available from userspace\n", tc400m_firmware);
+ return -EIO;
}
+#else
+ embedded_firmware.data = _binary_tc400m_firmware_bin_start;
+ embedded_firmware.size = (size_t) &_binary_tc400m_firmware_bin_size;
#endif
+
dte_firmware_ver = firmware->data[0];
dte_firmware_ver_minor = firmware->data[16];
g729_numchannels = firmware->data[1];
@@ -1882,6 +1875,7 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
/* Start DMA */
wcdte_start_dma(wc);
+
if (wcdte_boot_processor(wc,firmware,1)) {
if (firmware != &embedded_firmware)
release_firmware(firmware);
@@ -1897,8 +1891,10 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic
vfree(wc);
return -EIO;
}
- if (wcdte_setup_channels(wc))
- {
+ if (firmware != &embedded_firmware)
+ release_firmware(firmware);
+
+ if (wcdte_setup_channels(wc)) {
/* Set Reset Low */
wcdte_stop_dma(wc);
/* Free Resources */
diff --git a/wctdm24xxp/GpakApi.c b/wctdm24xxp/GpakApi.c
index e52f9ab..5641e97 100644
--- a/wctdm24xxp/GpakApi.c
+++ b/wctdm24xxp/GpakApi.c
@@ -15,6 +15,11 @@
* 11/15/2006 - 24 TDM-TDM Channels EC release
*/
+#include <linux/version.h>
+#include <asm/semaphore.h>
+
+#include "zaptel.h"
+
#include "GpakHpi.h"
#include "GpakCust.h"
#include "GpakApi.h"
diff --git a/wctdm24xxp/GpakCust.c b/wctdm24xxp/GpakCust.c
index aefb406..4005e97 100644
--- a/wctdm24xxp/GpakCust.c
+++ b/wctdm24xxp/GpakCust.c
@@ -17,11 +17,14 @@
*
*/
-#include "GpakCust.h"
-#include "wctdm24xxp.h"
+#include <linux/version.h>
#include <linux/delay.h>
#include <asm/semaphore.h>
+#include "zaptel.h"
+#include "wctdm24xxp.h"
+#include "GpakCust.h"
+
char vpm150mtone_to_zaptone(GpakToneCodes_t tone)
{
switch (tone) {
@@ -386,5 +389,7 @@ int gpakReadFile(
fw->offset += count;
return count;
+#else
+ return 0;
#endif
}
diff --git a/wctdm24xxp/base.c b/wctdm24xxp/base.c
index b2aff24..97efb5f 100644
--- a/wctdm24xxp/base.c
+++ b/wctdm24xxp/base.c
@@ -1,5 +1,5 @@
/*
- * Wilcard TDM2400P TDM FXS/FXO Interface Driver for Zapata Telephony interface
+ * Wildcard TDM2400P TDM FXS/FXO Interface Driver for Zapata Telephony interface
*
* Written by Mark Spencer <markster@digium.com>
* Support for TDM800P and VPM150M by Matthew Fredrickson <creslin@digium.com>
@@ -42,22 +42,27 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00 db
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
-#ifdef VPM150M_SUPPORT
-#include <linux/firmware.h>
-#endif
#include <linux/workqueue.h>
#include <linux/delay.h>
#include <asm/semaphore.h>
-#include "../proslic.h"
-#include "../wctdm.h"
-#include "GpakCust.h"
-#include "GpakApi.h"
+#ifdef LINUX26
+#include <linux/moduleparam.h>
+#endif
-/* Comment to disable VPM support */
+#ifdef VPM150M_SUPPORT
+#include <linux/firmware.h>
+#endif
+
+#include "zaptel.h"
+#include "proslic.h"
+#include "wctdm.h"
#include "wctdm24xxp.h"
+#include "GpakCust.h"
+#include "GpakApi.h"
+
/*
Experimental max loop current limit for the proslic
Loop current limit is from 20 mA to 41 mA in steps of 3
@@ -234,13 +239,6 @@ static struct fxo_mode {
{ "YEMEN", 0, 0, 0, 0, 0, 0x3, 0, 0, },
};
-#include "zaptel.h"
-
-#ifdef LINUX26
-#include <linux/moduleparam.h>
-#endif
-
-
#define DEBUG_CARD (1 << 0)
#define DEBUG_ECHOCAN (1 << 1)
@@ -287,8 +285,6 @@ static int vpmsupport = 1;
static int vpmdtmfsupport = 0;
#define VPM_DEFAULT_DTMFTHRESHOLD 1250
static int dtmfthreshold = VPM_DEFAULT_DTMFTHRESHOLD;
-
-static const char *vpm150m_firmware = "zaptel-fw-vpmadt032.bin";
#endif
static int wctdm_init_proslic(struct wctdm *wc, int card, int fast , int manual, int sane);
@@ -3607,6 +3603,14 @@ static void wctdm_vpm150m_init(struct wctdm *wc)
#ifdef VPM150M_SUPPORT
struct wctdm_firmware fw;
+ struct firmware embedded_firmware;
+ const struct firmware *firmware = &embedded_firmware;
+#if !defined(HOTPLUG_FIRMWARE)
+ extern void _binary_vpmadt032_bin_size;
+ extern u8 _binary_vpmadt032_bin_start[];
+#else
+ static const char vpmadt032_firmware[] = "zaptel-fw-vpmadt032.bin";
+#endif
gpakDownloadStatus_t downloadstatus;
gpakPingDspStat_t pingstatus;
#endif
@@ -3698,10 +3702,18 @@ static void wctdm_vpm150m_init(struct wctdm *wc)
if (pingstatus || (version != 0x106)) {
#endif
- fw.offset = 0;
- if (request_firmware(&fw.fw, vpm150m_firmware, &wc->dev->dev)) {
- printk("Unable to locate VPMADT032.bin firmware!\n");
+#if defined(HOTPLUG_FIRMWARE)
+ if ((request_firmware(&firmware, vpmadt032_firmware, &wc->dev->dev) != 0) ||
+ !firmware) {
+ printk("VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
+ return;
}
+#else
+ embedded_firmware.data = _binary_vpmadt032_bin_start;
+ embedded_firmware.size = (size_t) &_binary_vpmadt032_bin_size;
+#endif
+ fw.fw = firmware;
+ fw.offset = 0;
set_bit(VPM150M_HPIRESET, &vpm150m->control);
@@ -3711,7 +3723,8 @@ static void wctdm_vpm150m_init(struct wctdm *wc)
printk("VPMADT032 Loading firwmare... ");
downloadstatus = gpakDownloadDsp(vpm150m->dspid, &fw);
- release_firmware(fw.fw);
+ if (firmware != &embedded_firmware)
+ release_firmware(firmware);
if (downloadstatus != 0) {
printk("Unable to download firmware to VPMADT032 with cause %d\n", downloadstatus);
diff --git a/wctdm24xxp/wctdm24xxp.h b/wctdm24xxp/wctdm24xxp.h
index 5fa99b9..71a473f 100644
--- a/wctdm24xxp/wctdm24xxp.h
+++ b/wctdm24xxp/wctdm24xxp.h
@@ -1,9 +1,32 @@
+/*
+ * Wildcard TDM2400P TDM FXS/FXO Interface Driver for Zapata Telephony interface
+ *
+ * Written by Mark Spencer <markster@digium.com>
+ * Support for TDM800P and VPM150M by Matthew Fredrickson <creslin@digium.com>
+ *
+ * Copyright (C) 2005, 2006, Digium, Inc.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
#ifndef _WCTDM24XXP_H
#define _WCTDM24XXP_H
-#include "../zaptel.h"
-#include <asm/semaphore.h>
-
#define NUM_FXO_REGS 60
#define WC_MAX_IFACES 128
diff --git a/wcte12xp/GpakApi.c b/wcte12xp/GpakApi.c
index 0b599c8..641de88 100644
--- a/wcte12xp/GpakApi.c
+++ b/wcte12xp/GpakApi.c
@@ -15,6 +15,8 @@
* 11/15/2006 - 24 TDM-TDM Channels EC release
*/
+#include "zaptel.h"
+
#include "GpakHpi.h"
#include "vpmadt032.h"
#include "GpakApi.h"
diff --git a/wcte12xp/base.c b/wcte12xp/base.c
index ba9265c..cdc54c2 100644
--- a/wcte12xp/base.c
+++ b/wcte12xp/base.c
@@ -1,5 +1,5 @@
/*
- * Digium, Inc. Wildcard TE12xP T1/PRI card Driver
+ * Digium, Inc. Wildcard TE12xP T1/E1 card Driver
*
* Written by Michael Spiceland <mspiceland@digium.com>
*
@@ -36,17 +36,14 @@
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h>
-
-#ifdef STANDALONE_ZAPATA
-#include "../zaptel.h"
-#else
-#include <zaptel/zaptel.h>
-#endif
+#include <linux/interrupt.h>
#ifdef LINUX26
#include <linux/moduleparam.h>
#endif
+#include "zaptel.h"
+
#include "../wct4xxp/wct4xxp.h" /* For certain definitions */
#include "wcte12xp.h"
diff --git a/wcte12xp/vpmadt032.c b/wcte12xp/vpmadt032.c
index 1de35ff..d8377a5 100644
--- a/wcte12xp/vpmadt032.c
+++ b/wcte12xp/vpmadt032.c
@@ -1,15 +1,49 @@
+/*
+ * Digium, Inc. Wildcard TE12xP T1/E1 card Driver
+ *
+ * Written by Michael Spiceland <mspiceland@digium.com>
+ *
+ * Adapted from the wctdm24xxp and wcte11xp drivers originally
+ * written by Mark Spencer <markster@digium.com>
+ * Matthew Fredrickson <creslin@digium.com>
+ * William Meadows <wmeadows@digium.com>
+ *
+ * Copyright (C) 2007, Digium, Inc.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/delay.h>
+#include <asm/semaphore.h>
+#include <linux/pci.h>
+#include <linux/firmware.h>
+#include <linux/list.h>
+
+#include "zaptel.h"
+
#include "wcte12xp.h"
#include "vpmadt032.h"
#include "GpakApi.h"
-#include <linux/delay.h>
-#include <asm/semaphore.h>
extern struct t1 *ifaces[WC_MAX_IFACES];
#ifdef VPM_SUPPORT
-static const char *vpm150m_firmware = "zaptel-fw-vpmadt032.bin";
-
inline void vpm150m_cmd_dequeue(struct t1 *wc, volatile unsigned char *writechunk, int whichframe)
{
unsigned long flags;
@@ -487,7 +521,7 @@ static void vpm150m_debug_bh(void *data)
{
struct vpm150m *vpm150m = data;
#else
-static void vpm150m_debug_bh(void *data)
+static void vpm150m_debug_bh(struct work_struct *data)
{
struct vpm150m *vpm150m = container_of(data, struct vpm150m, work_debug);
#endif
@@ -511,7 +545,7 @@ static void vpm150m_dtmf_bh(void *data)
{
struct vpm150m *vpm150m = data;
#else
-static void vpm150m_dtmf_bh(void *data)
+static void vpm150m_dtmf_bh(struct work_struct *data)
{
struct vpm150m *vpm150m = container_of(data, struct vpm150m, work_dtmf);
#endif
@@ -570,9 +604,10 @@ static void vpm150m_dtmf_bh(void *data)
debug_printk(1, "Channel %d: Detected DTMF tone %d of duration %d\n", channel + 1, tone, duration);
if (test_bit(channel, &wc->dtmfmask) && (eventdata.toneEvent.ToneDuration > 0)) {
- module_printk("DTMF detected channel=%d tone=%d duration=%d\n", channel + 1, tone, duration);
struct zt_chan *chan = &wc->chans[channel];
+ module_printk("DTMF detected channel=%d tone=%d duration=%d\n", channel + 1, tone, duration);
+
if ((tone != EndofMFDigit) && (zaptone != 0)) {
vpm150m->curtone[channel] = tone;
@@ -611,9 +646,18 @@ void t1_vpm150m_init(struct t1 *wc) {
unsigned short i;
unsigned short reg;
unsigned long flags;
- struct t1_firmware fw;
gpakPingDspStat_t pingstatus;
gpakDownloadStatus_t downloadstatus;
+ struct t1_firmware fw;
+ struct firmware embedded_firmware;
+ const struct firmware *firmware = &embedded_firmware;
+#if !defined(HOTPLUG_FIRMWARE)
+ extern void _binary_vpmadt032_bin_size;
+ extern u8 _binary_vpmadt032_bin_start[];
+#else
+ static const char vpmadt032_firmware[] = "zaptel-fw-vpmadt032.bin";
+#endif
+
#if 0
unsigned short omsg[4] = { 0xdead, 0xbeef, 0x1111, 0x2222};
unsigned short imsg[4];
@@ -821,11 +865,18 @@ void t1_vpm150m_init(struct t1 *wc) {
if (pingstatus || (version != 0x106)) {
#endif
- fw.offset = 0;
- if (request_firmware(&fw.fw, vpm150m_firmware, &wc->dev->dev)) {
- module_printk("Unable to locate .bin firmware file!\n");
- goto failed_exit;
+#if defined(HOTPLUG_FIRMWARE)
+ if ((request_firmware(&firmware, vpmadt032_firmware, &wc->dev->dev) != 0) ||
+ !firmware) {
+ printk("VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
+ return;
}
+#else
+ embedded_firmware.data = _binary_vpmadt032_bin_start;
+ embedded_firmware.size = (size_t) &_binary_vpmadt032_bin_size;
+#endif
+ fw.fw = firmware;
+ fw.offset = 0;
set_bit(VPM150M_HPIRESET, &vpm150m->control);
@@ -835,7 +886,8 @@ void t1_vpm150m_init(struct t1 *wc) {
module_printk("VPMADT032 Loading firwmare... ");
downloadstatus = gpakDownloadDsp(vpm150m->dspid, &fw);
- release_firmware(fw.fw);
+ if (firmware != &embedded_firmware)
+ release_firmware(firmware);
if (downloadstatus != 0) {
module_printk("Unable to download firmware to VPMADT032 with cause %d\n", downloadstatus);
@@ -1263,4 +1315,3 @@ int vpm150m_config_hw(struct t1 *wc)
}
#endif
-
diff --git a/wcte12xp/vpmadt032.h b/wcte12xp/vpmadt032.h
index ecb045b..55620f1 100644
--- a/wcte12xp/vpmadt032.h
+++ b/wcte12xp/vpmadt032.h
@@ -1,11 +1,37 @@
+/*
+ * Digium, Inc. Wildcard TE12xP T1/E1 card Driver
+ *
+ * Written by Michael Spiceland <mspiceland@digium.com>
+ *
+ * Adapted from the wctdm24xxp and wcte11xp drivers originally
+ * written by Mark Spencer <markster@digium.com>
+ * Matthew Fredrickson <creslin@digium.com>
+ * William Meadows <wmeadows@digium.com>
+ *
+ * Copyright (C) 2007, Digium, Inc.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
#ifndef _VPM150M_H
#define _VPM150M_H
-#include "../zaptel.h"
#include "wcte12xp.h"
-#include <linux/pci.h>
-#include <linux/firmware.h>
-#include <linux/list.h>
struct t1_firmware {
const struct firmware *fw;
@@ -116,4 +142,5 @@ int gpakReadFile(
unsigned char *pBuffer, /* pointer to buffer for storing bytes */
unsigned int NumBytes /* number of bytes to read */
);
+
#endif
diff --git a/wcte12xp/wcte12xp.h b/wcte12xp/wcte12xp.h
index 7c1560e..2edc109 100644
--- a/wcte12xp/wcte12xp.h
+++ b/wcte12xp/wcte12xp.h
@@ -1,8 +1,36 @@
+/*
+ * Digium, Inc. Wildcard TE12xP T1/E1 card Driver
+ *
+ * Written by Michael Spiceland <mspiceland@digium.com>
+ *
+ * Adapted from the wctdm24xxp and wcte11xp drivers originally
+ * written by Mark Spencer <markster@digium.com>
+ * Matthew Fredrickson <creslin@digium.com>
+ * William Meadows <wmeadows@digium.com>
+ *
+ * Copyright (C) 2007, Digium, Inc.
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
#ifndef _WCTE12XP_H
#define _WCTE12XP_H
-#include "../zaptel.h"
-
/* Comment to disable VPM support */
#define VPM_SUPPORT 1
@@ -63,7 +91,7 @@
#define module_printk(fmt, args...) printk("%s: " fmt, te12xp_driver.name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, te12xp_driver.name, __FUNCTION__, ## args)
- extern spinlock_t ifacelock;
+extern spinlock_t ifacelock;
struct command {
unsigned short address;