#include "axis_smart_card.h"
#include "serial_io.h"
#include "axis.h"
#include <asm/termbits.h>
#include <asm/ioctls.h>
Include dependency graph for axis_smart_card.c:

Defines | |
| #define | SMART_CARD_TIMEOUT 1000 |
Functions | |
| void | output_serial_routing (struct axis_pci_device_entry *device) |
| write the serial routing out to the fpga | |
| void | input_serial_routing (struct axis_pci_device_entry *device) |
| reads the serial routing from hardware to mirror | |
| int | proc_smart_card_write (const char *buffer, unsigned long n, void *data, unsigned long mask) |
| takes inputs from /proc and sets a smart card control bit | |
| int | proc_smart_card_enable_write (struct file *file, const char *buffer, unsigned long count, void *data) |
| function to allow /proc to control smart card | |
| int | proc_smart_card_reset_write (struct file *file, const char *buffer, unsigned long count, void *data) |
| function to allow /proc to control smart card | |
| int | proc_smart_card_read (char *buf, char **start, off_t offset, int count, int *eof, void *data, unsigned long mask) |
| reads the current start of the smart card outputs | |
| int | proc_smart_card_enable_read (char *buf, char **start, off_t offset, int count, int *eof, void *data) |
| read the current start of the smart card enable control outputs | |
| int | proc_smart_card_reset_read (char *buf, char **start, off_t offset, int count, int *eof, void *data) |
| read the current start of the smart card reset control outputs | |
| void | delete_proc_smart_card_entries (struct axis_pci_device_entry *device) |
| removes smart card related entries from axis /proc filesystem | |
| void | create_proc_smart_card_entries (struct axis_pci_device_entry *device) |
| Creates a smart card releated /proc file system. | |
| void | start_smart_card (struct axis_pci_device_entry *device) |
| Turns on the smart card. | |
| void | stop_smart_card (struct axis_pci_device_entry *device) |
| Turns off the smart card. | |
| ssize_t | axis_smart_read (struct file *file_ptr, char *buffer, size_t size, loff_t *offset) |
| Gets data from the smart card and returns it to userland. | |
| ssize_t | axis_smart_write (struct file *file_ptr, const char *buffer,size_t size,loff_t *offset) |
| Copies data from USER space and sends it to the smart card. | |
| int | axis_smart_ioctl (struct inode *inode_ptr, struct file *file_ptr, unsigned int type,unsigned long args) |
| Provides an interface to allow user land to control smart card clock / reset. | |
| int | axis_smart_open (struct inode *inode_ptr, struct file *file_ptr) |
| open function for smart card sub device | |
| int | axis_smart_release (struct inode *inode_ptr, struct file *file_ptr) |
| Called by kernel in response to a process closing a device. | |
| void | init_smart_card (struct axis_pci_device_entry *device) |
| Initialise smart card structures. | |
Variables | |
| file_operations | smart_card_file_operations |
| Define a file operations structure for output devices. | |
|
|
|
|
||||||||||||||||||||
|
Provides an interface to allow user land to control smart card clock / reset.
To allow user applications options other then read / write the driver support IOCTL calls the type constants are defined in axis.h |
Here is the call graph for this function:

|
||||||||||||
|
open function for smart card sub device
This open is called from the general open after its worked out what type of subdevice user space has requested Open an individual SPI device for sanities sake only allow a single open for each device |
Here is the call graph for this function:

|
||||||||||||||||||||
|
Gets data from the smart card and returns it to userland.
Called by kernel in response to a user application making a read call. Note the user buffer pointer is not a valid address from inside the kernel. |
|
||||||||||||
|
Called by kernel in response to a process closing a device.
Release must decrement the open count to signal that the device has been finished with and that other processes can open it |
Here is the call graph for this function:

|
||||||||||||||||||||
|
Copies data from USER space and sends it to the smart card.
Called by the kernel in response to a write call by a user application. Note the buffer address supplied will not be a valid kernel address |
Here is the call graph for this function:

|
|
Creates a smart card releated /proc file system.
Creates a smart card releated /proc file system |
Here is the call graph for this function:

|
|
removes smart card related entries from axis /proc filesystem
removes smart card related entries from axis /proc filesystem |
|
|
Initialise smart card structures.
Initialise smart card structures, call at the point the PCI system detects the Axis hardware |
|
|
reads the serial routing from hardware to mirror
Smart card control bits are embedded in the serial routing register. |
|
|
write the serial routing out to the fpga
Currently the control bits for the smart card rest inside the serial routing register so smart card ops need to write the serial routing register. The serial lock should be aquired before calling this program |
|
||||||||||||||||||||||||||||
|
read the current start of the smart card enable control outputs
Passed to /proc as a read call back returns current start of smart card enable output |
Here is the call graph for this function:

|
||||||||||||||||||||
|
function to allow /proc to control smart card
A callback called by /proc |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||
|
reads the current start of the smart card outputs
Common code to allow /proc smart card entries to return (read) current status |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||
|
read the current start of the smart card reset control outputs
Passed to /proc as a read call back returns current start of smart card reset output |
Here is the call graph for this function:

|
||||||||||||||||||||
|
function to allow /proc to control smart card
A callback called by /proc |
Here is the call graph for this function:

|
||||||||||||||||||||
|
takes inputs from /proc and sets a smart card control bit
Common code for the two smart card /proc write callbacks factored into this function |
Here is the call graph for this function:

|
|
Turns on the smart card.
Turns on and resets the smart card |
Here is the call graph for this function:

|
|
Turns off the smart card.
|
Here is the call graph for this function:

|
|
Initial value:
{
read: axis_smart_read,
write: axis_smart_write,
ioctl: axis_smart_ioctl,
open: axis_smart_open,
release: axis_smart_release,
}
|
1.3.6