opl_cpuif.c文件参考
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <ipmux_interrupt.h>
#include <opl_cpuif.h>
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 |
函数 | |
int __init | opl_host_dma_init (void) |
description: the module's entry. | |
void __exit | opl_host_dma_exit (void) |
description:the module's exit. | |
module_init (opl_host_dma_init) | |
module_exit (opl_host_dma_exit) | |
MODULE_LICENSE ("GPL2") | |
MODULE_AUTHOR ("opulan Inc") | |
MODULE_DESCRIPTION ("opulan IPMUX-e switch chip driver module") |
Generated at Mon Jul 30 16:43:48 2007 for IPMUX1IPMUX2IPMUX3 by 1.3.9.1