use movsl for copying resume memory back
[coreboot.git] / src / pc80 / tpm.c
index 1cbf80057127363b5a222adbb9cc9a2d1558a700..17e1ed702d46277151c6d238bd605b1090a7d62a 100644 (file)
@@ -27,7 +27,6 @@
  * Infineon slb9635), so this driver provides access to locality 0 only.
  */
 
-/* #define DEBUG */
 #include <stdlib.h>
 #include <string.h>
 #include <delay.h>
 #include <arch/byteorder.h>
 #include <console/console.h>
 #include <pc80/tpm.h>
-
-#ifdef DEBUG
-#define TPM_DEBUG_ON   1
-#else
-#define TPM_DEBUG_ON   0
-#endif
+#include <cpu/x86/car.h>
 
 #define PREFIX "lpc_tpm: "
 
 /* coreboot wrapper for TPM driver (start) */
 #define        TPM_DEBUG(fmt, args...)         \
-       if (TPM_DEBUG_ON) {             \
+       if (CONFIG_DEBUG_TPM) {         \
                printk(BIOS_DEBUG, PREFIX);             \
                printk(BIOS_DEBUG, fmt , ##args);       \
        }
@@ -130,10 +124,10 @@ struct device_name {
 struct vendor_name {
        u16 vendor_id;
        const char * vendor_name;
-       struct device_name* dev_names;
+       const struct device_name* dev_names;
 };
 
-static struct device_name infineon_devices[] = {
+static const struct device_name infineon_devices[] = {
        {0xb, "SLB9635 TT 1.2"},
        {0}
 };
@@ -146,7 +140,7 @@ static const struct vendor_name vendor_names[] = {
  * Cached vendor/device ID pair to indicate that the device has been already
  * discovered
  */
-static u32 vendor_dev_id;
+static u32 vendor_dev_id CAR_GLOBAL;
 
 static int is_byte_reg(u32 reg)
 {