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

axis.h

Go to the documentation of this file.
00001 
00009 #ifndef AXIS_H
00010 #define AXIS_H
00011 #include <linux/ioctl.h>
00013 #define SRAM_MAGIC  0xA0
00014 
00016 #define AXIS_SRAM_WRITE_ENABLE (1<<0)
00017 
00019 #define AXIS_SRAM_READ_ENABLE   (1<<1)
00020 
00022 #define AXIS_SRAM_PROTECTION _IO(SRAM_MAGIC,0)
00023 
00025 #define SPI_MAGIC   0x90
00026 
00027 /*===============================================================
00028 Setting the SPI from user mode first choose one of the
00029 below
00030 ================================================================*/
00032 #define SPI_CLK_DIV_2       0
00033 
00034 #define SPI_CLK_DIV_4       1
00035 
00036 #define SPI_CLK_DIV_8       2
00037 
00038 #define SPI_CLK_DIV_16      3
00039 
00040 #define SPI_CLK_DIV_32      4
00041 
00042 #define SPI_CLK_DIV_64      5
00043 
00044 #define SPI_CLK_DIV_128     6
00045 
00046 #define SPI_CLK_DIV_256     7
00047 
00048 /*===============================================================
00049 then or in which of these is desired
00050 ================================================================*/
00052 #define SPI_LSB_FIRST       (1<<5)
00053 
00054 #define SPI_CLOCK_PHASE     (1<<4)
00055 
00056 #define SPI_CLOCK_POLARITY  (1<<3)
00057 
00058 /*===============================================================
00059 then do a ioctl call with the result
00060 ================================================================*/
00061 
00063 #define AXIS_SPI_SET _IO(SPI_MAGIC,0)
00064 
00065 #define AXIS_SPI_SET_MIN_INTERCHARACTER_TIME _IO(SPI_MAGIC+1,0)
00066 
00067 
00068 /*===============================================================
00069 
00070 ================================================================*/
00072 #define SMART_MAGIC 0x82
00073 
00074 #define AXIS_SMART_ENABLE _IO(SMART_MAGIC,0)
00075 
00076 #define AXIS_SMART_RESET  _IO(SMART_MAGIC+1,0)
00077 
00078 #define AXIS_SMART_CARD_TIMEOUT _IO(SMART_MAGIC+2,0)
00079 
00080 #define AXIS_SMART_CARD_SET_MIN_INTERCHARACTER_TIME _IO(SMART_MAGIC+2,0)
00081 
00082 /*===============================================================
00083 Values to allow control of 3DES opearations
00084 ================================================================*/
00086 #define USE_RAW_KEY             (1<<0)
00087 
00088 #define DO_ENCRYPT              (1<<1)
00089 
00090 #define USE_MASTER_KEY          (1<<2)
00091 
00093 #define DO_GET_SECURE_SEED      (1<<3)
00094 
00096 #define DO_WRITE_SECURE_SEED    (1<<4)
00097 
00103 typedef struct _KEY_OP
00104 {
00105     unsigned char key1[8];      
00106     unsigned char key2[8];      
00107     unsigned char key3[8];      
00108     unsigned long flags ;       
00109 } KEY_OP ;
00110 
00111 
00117 typedef struct _CRYPTO_OP
00118 {
00119     unsigned long op_type ;     
00120     unsigned char * data ;      
00121     unsigned long size   ;      
00122 } CRYPTO_OP ;
00123 
00124 
00125 /*===============================================================
00126 ================================================================*/
00128 #define CRYPT_MAGIC 0x81
00129 
00130 #define AXIS_CRYPT_OP _IOWR(CRYPT_MAGIC,0,CRYPTO_OP)
00131 
00133 #define AXIS_KEY_OP _IOWR(CRYPT_MAGIC+1,0,CRYPTO_OP)
00134 
00136 #define AXIS_KEY_FLAGS_OP _IO(CRYPT_MAGIC+2,0)
00137 
00139 #define AXIS_SECURE_OP _IOWR(CRYPT_MAGIC+3,0,CRYPTO_OP)
00140 
00141 #endif //AXIS_H

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