Add DEBUG_TPM option to Debugging menu
authorStefan Reinauer <reinauer@chromium.org>
Thu, 17 Nov 2011 20:50:54 +0000 (12:50 -0800)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Fri, 30 Mar 2012 15:56:22 +0000 (17:56 +0200)
instead of having to edit the source code of tpm.c

Change-Id: I519d9ada14dd383e668a2da4219e5373a24c7c3d
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/757
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
src/Kconfig
src/pc80/tpm.c

index f7180a98c0aabd91e8d68fcfd9f95f8855aa96bb..0696feb24640c9794885226c03525ecc8b709790 100644 (file)
@@ -862,6 +862,13 @@ config X86EMU_DEBUG_IO
 
          If unsure, say N.
 
+config DEBUG_TPM
+       bool "Output verbose TPM debug messages"
+       default n
+       depends on TPM
+       help
+         This option enables additional TPM related debug messages.
+
 config LLSHELL
        bool "Built-in low-level shell"
        default n
index 8e94303e71c2c5bef12ce55b91268f6fc6bdd3c9..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 <pc80/tpm.h>
 #include <cpu/x86/car.h>
 
-#ifdef DEBUG
-#define TPM_DEBUG_ON   1
-#else
-#define TPM_DEBUG_ON   0
-#endif
-
 #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);       \
        }