Main Page | Data Structures | File List | Data Fields | Globals

axis_smart_card.h

Go to the documentation of this file.
00001 
00008  /****************************************************************************
00009 *
00010 *     Axis 2 PCI Linux Kernel driver
00011 *     File:    axis_smart_card.h
00012 *     Version: 1.0
00013 *     Copyright 2004 Heber Limited (http://www.heber.co.uk)
00014 *
00015 *     This program is free software; you can redistribute it and/or modify it
00016 *     under the terms of the GNU General Public License as published by the
00017 *     Free Software Foundation; either version 2, or (at your option) any
00018 *     later version.
00019 *
00020 *     This program is distributed in the hope that it will be useful, but
00021 *     WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023 *     General Public License for more details.
00024 *
00025 *     You should have received a copy of the GNU General Public License along
00026 *     with this program; if not, write to the Free Software Foundation, Inc.,
00027 *     675 Mass Ave, Cambridge, MA 02139, USA.
00028 *
00029 *     Changes:
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

Generated on Fri Jan 28 12:33:47 2005 for Axis Kernel Driver by doxygen 1.3.6