Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
dma.c File Reference
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <asm/dma.h>
#include <asm/gpio-regs.h>
#include <asm/irc-regs.h>
#include <asm/cpu-irqs.h>

Go to the source code of this file.

Data Structures

struct  frv_dma_channel
 

Macros

#define FRV_DMA_FLAGS_RESERVED   0x01
 
#define FRV_DMA_FLAGS_INUSE   0x02
 
#define FRV_DMA_FLAGS_PAUSED   0x04
 
#define __get_DMAC(IO, X)   ({ *(volatile unsigned long *)((IO) + DMAC_##X##x); })
 
#define __set_DMAC(IO, X, V)
 
#define ___set_DMAC(IO, X, V)
 
#define frv_clear_dma_inprogress(channel)   atomic_clear_mask(1 << (channel), &frv_dma_inprogress);
 
#define frv_set_dma_inprogress(channel)   atomic_set_mask(1 << (channel), &frv_dma_inprogress);
 

Functions

void __init frv_dma_init (void)
 
int frv_dma_open (const char *devname, unsigned long dmamask, int dmacap, dma_irq_handler_t handler, unsigned long irq_flags, void *data)
 
 EXPORT_SYMBOL (frv_dma_open)
 
void frv_dma_close (int dma)
 
 EXPORT_SYMBOL (frv_dma_close)
 
void frv_dma_config (int dma, unsigned long ccfr, unsigned long cctr, unsigned long apr)
 
 EXPORT_SYMBOL (frv_dma_config)
 
void frv_dma_start (int dma, unsigned long sba, unsigned long dba, unsigned long pix, unsigned long six, unsigned long bcl)
 
 EXPORT_SYMBOL (frv_dma_start)
 
void frv_dma_restart_circular (int dma, unsigned long six)
 
 EXPORT_SYMBOL (frv_dma_restart_circular)
 
void frv_dma_stop (int dma)
 
 EXPORT_SYMBOL (frv_dma_stop)
 
int is_frv_dma_interrupting (int dma)
 
 EXPORT_SYMBOL (is_frv_dma_interrupting)
 
void frv_dma_dump (int dma)
 
 EXPORT_SYMBOL (frv_dma_dump)
 
void frv_dma_pause_all (void)
 
 EXPORT_SYMBOL (frv_dma_pause_all)
 
void frv_dma_resume_all (void)
 
 EXPORT_SYMBOL (frv_dma_resume_all)
 
void frv_dma_status_clear (int dma)
 
 EXPORT_SYMBOL (frv_dma_status_clear)
 

Variables

unsigned long frv_dma_inprogress
 

Macro Definition Documentation

#define ___set_DMAC (   IO,
  X,
  V 
)
Value:
do { \
*(volatile unsigned long *)((IO) + DMAC_##X##x) = (V); \
} while(0)

Definition at line 47 of file dma.c.

#define __get_DMAC (   IO,
  X 
)    ({ *(volatile unsigned long *)((IO) + DMAC_##X##x); })

Definition at line 39 of file dma.c.

#define __set_DMAC (   IO,
  X,
  V 
)
Value:
do { \
*(volatile unsigned long *)((IO) + DMAC_##X##x) = (V); \
mb(); \
} while(0)

Definition at line 41 of file dma.c.

#define frv_clear_dma_inprogress (   channel)    atomic_clear_mask(1 << (channel), &frv_dma_inprogress);

Definition at line 114 of file dma.c.

#define FRV_DMA_FLAGS_INUSE   0x02

Definition at line 25 of file dma.c.

#define FRV_DMA_FLAGS_PAUSED   0x04

Definition at line 26 of file dma.c.

#define FRV_DMA_FLAGS_RESERVED   0x01

Definition at line 24 of file dma.c.

#define frv_set_dma_inprogress (   channel)    atomic_set_mask(1 << (channel), &frv_dma_inprogress);

Definition at line 117 of file dma.c.

Function Documentation

EXPORT_SYMBOL ( frv_dma_open  )
EXPORT_SYMBOL ( frv_dma_close  )
EXPORT_SYMBOL ( frv_dma_config  )
EXPORT_SYMBOL ( frv_dma_start  )
EXPORT_SYMBOL ( frv_dma_restart_circular  )
EXPORT_SYMBOL ( frv_dma_stop  )
EXPORT_SYMBOL ( is_frv_dma_interrupting  )
EXPORT_SYMBOL ( frv_dma_dump  )
EXPORT_SYMBOL ( frv_dma_pause_all  )
EXPORT_SYMBOL ( frv_dma_resume_all  )
EXPORT_SYMBOL ( frv_dma_status_clear  )
void frv_dma_close ( int  dma)

Definition at line 239 of file dma.c.

void frv_dma_config ( int  dma,
unsigned long  ccfr,
unsigned long  cctr,
unsigned long  apr 
)

Definition at line 260 of file dma.c.

void frv_dma_dump ( int  dma)

Definition at line 355 of file dma.c.

void __init frv_dma_init ( void  )

Definition at line 139 of file dma.c.

int frv_dma_open ( const char devname,
unsigned long  dmamask,
int  dmacap,
dma_irq_handler_t  handler,
unsigned long  irq_flags,
void data 
)

Definition at line 169 of file dma.c.

void frv_dma_pause_all ( void  )

Definition at line 377 of file dma.c.

void frv_dma_restart_circular ( int  dma,
unsigned long  six 
)

Definition at line 302 of file dma.c.

void frv_dma_resume_all ( void  )

Definition at line 418 of file dma.c.

void frv_dma_start ( int  dma,
unsigned long  sba,
unsigned long  dba,
unsigned long  pix,
unsigned long  six,
unsigned long  bcl 
)

Definition at line 277 of file dma.c.

void frv_dma_status_clear ( int  dma)

Definition at line 454 of file dma.c.

void frv_dma_stop ( int  dma)

Definition at line 321 of file dma.c.

int is_frv_dma_interrupting ( int  dma)

Definition at line 341 of file dma.c.

Variable Documentation

unsigned long frv_dma_inprogress

Definition at line 112 of file dma.c.