#include "axis_driver.h"
#include "axis.h"
#include "axis_pci.h"
#include "axis_sram.h"
#include "des_io.h"
#include "parallel_io.h"
#include "serial_io.h"
#include "spi_io.h"
#include "axis_smart_card.h"
Include dependency graph for axis_driver.c:

Defines | |
| #define | TITLE "Axis2 PCI Bridge" |
| #define | ISSUE "0.0" |
| #define | DRIVER_DESC "Axis PCI Kernel Driver" |
| #define | DRIVER_AUTHOR "Heber Limited <http://www.heber.co.uk>" |
| #define | DRIVER_SUPPORTED_DEVICES "Axis" |
| #define | AXIS_PCI_VENDOR_ID 0x10b5 |
| #define | AXIS_PCI_DEVICE_ID 0x3001 |
| #define | STATIC_RAM_REGION 2 |
| #define | CONTROL_REGION 4 |
| #define | CONTROL_OFFSET 0x800 |
| #define | MAX_REGION 6 |
| #define | MAX_AXIS_ROUTED_SERIAL_PORTS 4 |
| #define | AXIS_MAX_UARTS 8 |
| #define | DIPSWITCH_OFFSET 0x64 |
| #define | IO_REGION 3 |
Functions | |
| MODULE_LICENSE ("GPL") | |
| MODULE_DESCRIPTION ("Axis PCI Kernel Driver") | |
| MODULE_AUTHOR ("Heber Limited< http://www.heber.co.uk >") | |
| MODULE_SUPPORTED_DEVICE ("Axis") | |
| int | axis_general_open (struct inode *inode_ptr,struct file *file_ptr) |
| The main entry point for open operations against the major character device associated with this driver. | |
| proc_dir_entry * | create_axis_root (struct proc_dir_entry *parent, struct axis_pci_device_entry *device) |
| Create axis /proc root directory. | |
| void | delete_axis_root (struct axis_pci_device_entry *device) |
| Deletes an axis entry in the /proc file system. | |
| int | add_proc_exports (struct axis_pci_device_entry *device) |
| Function to create a set of axis specific entries in the /proc file system. | |
| void | remove_proc_exports (struct axis_pci_device_entry *device) |
| Function to delete Axis entries from /proc. | |
| int | axis_activity_thread (void *data) |
| Function for a thread scans for missing interrupts and time out the driver. | |
| void | pci_remove (struct pci_dev *dev) |
| Callback passed to PCI subsystem so it can signal either a removal or an unload. | |
| int | init_module (void) |
| This value is currently unassigned according to Documentation/devices/txt Called by the kernel when the module is first loaded allows module it initialise. | |
| void | cleanup_module (void) |
| Called by the kernel when module is about to be unloaded. | |
Variables | |
| file_operations | driver_file_operations |
| pci_device_id | pci_id_table [] |
| pci_driver | axis_pci_driver |
| Defines a pci driver struct that can be passed to the kernel PCI subsystem. | |
| char * | driver_name = "Axis_2_PCI_Bridge" |
| Defines a name for this driver. | |
| int | driver_major_number = 231 |
| Allocate a major number. | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Function to create a set of axis specific entries in the /proc file system.
Adds a set of entries to the /proc file system these allow easy configuration and control to be implemented from the command line or via shell scripts as well as from conventional programming |
Here is the call graph for this function:

|
|
Function for a thread scans for missing interrupts and time out the driver.
This function becomes the main loop in a kernel thread tracking the Axis hardware in the background. Main use is to timeout IO which stall pending a non occuring interrupt |
|
||||||||||||
|
The main entry point for open operations against the major character device associated with this driver.
This open splits the minor number and chooses the correct physical device it then uses the type field to replace the file operations pointer in the file * with one corresponding to the selected hardware element requested. It then calls the hardware specific open |
Here is the call graph for this function:

|
|
Called by the kernel when module is about to be unloaded.
Called by the kernel prior to the axis module being unloaded (rmmod axis). Unregisters the Axis hardware from PCI system this calls the callback pci_remove. This then cleans up the axis data structures. The cleanup then removes the character driver |
|
||||||||||||
|
Create axis /proc root directory.
Creates a root directory within the /proc directory entry for each axis device |
|
|
Deletes an axis entry in the /proc file system.
Code is built in theory to support multiple devices so multiple entries might exit one for each device. So code checks in the PCI structure to work out which one to clobber |
|
|
This value is currently unassigned according to Documentation/devices/txt Called by the kernel when the module is first loaded allows module it initialise.
All modules have at least two entry points the first init_module is called by the kernel and the driver must initalise itself starting from this entry point. Function is quite simple first it creates a character device so it can be accessed through /dev type special files created with mknod. Then it registers a structure with the PCI subsystem. The structure identifies the Axis hardware and includes call backs that the PCI system calls if it recognises Axis hardware, the callbacks then build the structures needed. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Callback passed to PCI subsystem so it can signal either a removal or an unload.
This function is a callback its included in a stucture passed to the PCI subsystem when the Axis driver signals interest in PCI devices with the Axis idenity. If the Axis device is unplugged or rather more likely the driver calls pci_unregister as part of its unload procedure the PCI system calls this call back. In practice the tear down of Axis resources is started from this callback. |
Here is the call graph for this function:

|
|
Function to delete Axis entries from /proc.
|
Here is the call graph for this function:

|
|
Initial value:
{
name: "Axis2_PCI_Bridge",
id_table: pci_id_table,
probe: pci_probe,
remove: pci_remove
}
|
|
|
Initial value:
{
open: axis_general_open,
}
|
|
|
Allocate a major number.
|
|
|
Defines a name for this driver.
|
|
|
Initial value:
{
{ 0x10b5 , 0x3001 , PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{0,}
}
|
1.3.6