Commit d52531b8 authored by Linus Torvalds's avatar Linus Torvalds

This removes the old Eicon ISDN driver.

The config entries etc were already removed earlier.
parent f69c2d56
/*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/fs.h>
#undef N_DATA
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include "adapter.h"
#include "uxio.h"
MODULE_DESCRIPTION("ISDN4Linux: Driver for Eicon Diva Server cards");
MODULE_AUTHOR("Armin Schindler");
MODULE_LICENSE("GPL");
void DivasInitDpc(void);
#ifdef MODULE
#include "idi.h"
void DIVA_DIDD_Write(DESCRIPTOR *, int);
EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Read);
EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Write);
EXPORT_SYMBOL_NOVERS(DivasPrintf);
#endif
int DivasCardsDiscover(void);
static int __init
divas_init(void)
{
printk(KERN_DEBUG "DIVA Server Driver - initialising\n");
printk(KERN_DEBUG "DIVA Server Driver - Version 2.0.16\n");
#if !defined(CONFIG_PCI)
printk(KERN_WARNING "CONFIG_PCI is not defined!\n");
return -ENODEV;
#endif
DivasInitDpc();
if (DivasCardsDiscover() < 0)
{
printk(KERN_WARNING "Divas: Not loaded\n");
return -ENODEV;
}
return 0;
}
static void __exit
divas_exit(void)
{
card_t *pCard;
word wCardIndex;
extern int Divas_major;
printk(KERN_DEBUG "DIVA Server Driver - unloading\n");
pCard = DivasCards;
for (wCardIndex = 0; wCardIndex < MAX_CARDS; wCardIndex++)
{
if ((pCard->hw) && (pCard->hw->in_use))
{
(*pCard->card_reset)(pCard);
UxIsrRemove(pCard->hw, pCard);
UxCardHandleFree(pCard->hw);
if(pCard->e_tbl != NULL)
{
kfree(pCard->e_tbl);
}
if(pCard->hw->card_type == DIA_CARD_TYPE_DIVA_SERVER_B)
{
release_region(pCard->hw->io_base,0x20);
release_region(pCard->hw->reset_base,0x80);
}
// If this is a 4BRI ...
if (pCard->hw->card_type == DIA_CARD_TYPE_DIVA_SERVER_Q)
{
// Skip over the next 3 virtual adapters
wCardIndex += 3;
// But free their handles
pCard++;
UxCardHandleFree(pCard->hw);
if(pCard->e_tbl != NULL)
{
kfree(pCard->e_tbl);
}
pCard++;
UxCardHandleFree(pCard->hw);
if(pCard->e_tbl != NULL)
{
kfree(pCard->e_tbl);
}
pCard++;
UxCardHandleFree(pCard->hw);
if(pCard->e_tbl != NULL)
{
kfree(pCard->e_tbl);
}
}
}
pCard++;
}
unregister_chrdev(Divas_major, "Divas");
}
module_init(divas_init);
module_exit(divas_exit);
#
# Config.in for Eicon active ISDN support
#
config ISDN_DRV_EICON
bool "Eicon active card support"
help
Say Y here if you have an Eicon active ISDN card. In order to use
this card, additional firmware is necessary, which has to be loaded
into the card using the eiconctrl utility which is part of the
latest isdn4k-utils package. Please read the file
<file:Documentation/isdn/README.eicon> for more information.
choice
prompt "Eicon active card support"
optional
depends on ISDN_DRV_EICON && ISDN && m
config ISDN_DRV_EICON_DIVAS
tristate "Eicon driver"
depends on PCI
help
Enable this option if you want the eicon driver as standalone
version with no interface to the ISDN4Linux isdn module. If you
say Y here, the eicon module only supports the Diva Server PCI
cards and will provide its own IDI interface. You should say N
here.
config ISDN_DRV_EICON_OLD
tristate "Legacy driver"
help
Say Y here to use your Eicon active ISDN card with ISDN4Linux
isdn module.
config ISDN_DRV_EICON_PCI
bool "Eicon PCI DIVA Server BRI/PRI/4BRI support"
depends on ISDN_DRV_EICON_OLD && PCI
help
Say Y here if you have an Eicon Diva Server (BRI/PRI/4BRI) ISDN
card. Please read <file:Documentation/isdn/README.eicon> for more
information.
config ISDN_DRV_EICON_ISA
bool "Eicon S,SX,SCOM,Quadro,S2M support"
depends on ISDN_DRV_EICON_OLD
help
Say Y here if you have an old-type Eicon active ISDN card. In order
to use this card, additional firmware is necessary, which has to be
loaded into the card using the eiconctrl utility which is part of
the latest isdn4k-utils package. Please read the file
<file:Documentation/isdn/README.eicon> for more information.
endchoice
# Makefile for the eicon ISDN device driver
# Each configuration option enables a list of files.
obj-$(CONFIG_ISDN_DRV_EICON_OLD) += eicon.o
obj-$(CONFIG_ISDN_DRV_EICON_DIVAS) += divas.o
# Multipart objects.
eicon-y := eicon_mod.o eicon_isa.o eicon_pci.o \
eicon_idi.o eicon_io.o
eicon-$(CONFIG_ISDN_DRV_EICON_PCI) += common.o idi.o bri.o pri.o log.o \
xlog.o kprintf.o fpga.o fourbri.o lincfg.o \
linchr.o linsys.o linio.o
divas-y := common.o idi.o bri.o pri.o log.o xlog.o \
kprintf.o fpga.o fourbri.o lincfg.o \
linchr.o linsys.o linio.o Divas_mod.o
/*
* Main internal include file for Diva Server driver
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
* Eicon File Revision : 1.7
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#if !defined(ADAPTER_H)
#define ADAPTER_H
#include "sys.h"
#include "idi.h"
#include "divas.h"
#undef ID_MASK
#include "pc.h"
#define XMOREC 0x1f
#define XMOREF 0x20
#define XBUSY 0x40
#define RMORE 0x80
/* structure for all information we have to keep on a per */
/* adapater basis */
typedef struct adapter_s ADAPTER;
struct adapter_s {
void * io;
byte IdTable[256];
byte ReadyInt;
byte (* ram_in)(ADAPTER * a, void * adr);
word (* ram_inw)(ADAPTER * a, void * adr);
void (* ram_in_buffer)(ADAPTER * a, void * adr, void * P, word length);
void (* ram_look_ahead)(ADAPTER * a, PBUFFER * RBuffer, ENTITY * e);
void (* ram_out)(ADAPTER * a, void * adr, byte data);
void (* ram_outw)(ADAPTER * a, void * adr, word data);
void (* ram_out_buffer)(ADAPTER * a, void * adr, void * P, word length);
void (* ram_inc)(ADAPTER * a, void * adr);
};
typedef struct card card_t;
typedef int card_load_fn_t(card_t *card, dia_load_t *load);
typedef int card_config_fn_t(card_t *card, dia_config_t *config);
typedef int card_start_fn_t(card_t *card, byte *channels);
typedef int card_reset_fn_t(card_t *card);
typedef int card_mem_get_fn_t(card_t *card, mem_block_t *mem_block);
#define MAX_PENTITIES 256 /* Number of entities primary adapter */
#define MAX_ENTITIES 16 /* Number of entities standard adapter */
typedef struct e_info_s E_INFO;
struct e_info_s
{
ENTITY *e; /* entity pointer */
byte next; /* chaining index */
word assign_ref; /* assign reference */
};
/* DIVA card info (details hidden from user) */
typedef struct ux_diva_card_s ux_diva_card_t;
/* card info */
struct card
{
ADAPTER a; /* per-adapter information */
dia_card_t cfg; /* card configuration */
int state; /* State of the adapter */
dword serial_no; /* serial number */
int test_int_pend; /* set for interrupt testing */
ux_diva_card_t *hw; /* O/S-specific handle */
card_reset_fn_t *card_reset; /* call this to reset card */
card_load_fn_t *card_load; /* call this to load card */
card_config_fn_t *card_config; /* call this to config card */
card_start_fn_t *card_start; /* call this to start card */
card_mem_get_fn_t *card_mem_get; /* call this to get card memory */
E_INFO *e_tbl; /* table of ENTITY pointers */
byte e_head; /* list of active ENTITIES */
byte e_tail; /* list of active ENTITIES */
int e_count; /* # of active ENTITIES */
int e_max; /* total # of ENTITIES */
byte assign; /* assign queue entry */
PBUFFER RBuffer; /* Copy of receive lookahead buffer */
int log_types; /* bit-mask of active logs */
word xlog_offset; /* offset to XLOG buffer on card */
void (*out)(ADAPTER *a);
byte (*dpc)(ADAPTER * a);
byte (*test_int)(ADAPTER * a);
void (*clear_int)(ADAPTER * a);
void (*reset_int)(card_t *c);
int is_live;
int (*card_isr)(card_t *card);
int int_pend; /* interrupt pending */
long interrupt_reentered;
long dpc_reentered;
int set_xlog_request;
} ;
/* card information */
#define MAX_CARDS 20 /* max number of cards on a system */
extern
card_t DivasCards[];
extern
int DivasCardNext;
extern
dia_config_t DivasCardConfigs[];
extern
byte DivasFlavourConfig[];
/*------------------------------------------------------------------*/
/* public functions of IDI common code */
/*------------------------------------------------------------------*/
void DivasOut(ADAPTER * a);
byte DivasDpc(ADAPTER * a);
byte DivasTestInt(ADAPTER * a);
void DivasClearInt(ADAPTER * a);
/*------------------------------------------------------------------*/
/* public functions of configuration platform-specific code */
/*------------------------------------------------------------------*/
int DivasConfigGet(dia_card_t *card);
/*------------------------------------------------------------------*/
/* public functions of LOG related code */
/*------------------------------------------------------------------*/
void DivasXlogReq(int card_num);
int DivasXlogRetrieve(card_t *card);
void DivasLog(dia_log_t *log);
void DivasLogIdi(card_t *card, ENTITY *e, int request);
/*------------------------------------------------------------------*/
/* public functions to initialise cards for each type supported */
/*------------------------------------------------------------------*/
int DivasPriInit(card_t *card, dia_card_t *cfg);
int DivasBriInit(card_t *card, dia_card_t *cfg);
int Divas4BriInit(card_t *card, dia_card_t *cfg);
void DivasBriPatch(card_t *card);
/*------------------------------------------------------------------*/
/* public functions of log common code */
/*------------------------------------------------------------------*/
extern char *DivasLogFifoRead(void);
extern void DivasLogFifoWrite(char *entry, int length);
extern int DivasLogFifoEmpty(void);
extern int DivasLogFifoFull(void);
extern void DivasLogAdd(void *buffer, int length);
/*------------------------------------------------------------------*/
/* public functions of misc. platform-specific code */
/*------------------------------------------------------------------*/
int DivasDpcSchedule(void);
void DivasDoDpc(unsigned long);
int DivasScheduleRequestDpc(void);
/* table of IDI request functions */
extern
IDI_CALL DivasIdiRequest[];
/*
* initialisation entry point
*/
int DivasInit(void);
/*
* Get information on the number and type of cards present
*/
extern
int DivasCardsDiscover(void);
/*
* initialise a new card
*/
int DivasCardNew(dia_card_t *card);
/*
* configure specified card
*/
int DivasCardConfig(dia_config_t *config);
/*
* load specified binary code onto card
*/
int DivasCardLoad(dia_load_t *load);
/*
* start specified card running
*/
int DivasCardStart(int card_id);
/*
* ISR for card
* Returns 0 if specified card was interrupting
*/
int DivasIsr(void *arg);
/*
* Get number of active cards
*/
int DivasGetNum(void);
/*
* Get list of active cards
*/
int DivasGetList(dia_card_list_t *card_list);
/* definitions common to several card types */
#define DIVAS_SHARED_OFFSET (0x1000)
#endif /* ADAPTER_H */
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (C) Eicon Technology Corporation, 2000.
*
* Eicon File Revision : 1.0
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
/*------------------------------------------------------------------*/
/* Q.931 information elements maximum length */
/* excluding the identifier, including the length field */
/*------------------------------------------------------------------*/
#define MAX_LEN_BC 13
#define MAX_LEN_LLC 19 /* ctr3 */
#define MAX_LEN_HLC 6 /* ctr3 */
#define MAX_LEN_UUI 200 /* Hicom USBS req */
#define MAX_LEN_NUM 24
#define MAX_LEN_DSP 83 /* ctr3 */
#define MAX_LEN_NI 4
#define MAX_LEN_PI 5
#define MAX_LEN_SIN 3
#define MAX_LEN_CST 4
#define MAX_LEN_SIG 2
#define MAX_LEN_SPID 32
#define MAX_LEN_EID 3
#define MAX_LEN_CHI 35 /* ctr3 */
#define MAX_LEN_CAU 33
#define MAX_LEN_FTY 130
#define MAX_LEN_KEY 83 /* ctr3 */
#define MAX_LEN_RSI 4
#define MAX_LEN_CAI 11
#define MAX_NUM_SPID 4
#define MAX_LEN_USERID 9
#define MAX_LEN_APPLID 5
#define MAX_LEN_NTTCIF 15
/*------------------------------------------------------------------*/
/* decision return values */
/*------------------------------------------------------------------*/
#define YES 1
#define NO 0
/*-------------------------------------------------------------------*/
/* w element coding */
/*-------------------------------------------------------------------*/
#define NTTCIF 0x01
#define BC 0x04
#define CAU 0x08
#define CAD 0x0c
#define CAI 0x10
#define CST 0x14
#define CHI 0x18
#define LLI 0x19
#define CHA 0x1a
#define FTY 0x1c
#define PI 0x1e
#define NFAC 0x20
#define TC 0x24
#define ATT_EID 0x26
#define NI 0x27
#define DSP 0x28
#define DT 0x29
#define KEY 0x2c
#define KP 0x2c
#define UID 0x2d
#define SIG 0x34
#define FI 0x39
#define SPID 0x3a
#define EID 0x3b
#define DSPF 0x3c
#define ECAD 0x4c
#define OAD 0x6c
#define OSA 0x6d
#define DAD 0x70
#define CPN 0x70
#define DSA 0x71
#define RDX 0x73
#define RAD 0x74
#define RDN 0x74
#define RSI 0x79
#define SCR 0x7A /* internal unscreened CPN */
#define MIE 0x7a /* internal management info element */
#define LLC 0x7c
#define HLC 0x7d
#define UUI 0x7e
#define ESC 0x7f
#define SHIFT 0x90
#define MORE 0xa0
#define CL 0xb0
/* information elements used on the spid interface */
#define SPID_CMD 0xc0
#define SPID_LINK 0x10
#define SPID_DN 0x70
#define SPID_BC 0x04
#define SPID_SWITCH 0x11
/*------------------------------------------------------------------*/
/* global configuration parameters, defined in exec.c */
/* these parameters are configured with program loading */
/*------------------------------------------------------------------*/
#define PROT_1TR6 0
#define PROT_ETSI 1
#define PROT_FRANC 2
#define PROT_BELG 3
#define PROT_SWED 4
#define PROT_NI 5
#define PROT_5ESS 6
#define PROT_JAPAN 7
#define PROT_ATEL 8
#define PROT_US 9
#define PROT_ITALY 10
#define PROT_TWAN 11
#define PROT_AUSTRAL 12
#define INIT_PROT_1TR6 0x80|PROT_1TR6
#define INIT_PROT_ETSI 0x80|PROT_ETSI
#define INIT_PROT_FRANC 0x80|PROT_FRANC
#define INIT_PROT_BELG 0x80|PROT_BELG
#define INIT_PROT_SWED 0x80|PROT_SWED
#define INIT_PROT_NI 0x80|PROT_NI
#define INIT_PROT_5ESS 0x80|PROT_5ESS
#define INIT_PROT_JAPAN 0x80|PROT_JAPAN
#define INIT_PROT_ATEL 0x80|PROT_ATEL
#define INIT_PROT_ITALY 0x80|PROT_ITALY
#define INIT_PROT_TWAN 0x80|PROT_TWAN
#define INIT_PROT_AUSTRAL 0x80|PROT_AUSTRAL
/* -----------------------------------------------------------**
** The PROTOCOL_FEATURE_STRING in feature.h (included **
** in prstart.sx and astart.sx) defines capabilities and **
** features of the actual protocol code. It's used as a bit **
** mask. **
** The following Bits are defined: **
** -----------------------------------------------------------*/
#define PROTCAP_TELINDUS 0x0001 /* Telindus Variant of protocol code */
#define PROTCAP_MANIF 0x0002 /* Management interface implemented */
#define PROTCAP_V_42 0x0004 /* V42 implemented */
#define PROTCAP_V90D 0x0008 /* V.90D (implies up to 384k DSP code) */
#define PROTCAP_EXTD_FAX 0x0010 /* Extended FAX (ECM, 2D, T6, Polling) */
#define PROTCAP_FREE4 0x0020 /* not used */
#define PROTCAP_FREE5 0x0040 /* not used */
#define PROTCAP_FREE6 0x0080 /* not used */
#define PROTCAP_FREE7 0x0100 /* not used */
#define PROTCAP_FREE8 0x0200 /* not used */
#define PROTCAP_FREE9 0x0400 /* not used */
#define PROTCAP_FREE10 0x0800 /* not used */
#define PROTCAP_FREE11 0x1000 /* not used */
#define PROTCAP_FREE12 0x2000 /* not used */
#define PROTCAP_FREE13 0x4000 /* not used */
#define PROTCAP_EXTENSION 0x8000 /* used for future extentions */
/*
* Include file for defining the kernel logger messages
* These definitions are shared between the klog driver and the
* klogd daemon process
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
* Eicon File Revision : 1.0
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#if !defined(_KLOGMSG_H)
#define _KLOGMSG_H
/* define a type for a log entry */
#define KLOG_TEXT_MSG (0)
#define KLOG_XLOG_MSG (1)
#define KLOG_XTXT_MSG (2)
#define KLOG_IDI_REQ (4)
#define KLOG_IDI_CALLBACK (5)
#define KLOG_CAPI_MSG (6)
typedef struct
{
unsigned long time_stamp; /* in ms since last system boot */
int card; /* card number (-1 for all) */
unsigned int type; /* type of log message (0 is text) */
unsigned int length; /* message length (non-text messages only) */
unsigned short code; /* message code (non-text messages only) */
char buffer[110];/* text/data to log */
} klog_t;
void DivasLogAdd(void *buffer, int length);
#endif /* of _KLOGMSG_H */
/*
* External Diva Server driver include file
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
* Eicon File Revision : 1.5
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#if !defined(DIVAS_H)
#define DIVAS_H
#include "sys.h"
/* IOCTL commands */
#define DIA_IOCTL_INIT (0)
#define DIA_IOCTL_LOAD (1)
#define DIA_IOCTL_CONFIG (2)
#define DIA_IOCTL_START (3)
#define DIA_IOCTL_GET_NUM (4)
#define DIA_IOCTL_GET_LIST (5)
#define DIA_IOCTL_LOG (6)
#define DIA_IOCTL_DETECT (7)
#define DIA_IOCTL_SPACE (8)
#define DIA_IOCTL_GET_MEM (9)
#define DIA_IOCTL_FLAVOUR (10)
#define DIA_IOCTL_XLOG_REQ (11)
/* Error codes */
#define XLOG_ERR_CARD_NUM (13)
#define XLOG_ERR_DONE (14)
#define XLOG_ERR_CMD (15)
#define XLOG_ERR_TIMEOUT (16)
#define XLOG_ERR_CARD_STATE (17)
#define XLOG_ERR_UNKNOWN (18)
#define XLOG_OK (0)
/* Adapter states */
#define DIA_UNKNOWN (0)
#define DIA_RESET (1)
#define DIA_LOADED (2)
#define DIA_CONFIGURED (3)
#define DIA_RUNNING (4)
/* Stucture for getting card specific information from active cad driver */
typedef struct
{
int card_type;
int card_slot;
int state;
} dia_card_list_t;
/* use following to select which logging to have active */
#define DIVAS_LOG_DEBUG (1 << 0)
#define DIVAS_LOG_XLOG (1 << 1)
#define DIVAS_LOG_IDI (1 << 2)
#define DIVAS_LOG_CAPI (1 << 3)
/* stucture for DIA_IOCTL_LOG to get information from adapter */
typedef struct
{
int card_id;
int log_types; /* bit mask of log types: use DIVAS_LOG_XXX */
} dia_log_t;
/* list of cards supported by this driver */
#define DIA_CARD_TYPE_DIVA_SERVER (0) /* Diva Server PRI */
#define DIA_CARD_TYPE_DIVA_SERVER_B (1) /* Diva Server BRI */
#define DIA_CARD_TYPE_DIVA_SERVER_Q (2) /* Diva Server 4-BRI */
/* bus types */
#define DIA_BUS_TYPE_ISA (0)
#define DIA_BUS_TYPE_ISA_PNP (1)
#define DIA_BUS_TYPE_PCI (2)
#define DIA_BUS_TYPE_MCA (3)
/* types of memory used (index for memory array below) */
#define DIVAS_RAM_MEMORY 0
#define DIVAS_REG_MEMORY 1
#define DIVAS_CFG_MEMORY 2
#define DIVAS_SHARED_MEMORY 3
#define DIVAS_CTL_MEMORY 4
/*
* card config information
* passed as parameter to DIA_IOCTL_INIT ioctl to initialise new card
*/
typedef struct
{
int card_id; /* unique id assigned to this card */
int card_type; /* use DIA_CARD_TYPE_xxx above */
int bus_type; /* use DIA_BUS_TYPE_xxx above */
struct pci_dev *pdev;
int slot; /* slot number in bus */
unsigned char irq; /* IRQ number */
int reset_base; /* Reset register for I/O mapped cards */
int io_base; /* I/O base for I/O mapped cards */
void *memory[5]; /* memory base addresses for memory mapped cards */
char name[9]; /* name of adapter */
int serial; /* serial number */
unsigned char int_priority; /* Interrupt priority */
} dia_card_t;
/*
* protocol configuration information
* passed as parameter to DIA_IOCTL_CONFIG ioctl to configure card
*/
typedef struct
{
int card_id; /* to identify particular card */
unsigned char tei;
unsigned char nt2;
unsigned char watchdog;
unsigned char permanent;
unsigned char x_interface;
unsigned char stable_l2;
unsigned char no_order_check;
unsigned char handset_type;
unsigned char sig_flags;
unsigned char low_channel;
unsigned char prot_version;
unsigned char crc4;
struct
{
unsigned char oad[32];
unsigned char osa[32];
unsigned char spid[32];
}terminal[2];
} dia_config_t;
/*
* code configuration
* passed as parameter to DIA_IOCTL_LOAD ioctl
* one of these ioctl per code file to load
*/
typedef struct
{
int card_id; /* card to load */
enum
{
DIA_CPU_CODE, /* CPU code */
DIA_DSP_CODE, /* DSP code */
DIA_CONT_CODE, /* continuation of code */
DIA_TABLE_CODE, /* code table */
DIA_DLOAD_CNT, /* number of downloads*/
DIA_FPGA_CODE
} code_type; /* code for CPU or DSP ? */
int length; /* length of code */
unsigned char *code; /* pointer (in user-space) to code */
} dia_load_t;
/*
* start configuration
* passed as parameter to DIA_IOCTL_START ioctl
*/
typedef struct
{
int card_id; /* card to start */
} dia_start_t;
/* used for retrieving memory from the card */
typedef struct {
word card_id;
dword addr;
byte data[16 * 8];
} mem_block_t;
/* DIVA Server specific addresses */
#define DIVAS_CPU_START_ADDR (0x0)
#define ORG_MAX_PROTOCOL_CODE_SIZE 0x000A0000
#define ORG_MAX_DSP_CODE_SIZE (0x000F0000 - ORG_MAX_PROTOCOL_CODE_SIZE)
#define ORG_DSP_CODE_BASE (0xBF7F0000 - ORG_MAX_DSP_CODE_SIZE)
#define DIVAS_DSP_START_ADDR (0xBF7A0000)
#define DIVAS_SHARED_OFFSET (0x1000)
#define MP_DSP_CODE_BASE 0xa03a0000
#define MQ_PROTCODE_OFFSET 0x100000
#define MQ_SM_OFFSET 0X0f0000
#define V90D_MAX_PROTOCOL_CODE_SIZE 0x00090000
#define V90D_MAX_DSP_CODE_SIZE (0x000F0000 - V90D_MAX_PROTOCOL_CODE_SIZE)
#define V90D_DSP_CODE_BASE (0xBF7F0000 - V90D_MAX_DSP_CODE_SIZE)
#define MQ_ORG_MAX_PROTOCOL_CODE_SIZE 0x000a0000 /* max 640K Protocol-Code */
#define MQ_ORG_MAX_DSP_CODE_SIZE 0x00050000 /* max 320K DSP-Code */
#define MQ_ORG_DSP_CODE_BASE (MQ_MAX_DSP_DOWNLOAD_ADDR \
- MQ_ORG_MAX_DSP_CODE_SIZE)
#define MQ_V90D_MAX_PROTOCOL_CODE_SIZE 0x00090000 /* max 576K Protocol-Code */
#define MQ_V90D_MAX_DSP_CODE_SIZE 0x00060000 /* max 384K DSP-Code if V.90D included */
#define MQ_MAX_DSP_DOWNLOAD_ADDR 0xa03f0000
#define MQ_V90D_DSP_CODE_BASE (MQ_MAX_DSP_DOWNLOAD_ADDR \
- MQ_V90D_MAX_DSP_CODE_SIZE)
#define ALIGNMENT_MASK_MAESTRA 0xfffffffc
#endif /* DIVAS_H */
/*
* Copyright (C) Eicon Technology Corporation, 2000.
*
* Eicon File Revision : 1.0
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#ifndef DSP_DEFS_H_
#define DSP_DEFS_H_
#ifndef DSPDIDS_H_
#include "dspdids.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*---------------------------------------------------------------------------*/
#ifndef NULL
#define NULL 0
#endif
#ifndef TRUE
#define TRUE (0 == 0)
#endif
#ifndef FALSE
#define FALSE (0 != 0)
#endif
/*---------------------------------------------------------------------------*/
#define DSP_MEMORY_TYPE_EXTERNAL_DM 0
#define DSP_MEMORY_TYPE_EXTERNAL_PM 1
#define DSP_MEMORY_TYPE_INTERNAL_DM 2
#define DSP_MEMORY_TYPE_INTERNAL_PM 3
#define DSP_DOWNLOAD_FLAG_BOOTABLE 0x0001
#define DSP_DOWNLOAD_FLAG_2181 0x0002
#define DSP_DOWNLOAD_FLAG_TIMECRITICAL 0x0004
#define DSP_DOWNLOAD_FLAG_COMPAND 0x0008
#define DSP_MEMORY_BLOCK_COUNT 16
#define DSP_SEGMENT_PM_FLAG 0x0001
#define DSP_SEGMENT_SHARED_FLAG 0x0002
#define DSP_SEGMENT_EXTERNAL_DM DSP_MEMORY_TYPE_EXTERNAL_DM
#define DSP_SEGMENT_EXTERNAL_PM DSP_MEMORY_TYPE_EXTERNAL_PM
#define DSP_SEGMENT_INTERNAL_DM DSP_MEMORY_TYPE_INTERNAL_DM
#define DSP_SEGMENT_INTERNAL_PM DSP_MEMORY_TYPE_INTERNAL_PM
#define DSP_SEGMENT_FIRST_RELOCATABLE 4
#define DSP_DATA_BLOCK_PM_FLAG 0x0001
#define DSP_DATA_BLOCK_DWORD_FLAG 0x0002
#define DSP_DATA_BLOCK_RESOLVE_FLAG 0x0004
#define DSP_RELOC_NONE 0x00
#define DSP_RELOC_SEGMENT_MASK 0x3f
#define DSP_RELOC_TYPE_MASK 0xc0
#define DSP_RELOC_TYPE_0 0x00 /* relocation of address in DM word / high part of PM word */
#define DSP_RELOC_TYPE_1 0x40 /* relocation of address in low part of PM data word */
#define DSP_RELOC_TYPE_2 0x80 /* relocation of address in standard command */
#define DSP_RELOC_TYPE_3 0xc0 /* relocation of address in call/jump on flag in */
#define DSP_COMBIFILE_FORMAT_IDENTIFICATION_SIZE 48
#define DSP_COMBIFILE_FORMAT_VERSION_BCD 0x0100
#define DSP_FILE_FORMAT_IDENTIFICATION_SIZE 48
#define DSP_FILE_FORMAT_VERSION_BCD 0x0100
typedef struct tag_dsp_combifile_header
{
char format_identification[DSP_COMBIFILE_FORMAT_IDENTIFICATION_SIZE];
word format_version_bcd;
word header_size;
word combifile_description_size;
word directory_entries;
word directory_size;
word download_count;
word usage_mask_size;
} t_dsp_combifile_header;
typedef struct tag_dsp_combifile_directory_entry
{
word card_type_number;
word file_set_number;
} t_dsp_combifile_directory_entry;
typedef struct tag_dsp_file_header
{
char format_identification[DSP_FILE_FORMAT_IDENTIFICATION_SIZE];
word format_version_bcd;
word download_id;
word download_flags;
word required_processing_power;
word interface_channel_count;
word header_size;
word download_description_size;
word memory_block_table_size;
word memory_block_count;
word segment_table_size;
word segment_count;
word symbol_table_size;
word symbol_count;
word total_data_size_dm;
word data_block_count_dm;
word total_data_size_pm;
word data_block_count_pm;
} t_dsp_file_header;
typedef struct tag_dsp_memory_block_desc
{
word alias_memory_block;
word memory_type;
word address;
word size; /* DSP words */
} t_dsp_memory_block_desc;
typedef struct tag_dsp_segment_desc
{
word memory_block;
word attributes;
word base;
word size;
word alignment; /* ==0 -> no other legal start address than base */
} t_dsp_segment_desc;
typedef struct tag_dsp_symbol_desc
{
word symbol_id;
word segment;
word offset;
word size; /* DSP words */
} t_dsp_symbol_desc;
typedef struct tag_dsp_data_block_header
{
word attributes;
word segment;
word offset;
word size; /* DSP words */
} t_dsp_data_block_header;
typedef struct tag_dsp_download_desc /* be sure to keep native alignment for MAESTRA's */
{
word download_id;
word download_flags;
word required_processing_power;
word interface_channel_count;
word excess_header_size;
word memory_block_count;
word segment_count;
word symbol_count;
word data_block_count_dm;
word data_block_count_pm;
byte *p_excess_header_data;
char *p_download_description;
t_dsp_memory_block_desc *p_memory_block_table;
t_dsp_segment_desc *p_segment_table;
t_dsp_symbol_desc *p_symbol_table;
word *p_data_blocks_dm;
word *p_data_blocks_pm;
} t_dsp_download_desc;
#define DSP_DOWNLOAD_INDEX_KERNEL 0
#define DSP30TX_DOWNLOAD_INDEX_KERNEL 1
#define DSP30RX_DOWNLOAD_INDEX_KERNEL 2
#define DSP_MAX_DOWNLOAD_COUNT 35
#define DSP_DOWNLOAD_MAX_SEGMENTS 16
#define DSP_UDATA_REQUEST_RECONFIGURE 0
/*
parameters:
<word> reconfigure delay (in 8kHz samples)
<word> reconfigure code
<byte> reconfigure hdlc preamble flags
*/
#define DSP_RECONFIGURE_TX_FLAG 0x8000
#define DSP_RECONFIGURE_SHORT_TRAIN_FLAG 0x4000
#define DSP_RECONFIGURE_ECHO_PROTECT_FLAG 0x2000
#define DSP_RECONFIGURE_HDLC_FLAG 0x1000
#define DSP_RECONFIGURE_SYNC_FLAG 0x0800
#define DSP_RECONFIGURE_PROTOCOL_MASK 0x00ff
#define DSP_RECONFIGURE_IDLE 0
#define DSP_RECONFIGURE_V25 1
#define DSP_RECONFIGURE_V21_CH2 2
#define DSP_RECONFIGURE_V27_2400 3
#define DSP_RECONFIGURE_V27_4800 4
#define DSP_RECONFIGURE_V29_7200 5
#define DSP_RECONFIGURE_V29_9600 6
#define DSP_RECONFIGURE_V33_12000 7
#define DSP_RECONFIGURE_V33_14400 8
#define DSP_RECONFIGURE_V17_7200 9
#define DSP_RECONFIGURE_V17_9600 10
#define DSP_RECONFIGURE_V17_12000 11
#define DSP_RECONFIGURE_V17_14400 12
/*
data indications if transparent framer
<byte> data 0
<byte> data 1
...
data indications if HDLC framer
<byte> data 0
<byte> data 1
...
<byte> CRC 0
<byte> CRC 1
<byte> preamble flags
*/
#define DSP_UDATA_INDICATION_SYNC 0
/*
returns:
<word> time of sync (sampled from counter at 8kHz)
*/
#define DSP_UDATA_INDICATION_DCD_OFF 1
/*
returns:
<word> time of DCD off (sampled from counter at 8kHz)
*/
#define DSP_UDATA_INDICATION_DCD_ON 2
/*
returns:
<word> time of DCD on (sampled from counter at 8kHz)
<byte> connected norm
<word> connected options
<dword> connected speed (bit/s)
*/
#define DSP_UDATA_INDICATION_CTS_OFF 3
/*
returns:
<word> time of CTS off (sampled from counter at 8kHz)
*/
#define DSP_UDATA_INDICATION_CTS_ON 4
/*
returns:
<word> time of CTS on (sampled from counter at 8kHz)
<byte> connected norm
<word> connected options
<dword> connected speed (bit/s)
*/
#define DSP_CONNECTED_NORM_UNSPECIFIED 0
#define DSP_CONNECTED_NORM_V21 1
#define DSP_CONNECTED_NORM_V23 2
#define DSP_CONNECTED_NORM_V22 3
#define DSP_CONNECTED_NORM_V22_BIS 4
#define DSP_CONNECTED_NORM_V32_BIS 5
#define DSP_CONNECTED_NORM_V34 6
#define DSP_CONNECTED_NORM_V8 7
#define DSP_CONNECTED_NORM_BELL_212A 8
#define DSP_CONNECTED_NORM_BELL_103 9
#define DSP_CONNECTED_NORM_V29_LEASED_LINE 10
#define DSP_CONNECTED_NORM_V33_LEASED_LINE 11
#define DSP_CONNECTED_NORM_TFAST 12
#define DSP_CONNECTED_NORM_V21_CH2 13
#define DSP_CONNECTED_NORM_V27_TER 14
#define DSP_CONNECTED_NORM_V29 15
#define DSP_CONNECTED_NORM_V33 16
#define DSP_CONNECTED_NORM_V17 17
#define DSP_CONNECTED_OPTION_TRELLIS 0x0001
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif
/*---------------------------------------------------------------------------*/
/*
* Copyright (C) Eicon Technology Corporation, 2000.
*
* Eicon File Revision : 1.0
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#ifndef DSPDIDS_H_
#define DSPDIDS_H_
/*---------------------------------------------------------------------------*/
#define DSP_DID_INVALID 0
#define DSP_DID_DIVA 1
#define DSP_DID_DIVA_PRO 2
#define DSP_DID_DIVA_PRO_20 3
#define DSP_DID_DIVA_PRO_PCCARD 4
#define DSP_DID_DIVA_SERVER_BRI_1M 5
#define DSP_DID_DIVA_SERVER_BRI_2M 6
#define DSP_DID_DIVA_SERVER_PRI_2M_TX 7
#define DSP_DID_DIVA_SERVER_PRI_2M_RX 8
#define DSP_DID_DIVA_SERVER_PRI_30M 9
#define DSP_DID_TASK_HSCX 100
#define DSP_DID_TASK_HSCX_PRI_2M_TX 101
#define DSP_DID_TASK_HSCX_PRI_2M_RX 102
#define DSP_DID_TASK_V110KRNL 200
#define DSP_DID_OVERLAY_V1100 201
#define DSP_DID_OVERLAY_V1101 202
#define DSP_DID_OVERLAY_V1102 203
#define DSP_DID_OVERLAY_V1103 204
#define DSP_DID_OVERLAY_V1104 205
#define DSP_DID_OVERLAY_V1105 206
#define DSP_DID_OVERLAY_V1106 207
#define DSP_DID_OVERLAY_V1107 208
#define DSP_DID_OVERLAY_V1108 209
#define DSP_DID_OVERLAY_V1109 210
#define DSP_DID_TASK_V110_PRI_2M_TX 220
#define DSP_DID_TASK_V110_PRI_2M_RX 221
#define DSP_DID_TASK_MODEM 300
#define DSP_DID_TASK_FAX05 400
#define DSP_DID_TASK_VOICE 500
#define DSP_DID_TASK_TIKRNL81 600
#define DSP_DID_OVERLAY_DIAL 601
#define DSP_DID_OVERLAY_V22 602
#define DSP_DID_OVERLAY_V32 603
#define DSP_DID_OVERLAY_FSK 604
#define DSP_DID_OVERLAY_FAX 605
#define DSP_DID_OVERLAY_VXX 606
#define DSP_DID_OVERLAY_V8 607
#define DSP_DID_OVERLAY_INFO 608
#define DSP_DID_OVERLAY_V34 609
#define DSP_DID_OVERLAY_DFX 610
#define DSP_DID_PARTIAL_OVERLAY_DIAL 611
#define DSP_DID_PARTIAL_OVERLAY_FSK 612
#define DSP_DID_PARTIAL_OVERLAY_FAX 613
#define DSP_DID_TASK_TIKRNL05 700
/*---------------------------------------------------------------------------*/
#endif
/*---------------------------------------------------------------------------*/
This diff is collapsed.
/* $Id: eicon_dsp.h,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
* DSP definitions
*
* Copyright 1999,2000 by Armin Schindler (mac@melware.de)
* Copyright 1999,2000 Cytronics & Melware (info@melware.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#ifndef DSP_H
#define DSP_H
#include "dsp_defs.h"
#define DSP_UDATA_REQUEST_SWITCH_FRAMER 1
/*
parameters:
<byte> transmit framer type
<byte> receive framer type
*/
#define DSP_REQUEST_SWITCH_FRAMER_HDLC 0
#define DSP_REQUEST_SWITCH_FRAMER_TRANSPARENT 1
#define DSP_REQUEST_SWITCH_FRAMER_ASYNC 2
#define DSP_UDATA_REQUEST_CLEARDOWN 2
/*
parameters:
- none -
*/
#define DSP_UDATA_REQUEST_TX_CONFIRMATION_ON 3
/*
parameters:
- none -
*/
#define DSP_UDATA_REQUEST_TX_CONFIRMATION_OFF 4
/*
parameters:
- none -
*/
typedef struct eicon_dsp_ind {
__u16 time __attribute__ ((packed));
__u8 norm __attribute__ ((packed));
__u16 options __attribute__ ((packed));
__u32 speed __attribute__ ((packed));
__u16 delay __attribute__ ((packed));
__u32 txspeed __attribute__ ((packed));
__u32 rxspeed __attribute__ ((packed));
} eicon_dsp_ind;
#define DSP_CONNECTED_OPTION_V42_TRANS 0x0002
#define DSP_CONNECTED_OPTION_V42_LAPM 0x0004
#define DSP_CONNECTED_OPTION_SHORT_TRAIN 0x0008
#define DSP_CONNECTED_OPTION_TALKER_ECHO_PROTECT 0x0010
#define DSP_UDATA_INDICATION_DISCONNECT 5
/*
returns:
<byte> cause
*/
#define DSP_DISCONNECT_CAUSE_NONE 0x00
#define DSP_DISCONNECT_CAUSE_BUSY_TONE 0x01
#define DSP_DISCONNECT_CAUSE_CONGESTION_TONE 0x02
#define DSP_DISCONNECT_CAUSE_INCOMPATIBILITY 0x03
#define DSP_DISCONNECT_CAUSE_CLEARDOWN 0x04
#define DSP_DISCONNECT_CAUSE_TRAINING_TIMEOUT 0x05
#define DSP_UDATA_INDICATION_TX_CONFIRMATION 6
/*
returns:
<word> confirmation number
*/
#define DSP_UDATA_REQUEST_SEND_DTMF_DIGITS 16
/*
parameters:
<word> tone duration (ms)
<word> gap duration (ms)
<byte> digit 0 tone code
...
<byte> digit n tone code
*/
#define DSP_SEND_DTMF_DIGITS_HEADER_LENGTH 5
#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_697_HZ 0x00
#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_770_HZ 0x01
#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_852_HZ 0x02
#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_941_HZ 0x03
#define DSP_DTMF_DIGIT_TONE_LOW_GROUP_MASK 0x03
#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_1209_HZ 0x00
#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_1336_HZ 0x04
#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_1477_HZ 0x08
#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_1633_HZ 0x0c
#define DSP_DTMF_DIGIT_TONE_HIGH_GROUP_MASK 0x0c
#define DSP_DTMF_DIGIT_TONE_CODE_0 0x07
#define DSP_DTMF_DIGIT_TONE_CODE_1 0x00
#define DSP_DTMF_DIGIT_TONE_CODE_2 0x04
#define DSP_DTMF_DIGIT_TONE_CODE_3 0x08
#define DSP_DTMF_DIGIT_TONE_CODE_4 0x01
#define DSP_DTMF_DIGIT_TONE_CODE_5 0x05
#define DSP_DTMF_DIGIT_TONE_CODE_6 0x09
#define DSP_DTMF_DIGIT_TONE_CODE_7 0x02
#define DSP_DTMF_DIGIT_TONE_CODE_8 0x06
#define DSP_DTMF_DIGIT_TONE_CODE_9 0x0a
#define DSP_DTMF_DIGIT_TONE_CODE_STAR 0x03
#define DSP_DTMF_DIGIT_TONE_CODE_HASHMARK 0x0b
#define DSP_DTMF_DIGIT_TONE_CODE_A 0x0c
#define DSP_DTMF_DIGIT_TONE_CODE_B 0x0d
#define DSP_DTMF_DIGIT_TONE_CODE_C 0x0e
#define DSP_DTMF_DIGIT_TONE_CODE_D 0x0f
#define DSP_UDATA_INDICATION_DTMF_DIGITS_SENT 16
/*
returns:
- none -
One indication will be sent for every request.
*/
#define DSP_UDATA_REQUEST_ENABLE_DTMF_RECEIVER 17
/*
parameters:
<word> tone duration (ms)
<word> gap duration (ms)
*/
typedef struct enable_dtmf_s {
__u16 tone;
__u16 gap;
} enable_dtmf_s;
#define DSP_UDATA_REQUEST_DISABLE_DTMF_RECEIVER 18
/*
parameters:
- none -
*/
#define DSP_UDATA_INDICATION_DTMF_DIGITS_RECEIVED 17
/*
returns:
<byte> digit 0 tone code
...
<byte> digit n tone code
*/
#define DSP_DTMF_DIGITS_RECEIVED_HEADER_LENGTH 1
#define DSP_UDATA_INDICATION_MODEM_CALLING_TONE 18
/*
returns:
- none -
*/
#define DSP_UDATA_INDICATION_FAX_CALLING_TONE 19
/*
returns:
- none -
*/
#define DSP_UDATA_INDICATION_ANSWER_TONE 20
/*
returns:
- none -
*/
/* ============= FAX ================ */
#define EICON_FAXID_LEN 20
typedef struct eicon_t30_s {
__u8 code;
__u8 rate;
__u8 resolution;
__u8 format;
__u8 pages_low;
__u8 pages_high;
__u8 atf;
__u8 control_bits_low;
__u8 control_bits_high;
__u8 feature_bits_low;
__u8 feature_bits_high;
__u8 universal_5;
__u8 universal_6;
__u8 universal_7;
__u8 station_id_len;
__u8 head_line_len;
__u8 station_id[EICON_FAXID_LEN];
/* __u8 head_line[]; */
} eicon_t30_s;
/* EDATA transmit messages */
#define EDATA_T30_DIS 0x01
#define EDATA_T30_FTT 0x02
#define EDATA_T30_MCF 0x03
/* EDATA receive messages */
#define EDATA_T30_DCS 0x81
#define EDATA_T30_TRAIN_OK 0x82
#define EDATA_T30_EOP 0x83
#define EDATA_T30_MPS 0x84
#define EDATA_T30_EOM 0x85
#define EDATA_T30_DTC 0x86
#define T30_FORMAT_SFF 0
#define T30_FORMAT_ASCII 1
#define T30_FORMAT_COUNT 2
#define T30_CONTROL_BIT_DISABLE_FINE 0x0001
#define T30_CONTROL_BIT_ENABLE_ECM 0x0002
#define T30_CONTROL_BIT_ECM_64_BYTES 0x0004
#define T30_CONTROL_BIT_ENABLE_2D_CODING 0x0008
#define T30_CONTROL_BIT_ENABLE_T6_CODING 0x0010
#define T30_CONTROL_BIT_ENABLE_UNCOMPR 0x0020
#define T30_CONTROL_BIT_ACCEPT_POLLING 0x0040
#define T30_CONTROL_BIT_REQUEST_POLLING 0x0080
#define T30_CONTROL_BIT_MORE_DOCUMENTS 0x0100
#define T30_CONTROL_BIT_ALL_FEATURES\
(T30_CONTROL_BIT_ENABLE_ECM | T30_CONTROL_BIT_ENABLE_2D_CODING |\
T30_CONTROL_BIT_ENABLE_T6_CODING | T30_CONTROL_BIT_ENABLE_UNCOMPR)
#define T30_FEATURE_BIT_FINE 0x0001
#define T30_FEATURE_BIT_ECM 0x0002
#define T30_FEATURE_BIT_ECM_64_BYTES 0x0004
#define T30_FEATURE_BIT_2D_CODING 0x0008
#define T30_FEATURE_BIT_T6_CODING 0x0010
#define T30_FEATURE_BIT_UNCOMPR_ENABLED 0x0020
#define T30_FEATURE_BIT_POLLING 0x0040
#define FAX_OBJECT_DOCU 1
#define FAX_OBJECT_PAGE 2
#define FAX_OBJECT_LINE 3
#define T4_EOL 0x800
#define T4_EOL_BITSIZE 12
#define T4_EOL_DWORD (T4_EOL << (32 - T4_EOL_BITSIZE))
#define T4_EOL_MASK_DWORD ((__u32) -1 << (32 - T4_EOL_BITSIZE))
#define SFF_LEN_FLD_SIZE 3
#define _DLE_ 0x10
#define _ETX_ 0x03
typedef struct eicon_sff_dochead {
__u32 id __attribute__ ((packed));
__u8 version __attribute__ ((packed));
__u8 reserved1 __attribute__ ((packed));
__u16 userinfo __attribute__ ((packed));
__u16 pagecount __attribute__ ((packed));
__u16 off1pagehead __attribute__ ((packed));
__u32 offnpagehead __attribute__ ((packed));
__u32 offdocend __attribute__ ((packed));
} eicon_sff_dochead;
typedef struct eicon_sff_pagehead {
__u8 pageheadid __attribute__ ((packed));
__u8 pageheadlen __attribute__ ((packed));
__u8 resvert __attribute__ ((packed));
__u8 reshoriz __attribute__ ((packed));
__u8 coding __attribute__ ((packed));
__u8 reserved2 __attribute__ ((packed));
__u16 linelength __attribute__ ((packed));
__u16 pagelength __attribute__ ((packed));
__u32 offprevpage __attribute__ ((packed));
__u32 offnextpage __attribute__ ((packed));
} eicon_sff_pagehead;
#endif /* DSP_H */
This diff is collapsed.
/* $Id: eicon_idi.h,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN lowlevel-module for the Eicon active cards.
* IDI-Interface
*
* Copyright 1998-2000 by Armin Schindler (mac@melware.de)
* Copyright 1999,2000 Cytronics & Melware (info@melware.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#ifndef E_IDI_H
#define E_IDI_H
#include <linux/config.h>
#undef N_DATA
#undef ID_MASK
#include "pc.h"
#define AOC_IND 26 /* Advice of Charge */
#define PI 0x1e /* Progress Indicator */
#define NI 0x27 /* Notification Indicator */
#define CALL_HOLD 0x22
#define CALL_HOLD_ACK 0x24
/* defines for statectrl */
#define WAITING_FOR_HANGUP 0x01
#define HAVE_CONN_REQ 0x02
#define IN_HOLD 0x04
typedef struct {
char cpn[32];
char oad[32];
char dsa[32];
char osa[32];
__u8 plan;
__u8 screen;
__u8 sin[4];
__u8 chi[4];
__u8 e_chi[4];
__u8 bc[12];
__u8 e_bc[12];
__u8 llc[18];
__u8 hlc[5];
__u8 cau[4];
__u8 e_cau[2];
__u8 e_mt;
__u8 dt[6];
char display[83];
char keypad[35];
char rdn[32];
} idi_ind_message;
typedef struct {
__u16 next __attribute__ ((packed));
__u8 Req __attribute__ ((packed));
__u8 ReqId __attribute__ ((packed));
__u8 ReqCh __attribute__ ((packed));
__u8 Reserved1 __attribute__ ((packed));
__u16 Reference __attribute__ ((packed));
__u8 Reserved[8] __attribute__ ((packed));
eicon_PBUFFER XBuffer;
} eicon_REQ;
typedef struct {
__u16 next __attribute__ ((packed));
__u8 Rc __attribute__ ((packed));
__u8 RcId __attribute__ ((packed));
__u8 RcCh __attribute__ ((packed));
__u8 Reserved1 __attribute__ ((packed));
__u16 Reference __attribute__ ((packed));
__u8 Reserved2[8] __attribute__ ((packed));
} eicon_RC;
typedef struct {
__u16 next __attribute__ ((packed));
__u8 Ind __attribute__ ((packed));
__u8 IndId __attribute__ ((packed));
__u8 IndCh __attribute__ ((packed));
__u8 MInd __attribute__ ((packed));
__u16 MLength __attribute__ ((packed));
__u16 Reference __attribute__ ((packed));
__u8 RNR __attribute__ ((packed));
__u8 Reserved __attribute__ ((packed));
__u32 Ack __attribute__ ((packed));
eicon_PBUFFER RBuffer;
} eicon_IND;
typedef struct {
__u8 *Data;
unsigned int Size;
unsigned int Len;
__u8 *Next;
} eicon_OBJBUFFER;
extern int idi_do_req(eicon_card *card, eicon_chan *chan, int cmd, int layer);
extern int idi_hangup(eicon_card *card, eicon_chan *chan);
extern int idi_connect_res(eicon_card *card, eicon_chan *chan);
extern int eicon_idi_listen_req(eicon_card *card, eicon_chan *chan);
extern int idi_connect_req(eicon_card *card, eicon_chan *chan, char *phone,
char *eazmsn, int si1, int si2);
extern void idi_handle_ack(eicon_card *card, struct sk_buff *skb);
extern void idi_handle_ind(eicon_card *card, struct sk_buff *skb);
extern int eicon_idi_manage(eicon_card *card, eicon_manifbuf *mb);
extern int idi_send_data(eicon_card *card, eicon_chan *chan, int ack, struct sk_buff *skb, int que, int chk);
extern void idi_audio_cmd(eicon_card *ccard, eicon_chan *chan, int cmd, u_char *value);
extern int capipmsg(eicon_card *card, eicon_chan *chan, capi_msg *cm);
#ifdef CONFIG_ISDN_TTY_FAX
extern void idi_fax_cmd(eicon_card *card, eicon_chan *chan);
extern int idi_faxdata_send(eicon_card *ccard, eicon_chan *chan, struct sk_buff *skb);
#endif
#endif
This diff is collapsed.
This diff is collapsed.
/* $Id: eicon_isa.h,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
*
* Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1998-2000 by Armin Schindler (mac@melware.de)
* Copyright 1999,2000 Cytronics & Melware (info@melware.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#ifndef eicon_isa_h
#define eicon_isa_h
#ifdef __KERNEL__
#include <linux/config.h>
/* Factory defaults for ISA-Cards */
#define EICON_ISA_MEMBASE 0xd0000
#define EICON_ISA_IRQ 3
/* shmem offset for Quadro parts */
#define EICON_ISA_QOFFSET 0x0800
typedef struct {
__u16 length __attribute__ ((packed)); /* length of data/parameter field */
__u8 P[270]; /* data/parameter field */
} eicon_scom_PBUFFER;
/* General communication buffer */
typedef struct {
__u8 Req; /* request register */
__u8 ReqId; /* request task/entity identification */
__u8 Rc; /* return code register */
__u8 RcId; /* return code task/entity identification */
__u8 Ind; /* Indication register */
__u8 IndId; /* Indication task/entity identification */
__u8 IMask; /* Interrupt Mask Flag */
__u8 RNR; /* Receiver Not Ready (set by PC) */
__u8 XLock; /* XBuffer locked Flag */
__u8 Int; /* ISDN interrupt */
__u8 ReqCh; /* Channel field for layer-3 Requests */
__u8 RcCh; /* Channel field for layer-3 Returncodes */
__u8 IndCh; /* Channel field for layer-3 Indications */
__u8 MInd; /* more data indication field */
__u16 MLength; /* more data total packet length */
__u8 ReadyInt; /* request field for ready interrupt */
__u8 Reserved[12]; /* reserved space */
__u8 IfType; /* 1 = 16k-Interface */
__u16 Signature __attribute__ ((packed)); /* ISDN adapter Signature */
eicon_scom_PBUFFER XBuffer; /* Transmit Buffer */
eicon_scom_PBUFFER RBuffer; /* Receive Buffer */
} eicon_isa_com;
/* struct for downloading firmware */
typedef struct {
__u8 ctrl;
__u8 card;
__u8 msize;
__u8 fill0;
__u16 ebit __attribute__ ((packed));
__u32 eloc __attribute__ ((packed));
__u8 reserved[20];
__u16 signature __attribute__ ((packed));
__u8 fill[224];
__u8 b[256];
} eicon_isa_boot;
/* Shared memory */
typedef union {
unsigned char c[0x400];
eicon_isa_com com;
eicon_isa_boot boot;
} eicon_isa_shmem;
/*
* card's description
*/
typedef struct {
int ramsize;
int irq; /* IRQ */
unsigned long physmem; /* physical memory address */
#ifdef CONFIG_MCA
int io; /* IO-port for MCA brand */
#endif /* CONFIG_MCA */
void* card;
eicon_isa_shmem* shmem; /* Shared-memory area */
unsigned char* intack; /* Int-Acknowledge */
unsigned char* stopcpu; /* Writing here stops CPU */
unsigned char* startcpu; /* Writing here starts CPU */
unsigned char type; /* card type */
int channels; /* No. of channels */
unsigned char irqprobe; /* Flag: IRQ-probing */
unsigned char mvalid; /* Flag: Memory is valid */
unsigned char ivalid; /* Flag: IRQ is valid */
unsigned char master; /* Flag: Card ist Quadro 1/4 */
} eicon_isa_card;
/* Offsets for special locations on standard cards */
#define INTACK 0x03fe
#define STOPCPU 0x0400
#define STARTCPU 0x0401
#define RAMSIZE 0x0400
/* Offsets for special location on PRI card */
#define INTACK_P 0x3ffc
#define STOPCPU_P 0x3ffe
#define STARTCPU_P 0x3fff
#define RAMSIZE_P 0x4000
extern int eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb);
extern int eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb);
extern void eicon_isa_release(eicon_isa_card *card);
extern void eicon_isa_printpar(eicon_isa_card *card);
extern void eicon_isa_transmit(eicon_isa_card *card);
extern int eicon_isa_find_card(int Mem, int Irq, char * Id);
#endif /* __KERNEL__ */
#endif /* eicon_isa_h */
This diff is collapsed.
This diff is collapsed.
/* $Id: eicon_pci.h,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards (PCI part).
*
* Copyright 1998-2000 by Armin Schindler (mac@melware.de)
* Copyright 1999,2000 Cytronics & Melware (info@melware.de)
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#ifndef eicon_pci_h
#define eicon_pci_h
#ifdef __KERNEL__
/*
* card's description
*/
typedef struct {
int irq; /* IRQ */
int channels; /* No. of supported channels */
void* card;
unsigned char type; /* card type */
unsigned char master; /* Flag: Card is Quadro 1/4 */
} eicon_pci_card;
extern int eicon_pci_find_card(char *ID);
#endif /* __KERNEL__ */
#endif /* eicon_pci_h */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Source file for kernel interface to kernel log facility
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
* Eicon File Revision : 1.3
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#include "eicon.h"
#include "sys.h"
#include <stdarg.h>
#include "divas.h"
#include "divalog.h"
#include "uxio.h"
void DivasPrintf(char *fmt, ...)
{
klog_t log; /* log entry buffer */
va_list argptr; /* pointer to additional args */
va_start(argptr, fmt);
/* clear log entry */
memset((void *) &log, 0, sizeof(klog_t));
log.card = -1;
log.type = KLOG_TEXT_MSG;
/* time stamp the entry */
log.time_stamp = UxTimeGet();
/* call vsprintf to format the user's information */
vsnprintf(log.buffer, DIM(log.buffer), fmt, argptr);
va_end(argptr);
/* send to the log streams driver and return */
DivasLogAdd(&log, sizeof(klog_t));
return;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment