IPMUX1IPMUX2IPMUX3: cpuif module

RTL96xx (RTL9607,...)

cpuif module


详细描述

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

作者:
[email protected]
版本:
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.c36行定义。

#define OPL_DMA_VAL_MAX   2048
 

在文件opl_cpuif.c37行定义。

参考自 opl_host_ioctl().

#define OPL_HOST_MAJOR   130
 

在文件opl_cpuif.c33行定义。

参考自 opl_host_dma_exit()opl_host_dma_init().

#define OPL_HOST_NAME   "opl_cpuif"
 

在文件opl_cpuif.c34行定义。

参考自 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.c134行定义。

参考 opl_host_dma0_irq_eventopl_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.c194行定义。

参考 dma_request_data_s::bddma_request_data_s::bufDISABLE_IPMUX_HOST_DMA0_INTERRUPTdma_request_data_tdma_request_phys_addr_tdma_request_data_s::dmasdma_request_phys_addr_s::dmasENABLE_IPMUX_HOST_DMA0_INTERRUPTGET_IPMUX_DMA_RX_BUF_DATAGET_IPMUX_DMA_RX_PHYS_ADDRGET_IPMUX_DMA_TX_PHYS_ADDRipmux_irq_disable()ipmux_irq_enable()dma_request_data_s::lenOPL_DMA_VAL_MAXopl_host_dma0_irq_eventopl_host_dma0_waitqopl_host_is_openOPL_HOSTDMA0_IRQdma_request_phys_addr_s::phys_addrrx_phys_addrSET_IPMUX_DMA_TX_BUF_DATAtx_phys_addrWAIT_FOR_IPMUX_HOST_DMA0_INTERRUPT.

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

在文件opl_cpuif.c143行定义。

参考 opl_host_is_openopl_host_open_count.

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

在文件opl_cpuif.c163行定义。

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

在文件opl_cpuif.c153行定义。

参考 opl_host_is_openopl_host_open_count.

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

在文件opl_cpuif.c168行定义。


变量文档

char* dma0_rx_buf = NULL [static]
 

在文件opl_cpuif.c88行定义。

参考自 opl_host_dma_exit()opl_host_dma_init().

char* dma0_tx_buf = NULL [static]
 

在文件opl_cpuif.c89行定义。

参考自 opl_host_dma_init().

u32 opl_host_dma0_irq_event = 0 [static]
 

在文件opl_cpuif.c94行定义。

参考自 host_dma0_isr()opl_host_ioctl().

wait_queue_head_t opl_host_dma0_waitq [static]
 

在文件opl_cpuif.c95行定义。

参考自 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.c96行定义。

参考自 opl_host_dma_init().

u32 opl_host_is_open = 0 [static]
 

在文件opl_cpuif.c92行定义。

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

u32 opl_host_open_count = 0 [static]
 

在文件opl_cpuif.c93行定义。

参考自 opl_host_open()opl_host_release().

u32 order = 0 [static]
 

在文件opl_cpuif.c91行定义。

参考自 opl_host_dma_exit()opl_host_dma_init().

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

在文件opl_cpuif.c86行定义。

参考自 opl_host_dma_init()opl_host_ioctl().

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

在文件opl_cpuif.c85行定义。

参考自 opl_host_dma_init()opl_host_ioctl().


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