Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ebus.c File Reference
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <asm/ebus_dma.h>
#include <asm/io.h>

Go to the source code of this file.

Macros

#define EBDMA_CSR   0x00UL /* Control/Status */
 
#define EBDMA_ADDR   0x04UL /* DMA Address */
 
#define EBDMA_COUNT   0x08UL /* DMA Count */
 
#define EBDMA_CSR_INT_PEND   0x00000001
 
#define EBDMA_CSR_ERR_PEND   0x00000002
 
#define EBDMA_CSR_DRAIN   0x00000004
 
#define EBDMA_CSR_INT_EN   0x00000010
 
#define EBDMA_CSR_RESET   0x00000080
 
#define EBDMA_CSR_WRITE   0x00000100
 
#define EBDMA_CSR_EN_DMA   0x00000200
 
#define EBDMA_CSR_CYC_PEND   0x00000400
 
#define EBDMA_CSR_DIAG_RD_DONE   0x00000800
 
#define EBDMA_CSR_DIAG_WR_DONE   0x00001000
 
#define EBDMA_CSR_EN_CNT   0x00002000
 
#define EBDMA_CSR_TC   0x00004000
 
#define EBDMA_CSR_DIS_CSR_DRN   0x00010000
 
#define EBDMA_CSR_BURST_SZ_MASK   0x000c0000
 
#define EBDMA_CSR_BURST_SZ_1   0x00080000
 
#define EBDMA_CSR_BURST_SZ_4   0x00000000
 
#define EBDMA_CSR_BURST_SZ_8   0x00040000
 
#define EBDMA_CSR_BURST_SZ_16   0x000c0000
 
#define EBDMA_CSR_DIAG_EN   0x00100000
 
#define EBDMA_CSR_DIS_ERR_PEND   0x00400000
 
#define EBDMA_CSR_TCI_DIS   0x00800000
 
#define EBDMA_CSR_EN_NEXT   0x01000000
 
#define EBDMA_CSR_DMA_ON   0x02000000
 
#define EBDMA_CSR_A_LOADED   0x04000000
 
#define EBDMA_CSR_NA_LOADED   0x08000000
 
#define EBDMA_CSR_DEV_ID_MASK   0xf0000000
 
#define EBUS_DMA_RESET_TIMEOUT   10000
 

Functions

int ebus_dma_register (struct ebus_dma_info *p)
 
 EXPORT_SYMBOL (ebus_dma_register)
 
int ebus_dma_irq_enable (struct ebus_dma_info *p, int on)
 
 EXPORT_SYMBOL (ebus_dma_irq_enable)
 
void ebus_dma_unregister (struct ebus_dma_info *p)
 
 EXPORT_SYMBOL (ebus_dma_unregister)
 
int ebus_dma_request (struct ebus_dma_info *p, dma_addr_t bus_addr, size_t len)
 
 EXPORT_SYMBOL (ebus_dma_request)
 
void ebus_dma_prepare (struct ebus_dma_info *p, int write)
 
 EXPORT_SYMBOL (ebus_dma_prepare)
 
unsigned int ebus_dma_residue (struct ebus_dma_info *p)
 
 EXPORT_SYMBOL (ebus_dma_residue)
 
unsigned int ebus_dma_addr (struct ebus_dma_info *p)
 
 EXPORT_SYMBOL (ebus_dma_addr)
 
void ebus_dma_enable (struct ebus_dma_info *p, int on)
 
 EXPORT_SYMBOL (ebus_dma_enable)
 

Macro Definition Documentation

#define EBDMA_ADDR   0x04UL /* DMA Address */

Definition at line 18 of file ebus.c.

#define EBDMA_COUNT   0x08UL /* DMA Count */

Definition at line 19 of file ebus.c.

#define EBDMA_CSR   0x00UL /* Control/Status */

Definition at line 17 of file ebus.c.

#define EBDMA_CSR_A_LOADED   0x04000000

Definition at line 44 of file ebus.c.

#define EBDMA_CSR_BURST_SZ_1   0x00080000

Definition at line 35 of file ebus.c.

#define EBDMA_CSR_BURST_SZ_16   0x000c0000

Definition at line 38 of file ebus.c.

#define EBDMA_CSR_BURST_SZ_4   0x00000000

Definition at line 36 of file ebus.c.

#define EBDMA_CSR_BURST_SZ_8   0x00040000

Definition at line 37 of file ebus.c.

#define EBDMA_CSR_BURST_SZ_MASK   0x000c0000

Definition at line 34 of file ebus.c.

#define EBDMA_CSR_CYC_PEND   0x00000400

Definition at line 28 of file ebus.c.

#define EBDMA_CSR_DEV_ID_MASK   0xf0000000

Definition at line 46 of file ebus.c.

#define EBDMA_CSR_DIAG_EN   0x00100000

Definition at line 39 of file ebus.c.

#define EBDMA_CSR_DIAG_RD_DONE   0x00000800

Definition at line 29 of file ebus.c.

#define EBDMA_CSR_DIAG_WR_DONE   0x00001000

Definition at line 30 of file ebus.c.

#define EBDMA_CSR_DIS_CSR_DRN   0x00010000

Definition at line 33 of file ebus.c.

#define EBDMA_CSR_DIS_ERR_PEND   0x00400000

Definition at line 40 of file ebus.c.

#define EBDMA_CSR_DMA_ON   0x02000000

Definition at line 43 of file ebus.c.

#define EBDMA_CSR_DRAIN   0x00000004

Definition at line 23 of file ebus.c.

#define EBDMA_CSR_EN_CNT   0x00002000

Definition at line 31 of file ebus.c.

#define EBDMA_CSR_EN_DMA   0x00000200

Definition at line 27 of file ebus.c.

#define EBDMA_CSR_EN_NEXT   0x01000000

Definition at line 42 of file ebus.c.

#define EBDMA_CSR_ERR_PEND   0x00000002

Definition at line 22 of file ebus.c.

#define EBDMA_CSR_INT_EN   0x00000010

Definition at line 24 of file ebus.c.

#define EBDMA_CSR_INT_PEND   0x00000001

Definition at line 21 of file ebus.c.

#define EBDMA_CSR_NA_LOADED   0x08000000

Definition at line 45 of file ebus.c.

#define EBDMA_CSR_RESET   0x00000080

Definition at line 25 of file ebus.c.

#define EBDMA_CSR_TC   0x00004000

Definition at line 32 of file ebus.c.

#define EBDMA_CSR_TCI_DIS   0x00800000

Definition at line 41 of file ebus.c.

#define EBDMA_CSR_WRITE   0x00000100

Definition at line 26 of file ebus.c.

#define EBUS_DMA_RESET_TIMEOUT   10000

Definition at line 48 of file ebus.c.

Function Documentation

unsigned int ebus_dma_addr ( struct ebus_dma_info p)

Definition at line 235 of file ebus.c.

void ebus_dma_enable ( struct ebus_dma_info p,
int  on 
)

Definition at line 241 of file ebus.c.

int ebus_dma_irq_enable ( struct ebus_dma_info p,
int  on 
)

Definition at line 124 of file ebus.c.

void ebus_dma_prepare ( struct ebus_dma_info p,
int  write 
)

Definition at line 205 of file ebus.c.

int ebus_dma_register ( struct ebus_dma_info p)

Definition at line 97 of file ebus.c.

int ebus_dma_request ( struct ebus_dma_info p,
dma_addr_t  bus_addr,
size_t  len 
)

Definition at line 176 of file ebus.c.

unsigned int ebus_dma_residue ( struct ebus_dma_info p)

Definition at line 229 of file ebus.c.

void ebus_dma_unregister ( struct ebus_dma_info p)

Definition at line 156 of file ebus.c.

EXPORT_SYMBOL ( ebus_dma_register  )
EXPORT_SYMBOL ( ebus_dma_irq_enable  )
EXPORT_SYMBOL ( ebus_dma_unregister  )
EXPORT_SYMBOL ( ebus_dma_request  )
EXPORT_SYMBOL ( ebus_dma_prepare  )
EXPORT_SYMBOL ( ebus_dma_residue  )
EXPORT_SYMBOL ( ebus_dma_addr  )
EXPORT_SYMBOL ( ebus_dma_enable  )