Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
bt878.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <asm/io.h>
#include <linux/ioport.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/kmod.h>
#include <linux/vmalloc.h>
#include <linux/init.h>
#include "dmxdev.h"
#include "dvbdev.h"
#include "bt878.h"
#include "dst_priv.h"

Go to the source code of this file.

Macros

#define btwrite(dat, adr)   bmtwrite((dat), (bt->bt878_mem+(adr)))
 
#define btread(adr)   bmtread(bt->bt878_mem+(adr))
 
#define btand(dat, adr)   btwrite((dat) & btread(adr), adr)
 
#define btor(dat, adr)   btwrite((dat) | btread(adr), adr)
 
#define btaor(dat, mask, adr)   btwrite((dat) | ((mask) & btread(adr)), adr)
 
#define dprintk(fmt, arg...)
 
#define RISC_WRITE   (0x01 << 28)
 
#define RISC_JUMP   (0x07 << 28)
 
#define RISC_SYNC   (0x08 << 28)
 
#define RISC_WR_SOL   (1 << 27)
 
#define RISC_WR_EOL   (1 << 26)
 
#define RISC_IRQ   (1 << 24)
 
#define RISC_STATUS(status)   ((((~status) & 0x0F) << 20) | ((status & 0x0F) << 16))
 
#define RISC_SYNC_RESYNC   (1 << 15)
 
#define RISC_SYNC_FM1   0x06
 
#define RISC_SYNC_VRO   0x0C
 
#define RISC_FLUSH()   bt->risc_pos = 0
 
#define RISC_INSTR(instr)   bt->risc_cpu[bt->risc_pos++] = cpu_to_le32(instr)
 
#define BROOKTREE_878_DEVICE(vend, dev, name)
 

Functions

 module_param_named (verbose, bt878_verbose, int, 0444)
 
 MODULE_PARM_DESC (verbose,"verbose startup messages, default is 1 (yes)")
 
 module_param_named (debug, bt878_debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"Turn on/off debugging, default is 0 (off).")
 
 EXPORT_SYMBOL (bt878_num)
 
 EXPORT_SYMBOL (bt878)
 
void bt878_start (struct bt878 *bt, u32 controlreg, u32 op_sync_orin, u32 irq_err_ignore)
 
void bt878_stop (struct bt878 *bt)
 
 EXPORT_SYMBOL (bt878_start)
 
 EXPORT_SYMBOL (bt878_stop)
 
int bt878_device_control (struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *mp)
 
 EXPORT_SYMBOL (bt878_device_control)
 
 MODULE_DEVICE_TABLE (pci, bt878_pci_tbl)
 
 module_init (bt878_init_module)
 
 module_exit (bt878_cleanup_module)
 
 MODULE_LICENSE ("GPL")
 

Variables

int bt878_num
 
struct bt878 bt878 [BT878_MAX]
 

Macro Definition Documentation

#define BROOKTREE_878_DEVICE (   vend,
  dev,
  name 
)
Value:
{ \
.subvendor = (vend), .subdevice = (dev), \
.driver_data = (unsigned long) name \
}

Definition at line 386 of file bt878.c.

#define btand (   dat,
  adr 
)    btwrite((dat) & btread(adr), adr)

Definition at line 71 of file bt878.c.

#define btaor (   dat,
  mask,
  adr 
)    btwrite((dat) | ((mask) & btread(adr)), adr)

Definition at line 73 of file bt878.c.

#define btor (   dat,
  adr 
)    btwrite((dat) | btread(adr), adr)

Definition at line 72 of file bt878.c.

#define btread (   adr)    bmtread(bt->bt878_mem+(adr))

Definition at line 69 of file bt878.c.

#define btwrite (   dat,
  adr 
)    bmtwrite((dat), (bt->bt878_mem+(adr)))

Definition at line 68 of file bt878.c.

#define dprintk (   fmt,
  arg... 
)
Value:
do { \
if (bt878_debug) \
printk(KERN_DEBUG fmt, ##arg); \
} while (0)

Definition at line 78 of file bt878.c.

#define RISC_FLUSH ( )    bt->risc_pos = 0

Definition at line 145 of file bt878.c.

#define RISC_INSTR (   instr)    bt->risc_cpu[bt->risc_pos++] = cpu_to_le32(instr)

Definition at line 146 of file bt878.c.

#define RISC_IRQ   (1 << 24)

Definition at line 139 of file bt878.c.

#define RISC_JUMP   (0x07 << 28)

Definition at line 133 of file bt878.c.

#define RISC_STATUS (   status)    ((((~status) & 0x0F) << 20) | ((status & 0x0F) << 16))

Definition at line 140 of file bt878.c.

#define RISC_SYNC   (0x08 << 28)

Definition at line 134 of file bt878.c.

#define RISC_SYNC_FM1   0x06

Definition at line 142 of file bt878.c.

#define RISC_SYNC_RESYNC   (1 << 15)

Definition at line 141 of file bt878.c.

#define RISC_SYNC_VRO   0x0C

Definition at line 143 of file bt878.c.

#define RISC_WR_EOL   (1 << 26)

Definition at line 138 of file bt878.c.

#define RISC_WR_SOL   (1 << 27)

Definition at line 137 of file bt878.c.

#define RISC_WRITE   (0x01 << 28)

Definition at line 132 of file bt878.c.

Function Documentation

int bt878_device_control ( struct bt878 bt,
unsigned int  cmd,
union dst_gpio_packet mp 
)

Definition at line 344 of file bt878.c.

void bt878_start ( struct bt878 bt,
u32  controlreg,
u32  op_sync_orin,
u32  irq_err_ignore 
)

Definition at line 210 of file bt878.c.

void bt878_stop ( struct bt878 bt)

Definition at line 244 of file bt878.c.

EXPORT_SYMBOL ( bt878_num  )
EXPORT_SYMBOL ( bt878  )
EXPORT_SYMBOL ( bt878_start  )
EXPORT_SYMBOL ( bt878_stop  )
EXPORT_SYMBOL ( bt878_device_control  )
MODULE_DEVICE_TABLE ( pci  ,
bt878_pci_tbl   
)
module_exit ( bt878_cleanup_module  )
module_init ( bt878_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( verbose  ,
bt878_verbose  ,
int  ,
0444   
)
module_param_named ( debug  ,
bt878_debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( verbose  ,
"verbose startup  messages,
default is 1(yes)"   
)
MODULE_PARM_DESC ( debug  ,
"Turn on/off  debugging,
default is 0(off)."   
)

Variable Documentation

Definition at line 63 of file bt878.c.

int bt878_num

Definition at line 62 of file bt878.c.