Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
mantis_dma.c File Reference
#include <linux/kernel.h>
#include <asm/page.h>
#include <linux/vmalloc.h>
#include <linux/pci.h>
#include <asm/irq.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include "dmxdev.h"
#include "dvbdev.h"
#include "dvb_demux.h"
#include "dvb_frontend.h"
#include "dvb_net.h"
#include "mantis_common.h"
#include "mantis_reg.h"
#include "mantis_dma.h"

Go to the source code of this file.

Macros

#define RISC_WRITE   (0x01 << 28)
 
#define RISC_JUMP   (0x07 << 28)
 
#define RISC_IRQ   (0x01 << 24)
 
#define RISC_STATUS(status)   ((((~status) & 0x0f) << 20) | ((status & 0x0f) << 16))
 
#define RISC_FLUSH(risc_pos)   (risc_pos = 0)
 
#define RISC_INSTR(risc_pos, opcode)   (mantis->risc_cpu[risc_pos++] = cpu_to_le32(opcode))
 
#define MANTIS_BUF_SIZE   (64 * 1024)
 
#define MANTIS_BLOCK_BYTES   (MANTIS_BUF_SIZE / 4)
 
#define MANTIS_DMA_TR_BYTES   (2 * 1024) /* upper limit: 4095 bytes. */
 
#define MANTIS_BLOCK_COUNT   (MANTIS_BUF_SIZE / MANTIS_BLOCK_BYTES)
 
#define MANTIS_DMA_TR_UNITS   (MANTIS_BLOCK_BYTES / MANTIS_DMA_TR_BYTES)
 
#define MANTIS_RISC_SIZE   PAGE_SIZE /* RISC program must fit here. */
 

Functions

int mantis_dma_exit (struct mantis_pci *mantis)
 
 EXPORT_SYMBOL_GPL (mantis_dma_exit)
 
int mantis_dma_init (struct mantis_pci *mantis)
 
 EXPORT_SYMBOL_GPL (mantis_dma_init)
 
void mantis_dma_start (struct mantis_pci *mantis)
 
void mantis_dma_stop (struct mantis_pci *mantis)
 
void mantis_dma_xfer (unsigned long data)
 

Macro Definition Documentation

#define MANTIS_BLOCK_BYTES   (MANTIS_BUF_SIZE / 4)

Definition at line 50 of file mantis_dma.c.

#define MANTIS_BLOCK_COUNT   (MANTIS_BUF_SIZE / MANTIS_BLOCK_BYTES)

Definition at line 52 of file mantis_dma.c.

#define MANTIS_BUF_SIZE   (64 * 1024)

Definition at line 49 of file mantis_dma.c.

#define MANTIS_DMA_TR_BYTES   (2 * 1024) /* upper limit: 4095 bytes. */

Definition at line 51 of file mantis_dma.c.

#define MANTIS_DMA_TR_UNITS   (MANTIS_BLOCK_BYTES / MANTIS_DMA_TR_BYTES)

Definition at line 54 of file mantis_dma.c.

#define MANTIS_RISC_SIZE   PAGE_SIZE /* RISC program must fit here. */

Definition at line 56 of file mantis_dma.c.

#define RISC_FLUSH (   risc_pos)    (risc_pos = 0)

Definition at line 46 of file mantis_dma.c.

#define RISC_INSTR (   risc_pos,
  opcode 
)    (mantis->risc_cpu[risc_pos++] = cpu_to_le32(opcode))

Definition at line 47 of file mantis_dma.c.

#define RISC_IRQ   (0x01 << 24)

Definition at line 43 of file mantis_dma.c.

#define RISC_JUMP   (0x07 << 28)

Definition at line 42 of file mantis_dma.c.

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

Definition at line 45 of file mantis_dma.c.

#define RISC_WRITE   (0x01 << 28)

Definition at line 41 of file mantis_dma.c.

Function Documentation

EXPORT_SYMBOL_GPL ( mantis_dma_exit  )
EXPORT_SYMBOL_GPL ( mantis_dma_init  )
int mantis_dma_exit ( struct mantis_pci mantis)

Definition at line 58 of file mantis_dma.c.

int mantis_dma_init ( struct mantis_pci mantis)

Definition at line 131 of file mantis_dma.c.

void mantis_dma_start ( struct mantis_pci mantis)

Definition at line 182 of file mantis_dma.c.

void mantis_dma_stop ( struct mantis_pci mantis)

Definition at line 200 of file mantis_dma.c.

void mantis_dma_xfer ( unsigned long  data)

Definition at line 217 of file mantis_dma.c.