/* $Id: hisax.h,v 2.64.2.4 2004/02/11 13:21:33 keil Exp $
*
* Basic declarations, defines and prototypes
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/major.h>
#include <asm/io.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/ioport.h>
#include <linux/timer.h>
#include <linux/wait.h>
#include <linux/isdnif.h>
#include <linux/tty.h>
#include <linux/serial_reg.h>
#include <linux/netdevice.h>
#define ERROR_STATISTIC
#define REQUEST 0
#define CONFIRM 1
#define INDICATION 2
#define RESPONSE 3
#define HW_ENABLE 0x0000
#define HW_RESET 0x0004
#define HW_POWERUP 0x0008
#define HW_ACTIVATE 0x0010
#define HW_DEACTIVATE 0x0018
#define HW_INFO1 0x0010
#define HW_INFO2 0x0020
#define HW_INFO3 0x0030
#define HW_INFO4 0x0040
#define HW_INFO4_P8 0x0040
#define HW_INFO4_P10 0x0048
#define HW_RSYNC 0x0060
#define HW_TESTLOOP 0x0070
#define CARD_RESET 0x00F0
#define CARD_INIT 0x00F2
#define CARD_RELEASE 0x00F3
#define CARD_TEST 0x00F4
#define CARD_AUX_IND 0x00F5
#define PH_ACTIVATE 0x0100
#define PH_DEACTIVATE 0x0110
#define PH_DATA 0x0120
#define PH_PULL 0x0130
#define PH_TESTLOOP 0x0140
#define PH_PAUSE 0x0150
#define MPH_ACTIVATE 0x0180
#define MPH_DEACTIVATE 0x0190
#define MPH_INFORMATION 0x01A0
#define DL_ESTABLISH 0x0200
#define DL_RELEASE 0x0210
#define DL_DATA 0x0220
#define DL_FLUSH 0x0224
#define DL_UNIT_DATA 0x0230
#define MDL_BC_RELEASE 0x0278 // Formula-n enter:now
#define MDL_BC_ASSIGN 0x027C // Formula-n enter:now
#define MDL_ASSIGN 0x0280
#define MDL_REMOVE 0x0284
#define MDL_ERROR 0x0288
#define MDL_INFO_SETUP 0x02E0
#define MDL_INFO_CONN 0x02E4
#define MDL_INFO_REL 0x02E8
#define CC_SETUP 0x0300
#define CC_RESUME 0x0304
#define CC_MORE_INFO 0x0310
#define CC_IGNORE 0x0320
#define CC_REJECT 0x0324
#define CC_SETUP_COMPL 0x0330
#define CC_PROCEEDING 0x0340
#define CC_ALERTING 0x0344
#define CC_PROGRESS 0x0348
#define CC_CONNECT 0x0350
#define CC_CHARGE 0x0354
#define CC_NOTIFY 0x0358
#define CC_DISCONNECT 0x0360
#define CC_RELEASE 0x0368
#define CC_SUSPEND 0x0370
#define CC_PROCEED_SEND 0x0374
#define CC_REDIR 0x0378
#define CC_T302 0x0382
#define CC_T303 0x0383
#define CC_T304 0x0384
#define CC_T305 0x0385
#define CC_T308_1 0x0388
#define CC_T308_2 0x038A
#define CC_T309 0x0309
#define CC_T310 0x0390
#define CC_T313 0x0393
#define CC_T318 0x0398
#define CC_T319 0x0399
#define CC_TSPID 0x03A0
#define CC_NOSETUP_RSP 0x03E0
#define CC_SETUP_ERR 0x03E1
#define CC_SUSPEND_ERR 0x03E2
#define CC_RESUME_ERR 0x03E3
#define CC_CONNECT_ERR 0x03E4
#define CC_RELEASE_ERR 0x03E5
#define CC_RESTART 0x03F4
#define CC_TDSS1_IO 0x13F4 /* DSS1 IO user timer */
#define CC_TNI1_IO 0x13F5 /* NI1 IO user timer */
/* define maximum number of possible waiting incoming calls */
#define MAX_WAITING_CALLS 2
#ifdef __KERNEL__
/* include l3dss1 & ni1 specific process structures, but no other defines */
#ifdef CONFIG_HISAX_EURO
#define l3dss1_process
#include "l3dss1.h"
#undef l3dss1_process
#endif /* CONFIG_HISAX_EURO */
#ifdef CONFIG_HISAX_NI1
#define l3ni1_process
#include "l3ni1.h"
#undef l3ni1_process
#endif /* CONFIG_HISAX_NI1 */
#define MAX_DFRAME_LEN 260
#define MAX_DFRAME_LEN_L1 300
#define HSCX_BUFMAX 4096
#define MAX_DATA_SIZE (HSCX_BUFMAX - 4)
#define MAX_DATA_MEM (HSCX_BUFMAX + 64)
#define RAW_BUFMAX (((HSCX_BUFMAX*6)/5) + 5)
#define MAX_HEADER_LEN 4
#define MAX_WINDOW 8
#define MAX_MON_FRAME 32
#define MAX_DLOG_SPACE 2048
#define MAX_BLOG_SPACE 256
/* #define I4L_IRQ_FLAG SA_INTERRUPT */
#define I4L_IRQ_FLAG 0
/*
* Statemachine
*/
struct FsmInst;
typedef void (* FSMFNPTR)(struct FsmInst *, int, void *);
struct Fsm {
FSMFNPTR *jumpmatrix;
int state_count, event_count;
char **strEvent, **strState;
};
struct FsmInst {
struct Fsm *fsm;
int state;
int debug;
void *userdata;
int userint;
void (*printdebug) (struct FsmInst *, char *,