dtoc: Add support for reading string-list properties

Add a function to read a list of strings from the devicetree.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index 7a4c7ef..55b70e9 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -615,6 +615,15 @@
         self.assertIn("property 'stringarray' has list value: expecting a "
                       'single string', str(e.exception))
 
+    def testGetStringList(self):
+        self.assertEqual(['message'],
+                         fdt_util.GetStringList(self.node, 'stringval'))
+        self.assertEqual(
+            ['multi-word', 'message'],
+            fdt_util.GetStringList(self.node, 'stringarray'))
+        self.assertEqual(['test'],
+                         fdt_util.GetStringList(self.node, 'missing', ['test']))
+
     def testGetBool(self):
         self.assertEqual(True, fdt_util.GetBool(self.node, 'boolval'))
         self.assertEqual(False, fdt_util.GetBool(self.node, 'missing'))