Use libfdt for is-compatible checks

Testing the 'compatible' property of manifest FDT requires parsing a
list of strings. As this is currently the only use case, we can remove
a significant amount of code from the manifest parser by using a libfdt
API instead.

Change-Id: Idcfa8d9a85745738a08d4fdaa40f30cc18e3c5c2
diff --git a/src/fdt.c b/src/fdt.c
index 8f57cc8..1983fc6 100644
--- a/src/fdt.c
+++ b/src/fdt.c
@@ -274,3 +274,13 @@
 	/* Not found */
 	return false;
 }
+
+/**
+ * Returns true if `node` has property "compatible" containing a `compat` entry.
+ * Returns false if node not compatible or an error occurred.
+ */
+bool fdt_is_compatible(struct fdt_node *node, const char *compat)
+{
+	return fdt_node_check_compatible(fdt_base(&node->fdt), node->offset,
+					 compat) == 0;
+}