summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2011-11-17 12:50:54 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-03-30 17:56:22 +0200
commitdfb098d3592704f64087f2677a5d3dd7f7e5e422 (patch)
tree5ef13924b731d6745942ef4770cd8dd2a902933b /src
parent7b67892be88e3f12de91314ca45a834b4c84c719 (diff)
downloadcoreboot-dfb098d3592704f64087f2677a5d3dd7f7e5e422.tar.xz
Add DEBUG_TPM option to Debugging menu
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>
Diffstat (limited to 'src')
-rw-r--r--src/Kconfig7
-rw-r--r--src/pc80/tpm.c9
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Kconfig b/src/Kconfig
index f7180a98c0..0696feb246 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -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
diff --git a/src/pc80/tpm.c b/src/pc80/tpm.c
index 8e94303e71..17e1ed702d 100644
--- a/src/pc80/tpm.c
+++ b/src/pc80/tpm.c
@@ -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>
@@ -37,17 +36,11 @@
#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); \
}