[Skiboot] [PATCH 14/19] tpm_i2c_nuvoton: add nuvoton, npct601 to the compatible property
Claudio Carvalho
cclaudio at linux.vnet.ibm.com
Sun Nov 12 04:28:37 AEDT 2017
The linux kernel doesn't have a driver compatible with
"nuvoton,npct650", but it does have for "nuvoton,npct601", which should
also be compatible with npct650.
This adds "nuvoton,npct601" to the compatible devtree property.
Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
---
libstb/drivers/tpm_i2c_nuvoton.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libstb/drivers/tpm_i2c_nuvoton.c b/libstb/drivers/tpm_i2c_nuvoton.c
index 90e27a9..d18add9 100644
--- a/libstb/drivers/tpm_i2c_nuvoton.c
+++ b/libstb/drivers/tpm_i2c_nuvoton.c
@@ -581,6 +581,16 @@ void tpm_i2c_nuvoton_probe(void)
assert(bus->check_quirk == NULL);
bus->check_quirk = nuvoton_tpm_quirk;
bus->check_quirk_data = tpm_device;
+
+ /*
+ * Tweak for linux. It doesn't have a driver compatible
+ * with "nuvoton,npct650"
+ */
+ if (!dt_node_is_compatible(node, "nuvoton,npct601")) {
+ dt_check_del_prop(node, "compatible");
+ dt_add_property_strings(node, "compatible",
+ "nuvoton,npct650", "nuvoton,npct601");
+ }
}
return;
disable:
--
2.7.4
More information about the Skiboot
mailing list