flinkLinux
flink Linux Kernel Modules
 All Data Structures Files Functions Variables Macros Pages
flink_pci.c File Reference

PCI bus communication module. More...

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/pci.h>
#include "flink.h"
#include "flink_pci.h"
Include dependency graph for flink_pci.c:

Macros

#define MODULE_NAME   THIS_MODULE->name
 
#define BAR_0   0
 

Functions

 MODULE_AUTHOR ("Martin Zueger <martin@zueger.eu>")
 
 MODULE_DESCRIPTION ("fLink PCI/PCIe module")
 
 MODULE_SUPPORTED_DEVICE ("fLink PCI/PCIe devices")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
 module_param (vid, ushort, 0444)
 
 MODULE_PARM_DESC (vid,"PCI vendor ID, eg. '0x1172' for Altera")
 
 module_param (pid, ushort, 0444)
 
 MODULE_PARM_DESC (pid,"PCI product ID, eg. '0x000'")
 
u8 pci_read8 (struct flink_device *fdev, u32 addr)
 
u16 pci_read16 (struct flink_device *fdev, u32 addr)
 
u32 pci_read32 (struct flink_device *fdev, u32 addr)
 
int pci_write8 (struct flink_device *fdev, u32 addr, u8 val)
 
int pci_write16 (struct flink_device *fdev, u32 addr, u16 val)
 
int pci_write32 (struct flink_device *fdev, u32 addr, u32 val)
 
u32 pci_address_space_size (struct flink_device *fdev)
 
 module_init (flink_pci_init)
 
 module_exit (flink_pci_exit)
 

Variables

struct flink_bus_ops pci_bus_ops
 

Detailed Description

PCI bus communication module.

Implements read and write functions over pci bus.

Author
Martin Züger
Urs Graf

Macro Definition Documentation

#define BAR_0   0
#define MODULE_NAME   THIS_MODULE->name

Function Documentation

MODULE_AUTHOR ( "Martin Zueger <martin@zueger.eu>"  )
MODULE_DESCRIPTION ( "fLink PCI/PCIe module"  )
module_exit ( flink_pci_exit  )
module_init ( flink_pci_init  )
MODULE_LICENSE ( "Dual BSD/GPL"  )
module_param ( vid  ,
ushort  ,
0444   
)
module_param ( pid  ,
ushort  ,
0444   
)
MODULE_PARM_DESC ( vid  ,
"PCI vendor  ID,
eg. '0x1172'for Altera"   
)
MODULE_PARM_DESC ( pid  ,
"PCI product  ID,
eg. '0x000'"   
)
MODULE_SUPPORTED_DEVICE ( "fLink PCI/PCIe devices"  )
u32 pci_address_space_size ( struct flink_device fdev)
u16 pci_read16 ( struct flink_device fdev,
u32  addr 
)
u32 pci_read32 ( struct flink_device fdev,
u32  addr 
)
u8 pci_read8 ( struct flink_device fdev,
u32  addr 
)
int pci_write16 ( struct flink_device fdev,
u32  addr,
u16  val 
)
int pci_write32 ( struct flink_device fdev,
u32  addr,
u32  val 
)
int pci_write8 ( struct flink_device fdev,
u32  addr,
u8  val 
)

Variable Documentation

struct flink_bus_ops pci_bus_ops
Initial value:
= {
.read8 = pci_read8,
.read16 = pci_read16,
.read32 = pci_read32,
.write8 = pci_write8,
.write16 = pci_write16,
.write32 = pci_write32,
.address_space_size = pci_address_space_size
}