diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | wct4xxp/base.c | 18 | ||||
-rw-r--r-- | wctc4xxp/base.c | 45 | ||||
-rw-r--r-- | wctdm24xxp/GpakApi.c | 5 | ||||
-rw-r--r-- | wctdm24xxp/GpakCust.c | 9 | ||||
-rw-r--r-- | wctdm24xxp/Makefile.kernel26 | 8 | ||||
-rw-r--r-- | wctdm24xxp/base.c | 61 | ||||
-rw-r--r-- | wctdm24xxp/wctdm24xxp.h | 29 | ||||
-rw-r--r-- | wcte12xp/GpakApi.c | 2 | ||||
-rw-r--r-- | wcte12xp/Makefile.kernel26 | 10 | ||||
-rw-r--r-- | wcte12xp/VPMADT032.bin | bin | 0 -> 60980 bytes | |||
-rw-r--r-- | wcte12xp/base.c | 11 | ||||
-rw-r--r-- | wcte12xp/vpmadt032.c | 77 | ||||
-rw-r--r-- | wcte12xp/vpmadt032.h | 37 | ||||
-rw-r--r-- | wcte12xp/wcte12xp.h | 34 |
15 files changed, 256 insertions, 96 deletions
@@ -489,11 +489,13 @@ install-udev: devices firmware: ifeq ($(HOTPLUG_FIRMWARE),yes) if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \ - install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ + install -m 644 wct4xxp/*.ima $(DESTDIR)/usr/lib/hotplug/firmware; \ + install -m 644 wctc4xxp/*.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ install -m 644 wctdm24xxp/*.bin $(DESTDIR)/usr/lib/hotplug/firmware; \ fi if [ -d $(DESTDIR)/lib/firmware ]; then \ - install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)/lib/firmware; \ + install -m 644 wct4xxp/*.ima $(DESTDIR)/lib/firmware; \ + install -m 644 wctc4xxp/*.bin $(DESTDIR)/lib/firmware; \ install -m 644 wctdm24xxp/*.bin $(DESTDIR)/lib/firmware; \ fi @echo "Installed firmware" diff --git a/wct4xxp/base.c b/wct4xxp/base.c index e656065..f48bc6e 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -45,11 +45,6 @@ #include "wct4xxp.h" #include "vpm450m.h" -#ifdef HOTPLUG_FIRMWARE -static const char *oct064_firmware = "OCT6114-64D.ima"; -static const char *oct128_firmware = "OCT6114-128D.ima"; -#endif - /* * Tasklets provide better system interactive response at the cost of the * possibility of losing a frame of data at very infrequent intervals. If @@ -2726,6 +2721,9 @@ static void t4_vpm450_init(struct t4 *wc) extern void _binary_OCT6114_128D_ima_size; extern u8 _binary_OCT6114_64D_ima_start[]; extern u8 _binary_OCT6114_128D_ima_start[]; +#else + static const char oct064_firmware[] = "OCT6114-64D.ima"; + static const char oct128_firmware[] = "OCT6114-128D.ima"; #endif if (!vpmsupport) { @@ -2796,15 +2794,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 1302f76..9bba935 100644 --- a/wctc4xxp/base.c +++ b/wctc4xxp/base.c @@ -52,13 +52,6 @@ #include <linux/zaptel.h> #endif -#ifdef HOTPLUG_FIRMWARE -static const char *dte_firmware = "tc400m-firmware.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 @@ -1669,19 +1662,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[] = "tc400m-firmware.bin"; #endif - }; - const struct firmware *firmware = &embedded_firmware; if (!initd_ifaces) { memset((void *)ifaces,0,(sizeof(struct wcdte *))*WC_MAX_IFACES); @@ -1760,12 +1749,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 +1876,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 +1892,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/Makefile.kernel26 b/wctdm24xxp/Makefile.kernel26 index f9fbf0c..43b641c 100644 --- a/wctdm24xxp/Makefile.kernel26 +++ b/wctdm24xxp/Makefile.kernel26 @@ -4,9 +4,17 @@ EXTRA_CFLAGS := -I$(src)/.. -Wno-undef wctdm24xxp-objs := base.o GpakCust.o GpakApi.o +ifneq ($(HOTPLUG_FIRMWARE),yes) +wctdm24xxp-objs += firmware_vpmadt032.o +endif + $(obj)/base.o: $(src)/GpakCust.h $(src)/wctdm24xxp.h $(obj)/base.o: $(src)/../zaptel.h $(obj)/GpakCust.o: $(src)/GpakCust.h $(obj)/GpakApi.o: $(src)/GpakApi.h + +$(obj)/firmware_vpmadt032.o: $(src)/VPMADT032.bin $(obj)/base.o + @echo Making firmware object file for $(notdir $<) + @cd $(src) && ../build_tools/make_firmware_object $(notdir $<) $@ $(obj)/base.o diff --git a/wctdm24xxp/base.c b/wctdm24xxp/base.c index 81dfc74..740af36 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> @@ -32,22 +32,27 @@ #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 @@ -224,17 +229,6 @@ static struct fxo_mode { { "YEMEN", 0, 0, 0, 0, 0, 0x3, 0, 0, }, }; -#ifdef STANDALONE_ZAPATA -#include "zaptel.h" -#else -#include <linux/zaptel.h> -#endif - -#ifdef LINUX26 -#include <linux/moduleparam.h> -#endif - - #define DEBUG_CARD (1 << 0) #define DEBUG_ECHOCAN (1 << 1) @@ -275,8 +269,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 = "VPMADT032.bin"; #endif static int wctdm_init_proslic(struct wctdm *wc, int card, int fast , int manual, int sane); @@ -2969,6 +2961,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[] = "VPMADT032.bin"; +#endif gpakDownloadStatus_t downloadstatus; gpakPingDspStat_t pingstatus; #endif @@ -3060,10 +3060,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); @@ -3073,7 +3081,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 40f919c..98f9a36 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/Makefile.kernel26 b/wcte12xp/Makefile.kernel26 index c692631..c41e8f1 100644 --- a/wcte12xp/Makefile.kernel26 +++ b/wcte12xp/Makefile.kernel26 @@ -1,9 +1,19 @@ obj-m += wcte12xp.o +EXTRA_CFLAGS := -I$(src)/.. -Wno-undef + wcte12xp-objs := base.o vpmadt032.o GpakApi.o +ifneq ($(HOTPLUG_FIRMWARE),yes) +wcte12xp-objs += firmware_vpmadt032.o +endif + $(obj)/base.o: $(src)/../zaptel.h $(obj)/vpmadt032.o: $(src)/vpmadt032.h $(obj)/GpakApi.o: $(src)/GpakApi.h + +$(obj)/firmware_vpmadt032.o: $(src)/VPMADT032.bin $(obj)/base.o + @echo Making firmware object file for $(notdir $<) + @cd $(src) && ../build_tools/make_firmware_object $(notdir $<) $@ $(obj)/base.o diff --git a/wcte12xp/VPMADT032.bin b/wcte12xp/VPMADT032.bin Binary files differnew file mode 100644 index 0000000..e882060 --- /dev/null +++ b/wcte12xp/VPMADT032.bin diff --git a/wcte12xp/base.c b/wcte12xp/base.c index 3bc49ae..fd5a010 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 92af63e..aa9cb9d 100644 --- a/wcte12xp/vpmadt032.c +++ b/wcte12xp/vpmadt032.c @@ -1,8 +1,44 @@ +/* + * 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]; @@ -485,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 @@ -509,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 @@ -568,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; @@ -609,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[] = "VPMADT032.bin"; +#endif + #if 0 unsigned short omsg[4] = { 0xdead, 0xbeef, 0x1111, 0x2222}; unsigned short imsg[4]; @@ -819,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); @@ -833,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); @@ -1261,4 +1315,3 @@ int vpm150m_config_hw(struct t1 *wc) } #endif - diff --git a/wcte12xp/vpmadt032.h b/wcte12xp/vpmadt032.h index 5d8ae53..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; @@ -45,8 +71,6 @@ typedef struct t1_firmware* GPAK_FILE_ID; /* G.PAK Download file identifier */ #define VPM150M_ACTIVE 4 #define VPM150M_MAX_DATA 1 -static const char *vpm150m_firmware = "VPMADT032.bin"; - struct vpm150m_cmd { unsigned short address; unsigned short data[VPM150M_MAX_DATA]; @@ -118,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; |