Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
tpm_i2c_infineon.c File Reference
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/wait.h>
#include "tpm.h"

Go to the source code of this file.

Data Structures

struct  tpm_inf_dev
 

Macros

#define TPM_BUFSIZE   1260
 
#define MAX_COUNT   3
 
#define SLEEP_DURATION_LOW   55
 
#define SLEEP_DURATION_HI   65
 
#define MAX_COUNT_LONG   50
 
#define SLEEP_DURATION_LONG_LOW   200
 
#define SLEEP_DURATION_LONG_HI   220
 
#define SLEEP_DURATION_RESET_LOW   2400
 
#define SLEEP_DURATION_RESET_HI   2600
 
#define TPM_TIMEOUT_US_LOW   (TPM_TIMEOUT * 1000)
 
#define TPM_TIMEOUT_US_HI   (TPM_TIMEOUT_US_LOW + 2000)
 
#define TPM_TIS_I2C_DID_VID   0x000b15d1L
 
#define TPM_ACCESS(l)   (0x0000 | ((l) << 4))
 
#define TPM_STS(l)   (0x0001 | ((l) << 4))
 
#define TPM_DATA_FIFO(l)   (0x0005 | ((l) << 4))
 
#define TPM_DID_VID(l)   (0x0006 | ((l) << 4))
 

Enumerations

enum  tis_access {
  TPM_ACCESS_VALID = 0x80, TPM_ACCESS_ACTIVE_LOCALITY = 0x20, TPM_ACCESS_REQUEST_PENDING = 0x04, TPM_ACCESS_REQUEST_USE = 0x02,
  TPM_ACCESS_VALID = 0x80, TPM_ACCESS_ACTIVE_LOCALITY = 0x20, TPM_ACCESS_REQUEST_PENDING = 0x04, TPM_ACCESS_REQUEST_USE = 0x02
}
 
enum  tis_status {
  TPM_STS_VALID = 0x80, TPM_STS_COMMAND_READY = 0x40, TPM_STS_GO = 0x20, TPM_STS_DATA_AVAIL = 0x10,
  TPM_STS_DATA_EXPECT = 0x08, TPM_STS_VALID = 0x80, TPM_STS_COMMAND_READY = 0x40, TPM_STS_GO = 0x20,
  TPM_STS_DATA_AVAIL = 0x10, TPM_STS_DATA_EXPECT = 0x08
}
 
enum  tis_defaults {
  TIS_SHORT_TIMEOUT = 750, TIS_LONG_TIMEOUT = 2000, TIS_MEM_BASE = 0xFED40000, TIS_MEM_LEN = 0x5000,
  TIS_SHORT_TIMEOUT = 750, TIS_LONG_TIMEOUT = 2000
}
 

Functions

 MODULE_DEVICE_TABLE (i2c, tpm_tis_i2c_table)
 
 module_i2c_driver (tpm_tis_i2c_driver)
 
 MODULE_AUTHOR ("Peter Huewe <[email protected]>")
 
 MODULE_DESCRIPTION ("TPM TIS I2C Infineon Driver")
 
 MODULE_VERSION ("2.1.5")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define MAX_COUNT   3

Definition at line 35 of file tpm_i2c_infineon.c.

#define MAX_COUNT_LONG   50

Definition at line 45 of file tpm_i2c_infineon.c.

#define SLEEP_DURATION_HI   65

Definition at line 38 of file tpm_i2c_infineon.c.

#define SLEEP_DURATION_LONG_HI   220

Definition at line 48 of file tpm_i2c_infineon.c.

#define SLEEP_DURATION_LONG_LOW   200

Definition at line 47 of file tpm_i2c_infineon.c.

#define SLEEP_DURATION_LOW   55

Definition at line 37 of file tpm_i2c_infineon.c.

#define SLEEP_DURATION_RESET_HI   2600

Definition at line 52 of file tpm_i2c_infineon.c.

#define SLEEP_DURATION_RESET_LOW   2400

Definition at line 51 of file tpm_i2c_infineon.c.

#define TPM_ACCESS (   l)    (0x0000 | ((l) << 4))

Definition at line 225 of file tpm_i2c_infineon.c.

#define TPM_BUFSIZE   1260

Definition at line 32 of file tpm_i2c_infineon.c.

#define TPM_DATA_FIFO (   l)    (0x0005 | ((l) << 4))

Definition at line 227 of file tpm_i2c_infineon.c.

#define TPM_DID_VID (   l)    (0x0006 | ((l) << 4))

Definition at line 228 of file tpm_i2c_infineon.c.

#define TPM_STS (   l)    (0x0001 | ((l) << 4))

Definition at line 226 of file tpm_i2c_infineon.c.

#define TPM_TIMEOUT_US_HI   (TPM_TIMEOUT_US_LOW + 2000)

Definition at line 56 of file tpm_i2c_infineon.c.

#define TPM_TIMEOUT_US_LOW   (TPM_TIMEOUT * 1000)

Definition at line 55 of file tpm_i2c_infineon.c.

#define TPM_TIS_I2C_DID_VID   0x000b15d1L

Definition at line 59 of file tpm_i2c_infineon.c.

Enumeration Type Documentation

enum tis_access
Enumerator:
TPM_ACCESS_VALID 
TPM_ACCESS_ACTIVE_LOCALITY 
TPM_ACCESS_REQUEST_PENDING 
TPM_ACCESS_REQUEST_USE 
TPM_ACCESS_VALID 
TPM_ACCESS_ACTIVE_LOCALITY 
TPM_ACCESS_REQUEST_PENDING 
TPM_ACCESS_REQUEST_USE 

Definition at line 205 of file tpm_i2c_infineon.c.

Enumerator:
TIS_SHORT_TIMEOUT 
TIS_LONG_TIMEOUT 
TIS_MEM_BASE 
TIS_MEM_LEN 
TIS_SHORT_TIMEOUT 
TIS_LONG_TIMEOUT 

Definition at line 220 of file tpm_i2c_infineon.c.

enum tis_status
Enumerator:
TPM_STS_VALID 
TPM_STS_COMMAND_READY 
TPM_STS_GO 
TPM_STS_DATA_AVAIL 
TPM_STS_DATA_EXPECT 
TPM_STS_VALID 
TPM_STS_COMMAND_READY 
TPM_STS_GO 
TPM_STS_DATA_AVAIL 
TPM_STS_DATA_EXPECT 

Definition at line 212 of file tpm_i2c_infineon.c.

Function Documentation

MODULE_AUTHOR ( "Peter Huewe <[email protected]>"  )
MODULE_DESCRIPTION ( "TPM TIS I2C Infineon Driver"  )
MODULE_DEVICE_TABLE ( i2c  ,
tpm_tis_i2c_table   
)
module_i2c_driver ( tpm_tis_i2c_driver  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( "2.1.5"  )