IPMUX1IPMUX2IPMUX3: cpuif module

From RTL96xx (RTL9607,...)

cpuif module


详细描述

THE FORMAT is FOR DOXYGEN to Generate the document automatically opulan.com.

作者:
stephanxu@sina.com
版本:
v0.1
日期:
July-30-2007 date description
------------------------------------------------------------------- July-30-2007 initial version for cpuif module.begin data July-15-2007.


模块

组  function-description(opl_cpuif.c)

Macro definition

#define OPL_HOST_MAJOR   130
#define OPL_HOST_NAME   "opl_cpuif"
#define IPMUX_DMA_NUMS   4
#define OPL_DMA_VAL_MAX   2048

global variable and function imported

void ipmux_irq_enable (unsigned int irq)
void ipmux_irq_disable (unsigned int irq)

local variable declaration and definition

int opl_host_open (struct inode *inode, struct file *filp)
ssize_t opl_host_read (struct file *filp, char *buffer, size_t length, loff_t *offset)
ssize_t opl_host_write (struct file *filp, const char *buffer, size_t length, loff_t *offset)
int opl_host_release (struct inode *inode, struct file *filp)
int opl_host_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, u32 arg)
 description: it is used for api to do something associated with ioctl command.
void host_dma0_isr (int irq, void *dev_id, struct pt_regs *regs)
 description: the host dma0 interrupt handler, when the interrupt generated, it will wake up the process,which is waiting for the host dma0 interrupt.
u32 tx_phys_addr [IPMUX_DMA_NUMS] = {0}
u32 rx_phys_addr [IPMUX_DMA_NUMS] = {0}
char * dma0_rx_buf = NULL
char * dma0_tx_buf = NULL
u32 order = 0
u32 opl_host_is_open = 0
u32 opl_host_open_count = 0
u32 opl_host_dma0_irq_event = 0
wait_queue_head_t opl_host_dma0_waitq
file_operations opl_host_fops

宏定义文档

#define IPMUX_DMA_NUMS   4
 

在文件opl_cpuif.c第36行定义。

#define OPL_DMA_VAL_MAX   2048
 

在文件opl_cpuif.c第37行定义。

参考自 opl_host_ioctl().

#define OPL_HOST_MAJOR   130
 

在文件opl_cpuif.c第33行定义。

参考自 opl_host_dma_exit()及opl_host_dma_init().

#define OPL_HOST_NAME   "opl_cpuif"
 

在文件opl_cpuif.c第34行定义。

参考自 opl_host_dma_exit()及opl_host_dma_init().


函数文档

void host_dma0_isr (  int  irq,
void *  dev_id,
struct pt_regs *  regs
)  [static]
 

description: the host dma0 interrupt handler, when the interrupt generated, it will wake up the process,which is waiting for the host dma0 interrupt.

参数:
int irq:
void *dev_id:
struct pt_regs *regs:
返回:
NULL
参见:
Deprecated:

在文件opl_cpuif.c第134行定义。

参考 opl_host_dma0_irq_event及opl_host_dma0_waitq.

参考自 opl_host_dma_init().

void ipmux_irq_disable (  unsigned int  irq  ) 
 

void ipmux_irq_enable (  unsigned int  irq  ) 
 

int opl_host_ioctl (  struct inode *  inode,
struct file *  filp,
unsigned int  cmd,
u32  arg
)  [static]
 

description: it is used for api to do something associated with ioctl command.

参数:
struct inode *inode:
struct file *filp:
unsigned int cmd: $:GET_IPMUX_DMA_RX_PHYS_ADDR:return the dma buffer physical address to user(set in dma's base address register) $:GET_IPMUX_DMA_TX_PHYS_ADDR:now,it is not used.all merge in rx buffer. $:GET_IPMUX_DMA_RX_BUF_DATA: receive the data to user,by dma_request_data_t struct. $:SET_IPMUX_DMA_TX_BUF_DATA: send the data to tx buffer, by dma_request_data_t struct. $:ENABLE_IPMUX_HOST_DMA0_INTERRUPT: enable the dma0 interrupt. $:DISABLE_IPMUX_HOST_DMA0_INTERRUPT: disable the dma0 interrupt. $:WAIT_FOR_IPMUX_HOST_DMA0_INTERRUPT: wait for dma0 interrupt generated.
u32 arg: $for PHY_ADDR: it is dma_request_phys_addr_t $for BUF_DATA: it is dma_request_data_t $for INTERRUPT: NULL
返回值:
0 is success
!0 is fail
参见:
Deprecated:

在文件opl_cpuif.c第194行定义。

参考 dma_request_data_s::bd、dma_request_data_s::buf、DISABLE_IPMUX_HOST_DMA0_INTERRUPT、dma_request_data_t、dma_request_phys_addr_t、dma_request_data_s::dmas、dma_request_phys_addr_s::dmas、ENABLE_IPMUX_HOST_DMA0_INTERRUPT、GET_IPMUX_DMA_RX_BUF_DATA、GET_IPMUX_DMA_RX_PHYS_ADDR、GET_IPMUX_DMA_TX_PHYS_ADDR、ipmux_irq_disable()、ipmux_irq_enable()、dma_request_data_s::len、OPL_DMA_VAL_MAX、opl_host_dma0_irq_event、opl_host_dma0_waitq、opl_host_is_open、OPL_HOSTDMA0_IRQ、dma_request_phys_addr_s::phys_addr、rx_phys_addr、SET_IPMUX_DMA_TX_BUF_DATA、tx_phys_addr及WAIT_FOR_IPMUX_HOST_DMA0_INTERRUPT.

int opl_host_open (  struct inode *  inode,
struct file *  filp
)  [static]
 

在文件opl_cpuif.c第143行定义。

参考 opl_host_is_open及opl_host_open_count.

ssize_t opl_host_read (  struct file *  filp,
char *  buffer,
size_t  length,
loff_t *  offset
)  [static]
 

在文件opl_cpuif.c第163行定义。

int opl_host_release (  struct inode *  inode,
struct file *  filp
)  [static]
 

在文件opl_cpuif.c第153行定义。

参考 opl_host_is_open及opl_host_open_count.

ssize_t opl_host_write (  struct file *  filp,
const char *  buffer,
size_t  length,
loff_t *  offset
)  [static]
 

在文件opl_cpuif.c第168行定义。


变量文档

char* dma0_rx_buf = NULL [static]
 

在文件opl_cpuif.c第88行定义。

参考自 opl_host_dma_exit()及opl_host_dma_init().

char* dma0_tx_buf = NULL [static]
 

在文件opl_cpuif.c第89行定义。

参考自 opl_host_dma_init().

u32 opl_host_dma0_irq_event = 0 [static]
 

在文件opl_cpuif.c第94行定义。

参考自 host_dma0_isr()及opl_host_ioctl().

wait_queue_head_t opl_host_dma0_waitq [static]
 

在文件opl_cpuif.c第95行定义。

参考自 host_dma0_isr()、opl_host_dma_init()及opl_host_ioctl().

struct file_operations opl_host_fops
 

初始化序列:

 {
  .open = opl_host_open,
  .read = opl_host_read,
  .write = opl_host_write,
  .release = opl_host_release,
  .ioctl = opl_host_ioctl,
}

在文件opl_cpuif.c第96行定义。

参考自 opl_host_dma_init().

u32 opl_host_is_open = 0 [static]
 

在文件opl_cpuif.c第92行定义。

参考自 opl_host_ioctl()、opl_host_open()及opl_host_release().

u32 opl_host_open_count = 0 [static]
 

在文件opl_cpuif.c第93行定义。

参考自 opl_host_open()及opl_host_release().

u32 order = 0 [static]
 

在文件opl_cpuif.c第91行定义。

参考自 opl_host_dma_exit()及opl_host_dma_init().

u32 rx_phys_addr[IPMUX_DMA_NUMS] = {0} [static]
 

在文件opl_cpuif.c第86行定义。

参考自 opl_host_dma_init()及opl_host_ioctl().

u32 tx_phys_addr[IPMUX_DMA_NUMS] = {0} [static]
 

在文件opl_cpuif.c第85行定义。

参考自 opl_host_dma_init()及opl_host_ioctl().


Generated at Mon Jul 30 16:43:48 2007 for IPMUX1IPMUX2IPMUX3 by  doxygen 1.3.9.1