00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef AXIS_SMART_CARD_H
00033 #define AXIS_SMART_CARD_H
00034 #ifndef _LINUX_KERNEL_H
00035 #include <linux/kernel.h>
00036 #include <linux/sched.h>
00037 #include <linux/version.h>
00038 #include <linux/module.h>
00039 #include <linux/proc_fs.h>
00040 #include <linux/delay.h>
00041 #include <linux/pci.h>
00042 #include <linux/list.h>
00043 #include <linux/ioport.h>
00044 #include <linux/serial.h>
00045 #include <linux/interrupt.h>
00046 #include <linux/string.h>
00047 #include <linux/spinlock.h>
00048 #include <linux/mtd/mtd.h>
00049 #include <linux/crypto.h>
00050 #include <asm/uaccess.h>
00051 #endif //_LINUX_KERNEL_H
00052 #ifndef AXIS_HARDWARE_H
00053 #include "axis_hardware.h"
00054 #endif //AXIS_HARDWARE_H
00055 #ifndef AXIS_PCI_H
00056 #include "axis_pci.h"
00057 #endif //AXIS_HARDWARE_H
00058
00059 #define SMART_CARD_UART_OFFSET (0x08+CONTROL_OFFSET)
00060
00061 extern struct file_operations smart_card_file_operations ;
00070 static inline void write_smart_card(struct axis_pci_device_entry * device ,unsigned char d)
00071 {
00072 unsigned long i = d;
00073 atomic_set(&device->smart_card_tx_finished,0) ;
00074 writel(i,device->regions[CONTROL_REGION].remapped_address+SMART_CARD_UART_OFFSET);
00075 }
00076
00077
00085 static inline unsigned char read_smart_card(struct axis_pci_device_entry * device )
00086 {
00087 unsigned long d ;
00088 d =readl(device->regions[CONTROL_REGION].remapped_address+SMART_CARD_UART_OFFSET);
00089 return d & 0xFF ;
00090 }
00091
00092 void init_smart_card(struct axis_pci_device_entry * device );
00093
00094 #endif //AXIS_SMART_CARD_H