]> git.sur5r.net Git - u-boot/blobdiff - cmd/tpm_test.c
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[u-boot] / cmd / tpm_test.c
index 330640594879d138a2d4b279f77d07c016d03b00..35f3c96e3de7c38d4034433cf213ea4903cca116 100644 (file)
@@ -1,13 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2015 Google, Inc
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <command.h>
 #include <environment.h>
-#include <tpm.h>
+#include <tpm-v1.h>
 
 /* Prints error and returns on failure */
 #define TPM_CHECK(tpm_command) do { \
@@ -303,12 +302,12 @@ static int test_readonly(void)
        index_0 += 1;
        if (tpm_nv_write_value(INDEX0, (uint8_t *)&index_0, sizeof(index_0) !=
                TPM_SUCCESS)) {
-               error("\tcould not write index 0\n");
+               pr_err("\tcould not write index 0\n");
        }
        tpm_nv_write_value_lock(INDEX0);
        if (tpm_nv_write_value(INDEX0, (uint8_t *)&index_0, sizeof(index_0)) ==
                        TPM_SUCCESS)
-               error("\tindex 0 is not locked\n");
+               pr_err("\tindex 0 is not locked\n");
 
        printf("\tdone\n");
        return 0;
@@ -471,7 +470,7 @@ static int test_write_limit(void)
                case TPM_MAXNVWRITES:
                        assert(i >= TPM_MAX_NV_WRITES_NOOWNER);
                default:
-                       error("\tunexpected error code %d (0x%x)\n",
+                       pr_err("\tunexpected error code %d (0x%x)\n",
                              result, result);
                }
        }