Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
jazzdma.h File Reference

Go to the source code of this file.

Data Structures

struct  VDMA_PGTBL_ENTRY
 

Macros

#define VDMA_PAGESIZE   4096
 
#define VDMA_PGTBL_ENTRIES   4096
 
#define VDMA_PGTBL_SIZE   (sizeof(VDMA_PGTBL_ENTRY) * VDMA_PGTBL_ENTRIES)
 
#define VDMA_PAGE_EMPTY   0xff000000
 
#define VDMA_PAGE(a)   ((unsigned int)(a) >> 12)
 
#define VDMA_OFFSET(a)   ((unsigned int)(a) & (VDMA_PAGESIZE-1))
 
#define VDMA_ERROR   0xffffffff
 
#define JAZZ_R4030_CHNL_MODE   0xE0000100 /* 8 DMA Channel Mode Registers, */
 
#define JAZZ_R4030_CHNL_ENABLE   0xE0000108 /* 8 DMA Channel Enable Regs, */
 
#define JAZZ_R4030_CHNL_COUNT   0xE0000110 /* 8 DMA Channel Byte Cnt Regs, */
 
#define JAZZ_R4030_CHNL_ADDR   0xE0000118 /* 8 DMA Channel Address Regs, */
 
#define R4030_CHNL_ENABLE   (1<<0)
 
#define R4030_CHNL_WRITE   (1<<1)
 
#define R4030_TC_INTR   (1<<8)
 
#define R4030_MEM_INTR   (1<<9)
 
#define R4030_ADDR_INTR   (1<<10)
 
#define R4030_MODE_ATIME_40   (0) /* device access time on remote bus */
 
#define R4030_MODE_ATIME_80   (1)
 
#define R4030_MODE_ATIME_120   (2)
 
#define R4030_MODE_ATIME_160   (3)
 
#define R4030_MODE_ATIME_200   (4)
 
#define R4030_MODE_ATIME_240   (5)
 
#define R4030_MODE_ATIME_280   (6)
 
#define R4030_MODE_ATIME_320   (7)
 
#define R4030_MODE_WIDTH_8   (1<<3) /* device data bus width */
 
#define R4030_MODE_WIDTH_16   (2<<3)
 
#define R4030_MODE_WIDTH_32   (3<<3)
 
#define R4030_MODE_INTR_EN   (1<<5)
 
#define R4030_MODE_BURST   (1<<6) /* Rev. 2 only */
 
#define R4030_MODE_FAST_ACK   (1<<7) /* Rev. 2 only */
 

Typedefs

typedef struct VDMA_PGTBL_ENTRY VDMA_PGTBL_ENTRY
 

Functions

unsigned long vdma_alloc (unsigned long paddr, unsigned long size)
 
int vdma_free (unsigned long laddr)
 
int vdma_remap (unsigned long laddr, unsigned long paddr, unsigned long size)
 
unsigned long vdma_phys2log (unsigned long paddr)
 
unsigned long vdma_log2phys (unsigned long laddr)
 
void vdma_stats (void)
 
void vdma_enable (int channel)
 
void vdma_disable (int channel)
 
void vdma_set_mode (int channel, int mode)
 
void vdma_set_addr (int channel, long addr)
 
void vdma_set_count (int channel, int count)
 
int vdma_get_residue (int channel)
 
int vdma_get_enable (int channel)
 

Macro Definition Documentation

#define JAZZ_R4030_CHNL_ADDR   0xE0000118 /* 8 DMA Channel Address Regs, */

Definition at line 66 of file jazzdma.h.

#define JAZZ_R4030_CHNL_COUNT   0xE0000110 /* 8 DMA Channel Byte Cnt Regs, */

Definition at line 64 of file jazzdma.h.

#define JAZZ_R4030_CHNL_ENABLE   0xE0000108 /* 8 DMA Channel Enable Regs, */

Definition at line 62 of file jazzdma.h.

#define JAZZ_R4030_CHNL_MODE   0xE0000100 /* 8 DMA Channel Mode Registers, */

Definition at line 60 of file jazzdma.h.

#define R4030_ADDR_INTR   (1<<10)

Definition at line 75 of file jazzdma.h.

#define R4030_CHNL_ENABLE   (1<<0)

Definition at line 71 of file jazzdma.h.

#define R4030_CHNL_WRITE   (1<<1)

Definition at line 72 of file jazzdma.h.

#define R4030_MEM_INTR   (1<<9)

Definition at line 74 of file jazzdma.h.

#define R4030_MODE_ATIME_120   (2)

Definition at line 82 of file jazzdma.h.

#define R4030_MODE_ATIME_160   (3)

Definition at line 83 of file jazzdma.h.

#define R4030_MODE_ATIME_200   (4)

Definition at line 84 of file jazzdma.h.

#define R4030_MODE_ATIME_240   (5)

Definition at line 85 of file jazzdma.h.

#define R4030_MODE_ATIME_280   (6)

Definition at line 86 of file jazzdma.h.

#define R4030_MODE_ATIME_320   (7)

Definition at line 87 of file jazzdma.h.

#define R4030_MODE_ATIME_40   (0) /* device access time on remote bus */

Definition at line 80 of file jazzdma.h.

#define R4030_MODE_ATIME_80   (1)

Definition at line 81 of file jazzdma.h.

#define R4030_MODE_BURST   (1<<6) /* Rev. 2 only */

Definition at line 92 of file jazzdma.h.

#define R4030_MODE_FAST_ACK   (1<<7) /* Rev. 2 only */

Definition at line 93 of file jazzdma.h.

#define R4030_MODE_INTR_EN   (1<<5)

Definition at line 91 of file jazzdma.h.

#define R4030_MODE_WIDTH_16   (2<<3)

Definition at line 89 of file jazzdma.h.

#define R4030_MODE_WIDTH_32   (3<<3)

Definition at line 90 of file jazzdma.h.

#define R4030_MODE_WIDTH_8   (1<<3) /* device data bus width */

Definition at line 88 of file jazzdma.h.

#define R4030_TC_INTR   (1<<8)

Definition at line 73 of file jazzdma.h.

#define VDMA_ERROR   0xffffffff

Definition at line 45 of file jazzdma.h.

#define VDMA_OFFSET (   a)    ((unsigned int)(a) & (VDMA_PAGESIZE-1))

Definition at line 39 of file jazzdma.h.

#define VDMA_PAGE (   a)    ((unsigned int)(a) >> 12)

Definition at line 38 of file jazzdma.h.

#define VDMA_PAGE_EMPTY   0xff000000

Definition at line 32 of file jazzdma.h.

#define VDMA_PAGESIZE   4096

Definition at line 29 of file jazzdma.h.

#define VDMA_PGTBL_ENTRIES   4096

Definition at line 30 of file jazzdma.h.

#define VDMA_PGTBL_SIZE   (sizeof(VDMA_PGTBL_ENTRY) * VDMA_PGTBL_ENTRIES)

Definition at line 31 of file jazzdma.h.

Typedef Documentation

Function Documentation

unsigned long vdma_alloc ( unsigned long  paddr,
unsigned long  size 
)

Definition at line 92 of file jazzdma.c.

void vdma_disable ( int  channel)

Definition at line 395 of file jazzdma.c.

void vdma_enable ( int  channel)

Definition at line 357 of file jazzdma.c.

int vdma_free ( unsigned long  laddr)

Definition at line 181 of file jazzdma.c.

int vdma_get_enable ( int  channel)

Definition at line 545 of file jazzdma.c.

int vdma_get_residue ( int  channel)

Definition at line 529 of file jazzdma.c.

unsigned long vdma_log2phys ( unsigned long  laddr)

Definition at line 306 of file jazzdma.c.

unsigned long vdma_phys2log ( unsigned long  paddr)

Definition at line 283 of file jazzdma.c.

int vdma_remap ( unsigned long  laddr,
unsigned long  paddr,
unsigned long  size 
)

Definition at line 212 of file jazzdma.c.

void vdma_set_addr ( int  channel,
long  addr 
)

Definition at line 501 of file jazzdma.c.

void vdma_set_count ( int  channel,
int  count 
)

Definition at line 515 of file jazzdma.c.

void vdma_set_mode ( int  channel,
int  mode 
)

Definition at line 438 of file jazzdma.c.

void vdma_stats ( void  )

Definition at line 316 of file jazzdma.c.