hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/char/tpm/eventlog/of.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2012 IBM Corporation
34 *
....@@ -7,12 +8,6 @@
78 * Maintained by: <tpmdd-devel@lists.sourceforge.net>
89 *
910 * Read the event log created by the firmware on PPC64
10
- *
11
- * This program is free software; you can redistribute it and/or
12
- * modify it under the terms of the GNU General Public License
13
- * as published by the Free Software Foundation; either version
14
- * 2 of the License, or (at your option) any later version.
15
- *
1611 */
1712
1813 #include <linux/slab.h>
....@@ -56,7 +51,8 @@
5651 * endian format. For this reason, vtpm doesn't need conversion
5752 * but physical tpm needs the conversion.
5853 */
59
- if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0) {
54
+ if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0 &&
55
+ of_property_match_string(np, "compatible", "IBM,vtpm20") < 0) {
6056 size = be32_to_cpup((__force __be32 *)sizep);
6157 base = be64_to_cpup((__force __be64 *)basep);
6258 } else {