of: Add helper for printing an of_phandle_args structure
[linux-2.6-block.git] / drivers / of / base.c
index 3ae106d8979149e57fb1bce2cab413191014da39..021db96245e718e402ab4e2dbfadf456ff4952b5 100644 (file)
@@ -1185,6 +1185,15 @@ int of_property_count_strings(struct device_node *np, const char *propname)
 }
 EXPORT_SYMBOL_GPL(of_property_count_strings);
 
+void of_print_phandle_args(const char *msg, const struct of_phandle_args *args)
+{
+       int i;
+       printk("%s %s", msg, of_node_full_name(args->np));
+       for (i = 0; i < args->args_count; i++)
+               printk(i ? ",%08x" : ":%08x", args->args[i]);
+       printk("\n");
+}
+
 static int __of_parse_phandle_with_args(const struct device_node *np,
                                        const char *list_name,
                                        const char *cells_name,