Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hfcmulti.c File Reference
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/mISDNhw.h>
#include <linux/mISDNdsp.h>
#include "hfc_multi.h"

Go to the source code of this file.

Macros

#define HFC_MULTI_VERSION   "2.03"
 
#define MAX_CARDS   8
 
#define MAX_PORTS   (8 * MAX_CARDS)
 
#define MAX_FRAGS   (32 * MAX_CARDS)
 
#define TYP_E1   1
 
#define TYP_4S   4
 
#define TYP_8S   8
 
#define CLKDEL_TE   0x0f /* CLKDEL in TE mode */
 
#define CLKDEL_NT
 
#define DIP_4S   0x1 /* DIP Switches for Beronet 1S/2S/4S cards */
 
#define DIP_8S   0x2 /* DIP Switches for Beronet 8S+ cards */
 
#define DIP_E1   0x3 /* DIP Switches for Beronet E1 cards */
 
#define HWID_NONE   0
 
#define HWID_MINIP4   1
 
#define HWID_MINIP8   2
 
#define HWID_MINIP16   3
 
#define HFC_outb(hc, reg, val)   (hc->HFC_outb(hc, reg, val))
 
#define HFC_outb_nodebug(hc, reg, val)   (hc->HFC_outb_nodebug(hc, reg, val))
 
#define HFC_inb(hc, reg)   (hc->HFC_inb(hc, reg))
 
#define HFC_inb_nodebug(hc, reg)   (hc->HFC_inb_nodebug(hc, reg))
 
#define HFC_inw(hc, reg)   (hc->HFC_inw(hc, reg))
 
#define HFC_inw_nodebug(hc, reg)   (hc->HFC_inw_nodebug(hc, reg))
 
#define HFC_wait(hc)   (hc->HFC_wait(hc))
 
#define HFC_wait_nodebug(hc)   (hc->HFC_wait_nodebug(hc))
 
#define NUM_EC   2
 
#define MAX_TDM_CHAN   32
 
#define VENDOR_CCD   "Cologne Chip AG"
 
#define VENDOR_BN   "beroNet GmbH"
 
#define VENDOR_DIG   "Digium Inc."
 
#define VENDOR_JH   "Junghanns.NET GmbH"
 
#define VENDOR_PRIM   "PrimuX"
 
#define H(x)   ((unsigned long)&hfcm_map[x])
 

Functions

 MODULE_AUTHOR ("Andreas Eversberg")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (HFC_MULTI_VERSION)
 
 module_param (debug, uint, S_IRUGO|S_IWUSR)
 
 module_param (poll, uint, S_IRUGO|S_IWUSR)
 
 module_param (clock, int, S_IRUGO|S_IWUSR)
 
 module_param (timer, uint, S_IRUGO|S_IWUSR)
 
 module_param (clockdelay_te, uint, S_IRUGO|S_IWUSR)
 
 module_param (clockdelay_nt, uint, S_IRUGO|S_IWUSR)
 
 module_param_array (type, uint, NULL, S_IRUGO|S_IWUSR)
 
 module_param_array (pcm, int, NULL, S_IRUGO|S_IWUSR)
 
 module_param_array (dmask, uint, NULL, S_IRUGO|S_IWUSR)
 
 module_param_array (bmask, uint, NULL, S_IRUGO|S_IWUSR)
 
 module_param_array (iomode, uint, NULL, S_IRUGO|S_IWUSR)
 
 module_param_array (port, uint, NULL, S_IRUGO|S_IWUSR)
 
 module_param (hwid, uint, S_IRUGO|S_IWUSR)
 
void enablepcibridge (struct hfc_multi *c)
 
void disablepcibridge (struct hfc_multi *c)
 
unsigned char readpcibridge (struct hfc_multi *hc, unsigned char address)
 
void writepcibridge (struct hfc_multi *hc, unsigned char address, unsigned char data)
 
void cpld_set_reg (struct hfc_multi *hc, unsigned char reg)
 
void cpld_write_reg (struct hfc_multi *hc, unsigned char reg, unsigned char val)
 
unsigned char cpld_read_reg (struct hfc_multi *hc, unsigned char reg)
 
void vpm_write_address (struct hfc_multi *hc, unsigned short addr)
 
unsigned short vpm_read_address (struct hfc_multi *c)
 
unsigned char vpm_in (struct hfc_multi *c, int which, unsigned short addr)
 
void vpm_out (struct hfc_multi *c, int which, unsigned short addr, unsigned char data)
 
void plxsd_checksync (struct hfc_multi *hc, int rm)
 
 MODULE_DEVICE_TABLE (pci, hfmultipci_ids)
 
 module_init (HFCmulti_init)
 
 module_exit (HFCmulti_cleanup)
 

Macro Definition Documentation

#define CLKDEL_NT
Value:
0x6c /* CLKDEL in NT mode
(0x60 MUST be included!) */

Definition at line 206 of file hfcmulti.c.

#define CLKDEL_TE   0x0f /* CLKDEL in TE mode */

Definition at line 205 of file hfcmulti.c.

#define DIP_4S   0x1 /* DIP Switches for Beronet 1S/2S/4S cards */

Definition at line 208 of file hfcmulti.c.

#define DIP_8S   0x2 /* DIP Switches for Beronet 8S+ cards */

Definition at line 209 of file hfcmulti.c.

#define DIP_E1   0x3 /* DIP Switches for Beronet E1 cards */

Definition at line 210 of file hfcmulti.c.

#define H (   x)    ((unsigned long)&hfcm_map[x])

Definition at line 5352 of file hfcmulti.c.

#define HFC_inb (   hc,
  reg 
)    (hc->HFC_inb(hc, reg))

Definition at line 273 of file hfcmulti.c.

#define HFC_inb_nodebug (   hc,
  reg 
)    (hc->HFC_inb_nodebug(hc, reg))

Definition at line 274 of file hfcmulti.c.

#define HFC_inw (   hc,
  reg 
)    (hc->HFC_inw(hc, reg))

Definition at line 275 of file hfcmulti.c.

#define HFC_inw_nodebug (   hc,
  reg 
)    (hc->HFC_inw_nodebug(hc, reg))

Definition at line 276 of file hfcmulti.c.

#define HFC_MULTI_VERSION   "2.03"

Definition at line 165 of file hfcmulti.c.

#define HFC_outb (   hc,
  reg,
  val 
)    (hc->HFC_outb(hc, reg, val))

Definition at line 271 of file hfcmulti.c.

#define HFC_outb_nodebug (   hc,
  reg,
  val 
)    (hc->HFC_outb_nodebug(hc, reg, val))

Definition at line 272 of file hfcmulti.c.

#define HFC_wait (   hc)    (hc->HFC_wait(hc))

Definition at line 277 of file hfcmulti.c.

#define HFC_wait_nodebug (   hc)    (hc->HFC_wait_nodebug(hc))

Definition at line 278 of file hfcmulti.c.

#define HWID_MINIP16   3

Definition at line 231 of file hfcmulti.c.

#define HWID_MINIP4   1

Definition at line 229 of file hfcmulti.c.

#define HWID_MINIP8   2

Definition at line 230 of file hfcmulti.c.

#define HWID_NONE   0

Definition at line 228 of file hfcmulti.c.

#define MAX_CARDS   8

Definition at line 185 of file hfcmulti.c.

#define MAX_FRAGS   (32 * MAX_CARDS)

Definition at line 187 of file hfcmulti.c.

#define MAX_PORTS   (8 * MAX_CARDS)

Definition at line 186 of file hfcmulti.c.

#define MAX_TDM_CHAN   32

Definition at line 563 of file hfcmulti.c.

#define NUM_EC   2

Definition at line 562 of file hfcmulti.c.

#define TYP_4S   4

Definition at line 199 of file hfcmulti.c.

#define TYP_8S   8

Definition at line 200 of file hfcmulti.c.

#define TYP_E1   1

Definition at line 198 of file hfcmulti.c.

#define VENDOR_BN   "beroNet GmbH"

Definition at line 5299 of file hfcmulti.c.

#define VENDOR_CCD   "Cologne Chip AG"

Definition at line 5298 of file hfcmulti.c.

#define VENDOR_DIG   "Digium Inc."

Definition at line 5300 of file hfcmulti.c.

#define VENDOR_JH   "Junghanns.NET GmbH"

Definition at line 5301 of file hfcmulti.c.

#define VENDOR_PRIM   "PrimuX"

Definition at line 5302 of file hfcmulti.c.

Function Documentation

unsigned char cpld_read_reg ( struct hfc_multi hc,
unsigned char  reg 
)
inline

Definition at line 656 of file hfcmulti.c.

void cpld_set_reg ( struct hfc_multi hc,
unsigned char  reg 
)
inline

Definition at line 637 of file hfcmulti.c.

void cpld_write_reg ( struct hfc_multi hc,
unsigned char  reg,
unsigned char  val 
)
inline

Definition at line 644 of file hfcmulti.c.

void disablepcibridge ( struct hfc_multi c)
inline

Definition at line 573 of file hfcmulti.c.

void enablepcibridge ( struct hfc_multi c)
inline

Definition at line 567 of file hfcmulti.c.

MODULE_AUTHOR ( "Andreas Eversberg"  )
MODULE_DEVICE_TABLE ( pci  ,
hfmultipci_ids   
)
module_exit ( HFCmulti_cleanup  )
module_init ( HFCmulti_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( poll  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( clock  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( timer  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( clockdelay_te  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( clockdelay_nt  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( hwid  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param_array ( type  ,
uint  ,
NULL  ,
S_IRUGO S_IWUSR 
)
module_param_array ( pcm  ,
int  ,
NULL  ,
S_IRUGO S_IWUSR 
)
module_param_array ( dmask  ,
uint  ,
NULL  ,
S_IRUGO S_IWUSR 
)
module_param_array ( bmask  ,
uint  ,
NULL  ,
S_IRUGO S_IWUSR 
)
module_param_array ( iomode  ,
uint  ,
NULL  ,
S_IRUGO S_IWUSR 
)
module_param_array ( port  ,
uint  ,
NULL  ,
S_IRUGO S_IWUSR 
)
MODULE_VERSION ( HFC_MULTI_VERSION  )
void plxsd_checksync ( struct hfc_multi hc,
int  rm 
)
inline

Definition at line 1027 of file hfcmulti.c.

unsigned char readpcibridge ( struct hfc_multi hc,
unsigned char  address 
)
inline

Definition at line 579 of file hfcmulti.c.

unsigned char vpm_in ( struct hfc_multi c,
int  which,
unsigned short  addr 
)
inline

Definition at line 694 of file hfcmulti.c.

void vpm_out ( struct hfc_multi c,
int  which,
unsigned short  addr,
unsigned char  data 
)
inline

Definition at line 715 of file hfcmulti.c.

unsigned short vpm_read_address ( struct hfc_multi c)
inline

Definition at line 680 of file hfcmulti.c.

void vpm_write_address ( struct hfc_multi hc,
unsigned short  addr 
)
inline

Definition at line 673 of file hfcmulti.c.

void writepcibridge ( struct hfc_multi hc,
unsigned char  address,
unsigned char  data 
)
inline

Definition at line 607 of file hfcmulti.c.