Once finished the PCI system installs interrupt handlers (in here) and initalises the interrupt hardware.
The code to pull all this down on module unload is in here too. On unload the pci subsystem is requested to close down this device. The subsystem then calls back into the delete code in here. Its this code that cleans up
#include "axis_pci.h"
#include "axis_driver.h"
#include "axis_sram.h"
#include "axis_smart_card.h"
Include dependency graph for axis_pci.c:

Functions | |
| void | enable_axis_interrupts (struct axis_pci_device_entry *device) |
| The system has two interrupt enables this one sets an interrupt mask in the axis device. | |
| void | dispatch_DES_interrupt (struct axis_pci_device_entry *device, int number) |
| Processes interrupts triggered by 3DES operations completing. | |
| void | dispatch_SPI_interrupt (struct axis_pci_device_entry *device) |
| SPI interrupt handler. | |
| void | dispatch_inputs_interrupt (struct axis_pci_device_entry *device) |
| Handle change in debounced input. | |
| void | dispatch_outputs_interrupt (struct axis_pci_device_entry *device) |
| Not implemented yet. | |
| void | dispatch_smart_card_tx_interrupt (struct axis_pci_device_entry *device) |
| Handle smart card tx complete interrupt. | |
| void | dispatch_smart_card_rx_interrupt (struct axis_pci_device_entry *device) |
| Handle smart card rx interrupt. | |
| void | dispatch_security_interrupt (struct axis_pci_device_entry *device, unsigned long interrupt_source) |
| not currently use | |
| irqreturn_t | interrupt_handler (int irq, void *dev_id, struct pt_regs *regs) |
| Interrupt entry code called by kernel in resonse to a interrupt from the axis device. | |
| void | init_sub_devices (struct axis_pci_device_entry *device) |
| Setup table of sub-devices. | |
| void | init_pci_device_entry (struct axis_pci_device_entry *new_device, struct pci_dev *dev, int device_number) |
| initalise structures associated with an axis hardware master structure | |
| LIST_HEAD (axis_device_list) | |
| Maintains a list of currently active devices in case Axis moves onto PCI card. | |
| void | clean_regions (struct axis_pci_device_entry *device) |
| umap any allocated regions | |
| int | get_next_device_number (void) |
| Find a unique integer ID to associate with device. | |
| int | pci_probe (struct pci_dev *dev, const struct pci_device_id *id) |
| Called by PCI on load/detection. | |
| axis_pci_device_entry * | choose_device (struct inode *inode_ptr,struct file *file_ptr) |
| Find a axis device for DES ops. | |
| axis_pci_device_entry * | find_axis_device (void) |
| Find a axis device for DES ops. | |
| void | delete_axis_pci_device (struct axis_pci_device_entry *device) |
| unload axis PCI based resources | |
| int | proc_fpga_issue (char *buf, char **start, off_t offset, int count, int *eof, void *data) |
| int | proc_fpga_id (char *buf, char **start, off_t offset, int count, int *eof, void *data) |
| void | create_proc_id_entries (struct axis_pci_device_entry *device) |
| Creates a couple of /proc entries to export FPGA ID and issue data. | |
| void | delete_proc_id_entries (struct axis_pci_device_entry *device) |
| Deletes the issue and ID /proc entries. | |
|
||||||||||||
|
Find a axis device for DES ops.
Des operations need not be associated with a particular hardware set in future we may if we have multiple device want to load balance DES ops entry allows logic to be added later |
|
|
umap any allocated regions
Called as part of a module unload call Ummap any memory/IO regions driver still has mapped ignoring reference counts |
|
|
Creates a couple of /proc entries to export FPGA ID and issue data.
|
Here is the call graph for this function:

|
|
unload axis PCI based resources
Clean up occurs when we de-register from the PCI subsystem rather than being directly called by the module unload function |
Here is the call graph for this function:

|
|
Deletes the issue and ID /proc entries.
|
|
||||||||||||
|
Processes interrupts triggered by 3DES operations completing. signal completion wake any processes waiting for this Last Channel is a little different and handles only keys signal completion wake any processes waiting for this |
|
|
Handle change in debounced input.
If the debounced inputs have changed then Axis generates an interrupt which should end up in this function. Function then updates inputs bitmap. |
|
|
Not implemented yet.
Possible support of queued outputs not fully implemented yet |
|
||||||||||||
|
not currently use
|
|
|
Handle smart card rx interrupt.
The smart card core has a simple internal uart that can generate interrupts handle rx here |
Here is the call graph for this function:

|
|
Handle smart card tx complete interrupt.
The smart card core has a simple internal uart that can generate interrupts handle tx here |
|
|
SPI interrupt handler. signal completion wake any processes waiting for this |
|
|
The system has two interrupt enables this one sets an interrupt mask in the axis device.
Writes to interrupt enable register in the Axis device each interrupt source has one bit the interrupt source register and one bit in the interrupt enable register |
|
|
Find a axis device for DES ops.
Des operations need not be associated with a particular hardware set in future we may if we have multiple device want to load balance DES ops entry allows logic to be added later |
|
|
Find a unique integer ID to associate with device.
Searchs the device list for a free number to allocate in case of having to handle multiple sets of hardware |
|
||||||||||||||||
|
initalise structures associated with an axis hardware master structure
Initialise the device(s) here. Remap IO addresses get sizes. |
Here is the call graph for this function:

|
|
Setup table of sub-devices.
Sub device table contains an array of structures that assoicated a pointer to the hardware master structure with an integer. The driver passes pointers to entries in this table a user data members in callback setups for various devices and /proc entries. For instance the /proc call back to read a single input can use this entry to find both the master table and which input (the integer) it should return. As these entries should not be written at any point other than here the old table can be shared between dipswitches inputs outputs and any others that need this facility. |
|
||||||||||||||||
|
Interrupt entry code called by kernel in resonse to a interrupt from the axis device. then we should allow the serial driver to handle it if axis UART generated an interrupt |
Here is the call graph for this function:

|
|
Maintains a list of currently active devices in case Axis moves onto PCI card.
|
|
||||||||||||
|
Called by PCI on load/detection.
Called if the PCI sub system thinks our hardware is present Check that it is the right hardware if it is remember the PCI devices details |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
|
1.3.6