Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
dma.h File Reference
#include <linux/interrupt.h>
#include <mach/dma.h>
#include <linux/atomic.h>
#include <asm/blackfin.h>
#include <asm/page.h>
#include <asm-generic/dma.h>
#include <asm/bfin_dma.h>

Go to the source code of this file.

Data Structures

struct  dma_desc_array
 
struct  dmasg
 
struct  dma_register
 
struct  dma_channel
 

Macros

#define DATA_SIZE_8   0
 
#define DATA_SIZE_16   1
 
#define DATA_SIZE_32   2
 
#define DMA_FLOW_STOP   0
 
#define DMA_FLOW_AUTO   1
 
#define DMA_FLOW_ARRAY   4
 
#define DMA_FLOW_SMALL   6
 
#define DMA_FLOW_LARGE   7
 
#define DIMENSION_LINEAR   0
 
#define DIMENSION_2D   1
 
#define DIR_READ   0
 
#define DIR_WRITE   1
 
#define INTR_DISABLE   0
 
#define INTR_ON_BUF   2
 
#define INTR_ON_ROW   3
 
#define DMA_NOSYNC_KEEP_DMA_BUF   0
 
#define DMA_SYNC_RESTART   1
 
#define DMA_MMR_SIZE_TYPE   short
 
#define DMA_MMR_READ   bfin_read16
 
#define DMA_MMR_WRITE   bfin_write16
 

Functions

struct dma_desc_array __attribute__ ((packed))
 
int channel2irq (unsigned int channel)
 
int set_dma_callback (unsigned int channel, irq_handler_t callback, void *data)
 
voiddma_memcpy (void *dest, const void *src, size_t count)
 
voiddma_memcpy_nocache (void *dest, const void *src, size_t count)
 
voidsafe_dma_memcpy (void *dest, const void *src, size_t count)
 
void blackfin_dma_early_init (void)
 
void early_dma_memcpy (void *dest, const void *src, size_t count)
 
void early_dma_memcpy_done (void)
 

Variables

unsigned long start_addr
 
unsigned DMA_MMR_SIZE_TYPE cfg
 
unsigned DMA_MMR_SIZE_TYPE x_count
 
DMA_MMR_SIZE_TYPE x_modify
 
voidnext_desc_addr
 
unsigned DMA_MMR_SIZE_TYPE y_count
 
DMA_MMR_SIZE_TYPE y_modify
 
struct dma_register __attribute__
 
struct dma_channel dma_ch [MAX_DMA_CHANNELS]
 
struct dma_register *const dma_io_base_addr [MAX_DMA_CHANNELS]
 

Macro Definition Documentation

#define DATA_SIZE_16   1

Definition at line 23 of file dma.h.

#define DATA_SIZE_32   2

Definition at line 24 of file dma.h.

#define DATA_SIZE_8   0

Definition at line 22 of file dma.h.

#define DIMENSION_2D   1

Definition at line 43 of file dma.h.

#define DIMENSION_LINEAR   0

Definition at line 42 of file dma.h.

#define DIR_READ   0

Definition at line 45 of file dma.h.

#define DIR_WRITE   1

Definition at line 46 of file dma.h.

#define DMA_FLOW_ARRAY   4

Definition at line 37 of file dma.h.

#define DMA_FLOW_AUTO   1

Definition at line 30 of file dma.h.

#define DMA_FLOW_LARGE   7

Definition at line 39 of file dma.h.

#define DMA_FLOW_SMALL   6

Definition at line 38 of file dma.h.

#define DMA_FLOW_STOP   0

Definition at line 29 of file dma.h.

#define DMA_MMR_READ   bfin_read16

Definition at line 64 of file dma.h.

#define DMA_MMR_SIZE_TYPE   short

Definition at line 63 of file dma.h.

#define DMA_MMR_WRITE   bfin_write16

Definition at line 65 of file dma.h.

#define DMA_NOSYNC_KEEP_DMA_BUF   0

Definition at line 55 of file dma.h.

#define DMA_SYNC_RESTART   1

Definition at line 56 of file dma.h.

#define INTR_DISABLE   0

Definition at line 48 of file dma.h.

#define INTR_ON_BUF   2

Definition at line 52 of file dma.h.

#define INTR_ON_ROW   3

Definition at line 53 of file dma.h.

Function Documentation

struct dma_desc_array __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

void blackfin_dma_early_init ( void  )

blackfin_dma_early_init - minimal DMA init

Setup a few DMA registers so we can safely do DMA transfers early on in the kernel booting process. Really this just means using dma_memcpy().

Definition at line 265 of file bfin_dma.c.

int channel2irq ( unsigned int  channel)

Definition at line 34 of file dma.c.

void* dma_memcpy ( void pdst,
const void psrc,
size_t  size 
)

dma_memcpy - DMA memcpy under mutex lock

Do not check arguments before starting the DMA memcpy. Break the transfer up into two pieces. The first transfer is in multiples of 64k and the second transfer is the piece smaller than 64k.

Definition at line 532 of file bfin_dma.c.

void* dma_memcpy_nocache ( void pdst,
const void psrc,
size_t  size 
)

dma_memcpy_nocache - DMA memcpy under mutex lock

  • No cache flush/invalidate

Do not check arguments before starting the DMA memcpy. Break the transfer up into two pieces. The first transfer is in multiples of 64k and the second transfer is the piece smaller than 64k.

Definition at line 555 of file bfin_dma.c.

void early_dma_memcpy ( void dest,
const void src,
size_t  count 
)

Definition at line 272 of file bfin_dma.c.

void early_dma_memcpy_done ( void  )

Definition at line 341 of file bfin_dma.c.

void* safe_dma_memcpy ( void dst,
const void src,
size_t  size 
)

safe_dma_memcpy - DMA memcpy w/argument checking

Verify arguments are safe before heading to dma_memcpy().

Definition at line 577 of file bfin_dma.c.

int set_dma_callback ( unsigned int  channel,
irq_handler_t  callback,
void data 
)

Definition at line 157 of file bfin_dma.c.

Variable Documentation

unsigned DMA_MMR_SIZE_TYPE cfg

Definition at line 75 of file dma.h.

Definition at line 30 of file bfin_dma.c.

Definition at line 14 of file dma.c.

void* next_desc_addr

Definition at line 84 of file dma.h.

unsigned long start_addr

Definition at line 74 of file dma.h.

unsigned DMA_MMR_SIZE_TYPE x_count

Definition at line 76 of file dma.h.

Definition at line 77 of file dma.h.

unsigned DMA_MMR_SIZE_TYPE y_count

Definition at line 89 of file dma.h.

Definition at line 90 of file dma.h.