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

Go to the source code of this file.

Macros

#define TPM_ACCESS(l)   (0x0000 | ((l) << 12))
 
#define TPM_INT_ENABLE(l)   (0x0008 | ((l) << 12))
 
#define TPM_INT_VECTOR(l)   (0x000C | ((l) << 12))
 
#define TPM_INT_STATUS(l)   (0x0010 | ((l) << 12))
 
#define TPM_INTF_CAPS(l)   (0x0014 | ((l) << 12))
 
#define TPM_STS(l)   (0x0018 | ((l) << 12))
 
#define TPM_DATA_FIFO(l)   (0x0024 | ((l) << 12))
 
#define TPM_DID_VID(l)   (0x0F00 | ((l) << 12))
 
#define TPM_RID(l)   (0x0F04 | ((l) << 12))
 

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_int_flags {
  TPM_GLOBAL_INT_ENABLE = 0x80000000, TPM_INTF_BURST_COUNT_STATIC = 0x100, TPM_INTF_CMD_READY_INT = 0x080, TPM_INTF_INT_EDGE_FALLING = 0x040,
  TPM_INTF_INT_EDGE_RISING = 0x020, TPM_INTF_INT_LEVEL_LOW = 0x010, TPM_INTF_INT_LEVEL_HIGH = 0x008, TPM_INTF_LOCALITY_CHANGE_INT = 0x004,
  TPM_INTF_STS_VALID_INT = 0x002, TPM_INTF_DATA_AVAIL_INT = 0x001
}
 
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_param (itpm, bool, 0444)
 
 MODULE_PARM_DESC (itpm,"Force iTPM workarounds (found on some Lenovo laptops)")
 
 module_param (interrupts, bool, 0444)
 
 MODULE_PARM_DESC (interrupts,"Enable interrupts")
 
 module_param (force, bool, 0444)
 
 MODULE_PARM_DESC (force,"Force device probe rather than using ACPI entry")
 
 module_init (init_tis)
 
 module_exit (cleanup_tis)
 
 MODULE_AUTHOR ("Leendert van Doorn ([email protected])")
 
 MODULE_DESCRIPTION ("TPM Driver")
 
 MODULE_VERSION ("2.0")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

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

Definition at line 67 of file tpm_tis.c.

#define TPM_DATA_FIFO (   l)    (0x0024 | ((l) << 12))

Definition at line 73 of file tpm_tis.c.

#define TPM_DID_VID (   l)    (0x0F00 | ((l) << 12))

Definition at line 75 of file tpm_tis.c.

#define TPM_INT_ENABLE (   l)    (0x0008 | ((l) << 12))

Definition at line 68 of file tpm_tis.c.

#define TPM_INT_STATUS (   l)    (0x0010 | ((l) << 12))

Definition at line 70 of file tpm_tis.c.

#define TPM_INT_VECTOR (   l)    (0x000C | ((l) << 12))

Definition at line 69 of file tpm_tis.c.

#define TPM_INTF_CAPS (   l)    (0x0014 | ((l) << 12))

Definition at line 71 of file tpm_tis.c.

#define TPM_RID (   l)    (0x0F04 | ((l) << 12))

Definition at line 76 of file tpm_tis.c.

#define TPM_STS (   l)    (0x0018 | ((l) << 12))

Definition at line 72 of file tpm_tis.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 32 of file tpm_tis.c.

Enumerator:
TIS_SHORT_TIMEOUT 
TIS_LONG_TIMEOUT 
TIS_MEM_BASE 
TIS_MEM_LEN 
TIS_SHORT_TIMEOUT 
TIS_LONG_TIMEOUT 

Definition at line 60 of file tpm_tis.c.

Enumerator:
TPM_GLOBAL_INT_ENABLE 
TPM_INTF_BURST_COUNT_STATIC 
TPM_INTF_CMD_READY_INT 
TPM_INTF_INT_EDGE_FALLING 
TPM_INTF_INT_EDGE_RISING 
TPM_INTF_INT_LEVEL_LOW 
TPM_INTF_INT_LEVEL_HIGH 
TPM_INTF_LOCALITY_CHANGE_INT 
TPM_INTF_STS_VALID_INT 
TPM_INTF_DATA_AVAIL_INT 

Definition at line 47 of file tpm_tis.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 39 of file tpm_tis.c.

Function Documentation

MODULE_AUTHOR ( "Leendert van Doorn ([email protected])"  )
MODULE_DESCRIPTION ( "TPM Driver"  )
module_exit ( cleanup_tis  )
module_init ( init_tis  )
MODULE_LICENSE ( "GPL"  )
module_param ( itpm  ,
bool  ,
0444   
)
module_param ( interrupts  ,
bool  ,
0444   
)
module_param ( force  ,
bool  ,
0444   
)
MODULE_PARM_DESC ( itpm  ,
"Force iTPM workarounds (found on some Lenovo laptops)"   
)
MODULE_PARM_DESC ( interrupts  ,
"Enable interrupts"   
)
MODULE_PARM_DESC ( force  ,
"Force device probe rather than using ACPI entry  
)
MODULE_VERSION ( "2.0"  )