aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/of/base.c9
-rw-r--r--drivers/of/irq.c6
-rw-r--r--include/linux/of.h1
3 files changed, 13 insertions, 3 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 3ae106d89791..021db96245e7 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1185,6 +1185,15 @@ int of_property_count_strings(struct device_node *np, const char *propname)
1185} 1185}
1186EXPORT_SYMBOL_GPL(of_property_count_strings); 1186EXPORT_SYMBOL_GPL(of_property_count_strings);
1187 1187
1188void of_print_phandle_args(const char *msg, const struct of_phandle_args *args)
1189{
1190 int i;
1191 printk("%s %s", msg, of_node_full_name(args->np));
1192 for (i = 0; i < args->args_count; i++)
1193 printk(i ? ",%08x" : ":%08x", args->args[i]);
1194 printk("\n");
1195}
1196
1188static int __of_parse_phandle_with_args(const struct device_node *np, 1197static int __of_parse_phandle_with_args(const struct device_node *np,
1189 const char *list_name, 1198 const char *list_name,
1190 const char *cells_name, 1199 const char *cells_name,
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 0ed5ed4a5f9b..ddea945ec29e 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -101,9 +101,9 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
101 u32 intsize = 1, addrsize, newintsize = 0, newaddrsize = 0; 101 u32 intsize = 1, addrsize, newintsize = 0, newaddrsize = 0;
102 int imaplen, match, i; 102 int imaplen, match, i;
103 103
104 pr_debug("of_irq_parse_raw: par=%s,intspec=[0x%08x 0x%08x...],ointsize=%d\n", 104#ifdef DEBUG
105 of_node_full_name(out_irq->np), out_irq->args[0], out_irq->args[1], 105 of_print_phandle_args("of_irq_parse_raw: ", out_irq);
106 out_irq->args_count); 106#endif
107 107
108 ipar = of_node_get(out_irq->np); 108 ipar = of_node_get(out_irq->np);
109 109
diff --git a/include/linux/of.h b/include/linux/of.h
index f95aee391e30..374e03536135 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -275,6 +275,7 @@ extern int of_n_size_cells(struct device_node *np);
275extern const struct of_device_id *of_match_node( 275extern const struct of_device_id *of_match_node(
276 const struct of_device_id *matches, const struct device_node *node); 276 const struct of_device_id *matches, const struct device_node *node);
277extern int of_modalias_node(struct device_node *node, char *modalias, int len); 277extern int of_modalias_node(struct device_node *node, char *modalias, int len);
278extern void of_print_phandle_args(const char *msg, const struct of_phandle_args *args);
278extern struct device_node *of_parse_phandle(const struct device_node *np, 279extern struct device_node *of_parse_phandle(const struct device_node *np,
279 const char *phandle_name, 280 const char *phandle_name,
280 int index); 281 int index);