summaryrefslogtreecommitdiff
path: root/kernel/wctdm24xxp/wctdm24xxp.h
diff options
context:
space:
mode:
authorsruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-27 21:17:46 +0000
committersruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-27 21:17:46 +0000
commitcd81703764c4d2884c60f3632f15d5bfc44dc31d (patch)
tree93046f7721e2be48425642d4902bafe1ffee47f6 /kernel/wctdm24xxp/wctdm24xxp.h
parenta15be82083adbbc27fe2c5b8ce648f14b6eb93d3 (diff)
- Updated wctdm24xxp and wcte12xp driver which are now more tolerant of
systems which do not exhibit good real-time characteristics. - Bringing in improvements to battery alarm generation that was on kpflemings battery_alarms branch. (Issue #12099) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4096 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'kernel/wctdm24xxp/wctdm24xxp.h')
-rw-r--r--kernel/wctdm24xxp/wctdm24xxp.h41
1 files changed, 19 insertions, 22 deletions
diff --git a/kernel/wctdm24xxp/wctdm24xxp.h b/kernel/wctdm24xxp/wctdm24xxp.h
index fd7f39b..30e4fb9 100644
--- a/kernel/wctdm24xxp/wctdm24xxp.h
+++ b/kernel/wctdm24xxp/wctdm24xxp.h
@@ -27,20 +27,20 @@
#ifndef _WCTDM24XXP_H
#define _WCTDM24XXP_H
+#include "../zaptel.h"
+#include "../voicebus.h"
+#include <asm/semaphore.h>
+
#define NUM_FXO_REGS 60
#define WC_MAX_IFACES 128
/*!
* \brief Default ringer debounce (in ms)
- *
- * \todo This value differs from that in wctdm. In that module, it is 64 ms
- * instead of 128 ms. Which one is more appropriate?
*/
#define DEFAULT_RING_DEBOUNCE 128
-#define DEFAULT_BATT_DEBOUNCE 64 /* Battery debounce (in ms) */
-#define POLARITY_DEBOUNCE 64 /* Polarity debounce (in ms) */
-#define DEFAULT_BATT_THRESH 3 /* Anything under this is "no battery" */
+
+#define POLARITY_DEBOUNCE 64 /* Polarity debounce (in ms) */
#define OHT_TIMER 6000 /* How long after RING to retain OHT */
@@ -173,9 +173,15 @@ struct cmdq {
unsigned char isrshadow[ISR_COMMANDS];
};
+enum battery_state {
+ BATTERY_UNKNOWN = 0,
+ BATTERY_PRESENT,
+ BATTERY_LOST,
+};
+
struct wctdm {
- struct pci_dev *dev;
char *variety;
+ char board_name[80];
struct zt_span span;
unsigned char ios;
unsigned int sdi;
@@ -183,16 +189,12 @@ struct wctdm {
unsigned int intcount;
unsigned int rxints;
unsigned int txints;
- unsigned int intmask;
unsigned char txident;
unsigned char rxident;
int dead;
int pos;
int flags[NUM_CARDS];
- int freeregion;
int alt;
- int rdbl;
- int tdbl;
int curcard;
unsigned char ctlreg;
int cards;
@@ -215,19 +217,19 @@ struct wctdm {
wait_queue_head_t regq;
/* FXO Stuff */
union {
- struct {
+ struct fxo {
int wasringing;
int lastrdtx;
int ringdebounce;
int offhook;
int battdebounce;
- int nobatttimer;
- int battery;
+ int battalarm;
+ enum battery_state battery;
int lastpol;
int polarity;
int polaritydebounce;
} fxo;
- struct {
+ struct fxs {
int oldrxhook;
int debouncehook;
int lastrxhook;
@@ -261,14 +263,9 @@ struct wctdm {
int blinktimer;
#endif
#endif
- unsigned long iobase;
- dma_addr_t readdma;
- dma_addr_t writedma;
- dma_addr_t descripdma;
- volatile unsigned int *writechunk; /* Double-word aligned write memory */
- volatile unsigned int *readchunk; /* Double-word aligned read memory */
- volatile unsigned int *descripchunk; /* Descriptors */
+ struct voicebus *vb;
struct zt_chan chans[NUM_CARDS];
+ int initialized;
};