diff options
author | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:44 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:44 +0000 |
commit | 5b5ad5ba01cebe6a749bcf5c9fc9637876fe0b1f (patch) | |
tree | 8b031a68c4ff6c7457830843adc41d49f0ab2d5f /target/linux/mvebu/patches-3.10/0187-of-Add-helper-for-printing-an-of_phandle_args-struct.patch | |
parent | 608ad4b6932f72995144bc72a31b1e0843a5bb28 (diff) | |
download | upstream-5b5ad5ba01cebe6a749bcf5c9fc9637876fe0b1f.tar.gz upstream-5b5ad5ba01cebe6a749bcf5c9fc9637876fe0b1f.tar.bz2 upstream-5b5ad5ba01cebe6a749bcf5c9fc9637876fe0b1f.zip |
mvebu: backport mainline patches from kernel 3.13
This is a backport of the patches accepted to the Linux mainline related to
mvebu SoC (Armada XP and Armada 370) between Linux v3.12, and Linux v3.13.
This work mainly covers:
* Finishes work for sharing the pxa nand driver(drivers/mtd/nand/pxa3xx_nand.c)
between the PXA family, and the Armada family.
* timer initialization update, and access function for the Armada family.
* Generic IRQ handling backporting.
* Some bug fixes.
Signed-off-by: Seif Mazareeb <seif.mazareeb@gmail.com>
CC: Luka Perkov <luka@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39566 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu/patches-3.10/0187-of-Add-helper-for-printing-an-of_phandle_args-struct.patch')
-rw-r--r-- | target/linux/mvebu/patches-3.10/0187-of-Add-helper-for-printing-an-of_phandle_args-struct.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.10/0187-of-Add-helper-for-printing-an-of_phandle_args-struct.patch b/target/linux/mvebu/patches-3.10/0187-of-Add-helper-for-printing-an-of_phandle_args-struct.patch new file mode 100644 index 0000000000..064e9a2b16 --- /dev/null +++ b/target/linux/mvebu/patches-3.10/0187-of-Add-helper-for-printing-an-of_phandle_args-struct.patch @@ -0,0 +1,62 @@ +From 061855025b6842debdf6ea2e8bfd86f50700e263 Mon Sep 17 00:00:00 2001 +From: Grant Likely <grant.likely@linaro.org> +Date: Thu, 19 Dec 2013 09:30:58 -0300 +Subject: [PATCH 187/203] of: Add helper for printing an of_phandle_args + structure + +It is sometimes useful for debug to get the contents of an +of_phandle_args structure out into the kernel log. + +Signed-off-by: Grant Likely <grant.likely@linaro.org> + +Conflicts: + drivers/of/base.c +--- + drivers/of/base.c | 9 +++++++++ + drivers/of/irq.c | 6 +++--- + include/linux/of.h | 1 + + 3 files changed, 13 insertions(+), 3 deletions(-) + +--- a/drivers/of/base.c ++++ b/drivers/of/base.c +@@ -1136,6 +1136,15 @@ EXPORT_SYMBOL(of_parse_phandle); + * To get a device_node of the `node2' node you may call this: + * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args); + */ ++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, int index, +--- a/drivers/of/irq.c ++++ b/drivers/of/irq.c +@@ -101,9 +101,9 @@ int of_irq_parse_raw(const __be32 *addr, + u32 intsize = 1, addrsize, newintsize = 0, newaddrsize = 0; + int imaplen, match, i; + +- pr_debug("of_irq_parse_raw: par=%s,intspec=[0x%08x 0x%08x...],ointsize=%d\n", +- of_node_full_name(out_irq->np), out_irq->args[0], out_irq->args[1], +- out_irq->args_count); ++#ifdef DEBUG ++ of_print_phandle_args("of_irq_parse_raw: ", out_irq); ++#endif + + ipar = of_node_get(out_irq->np); + +--- a/include/linux/of.h ++++ b/include/linux/of.h +@@ -274,6 +274,7 @@ extern int of_n_size_cells(struct device + extern const struct of_device_id *of_match_node( + const struct of_device_id *matches, const struct device_node *node); + extern int of_modalias_node(struct device_node *node, char *modalias, int len); ++extern void of_print_phandle_args(const char *msg, const struct of_phandle_args *args); + extern struct device_node *of_parse_phandle(const struct device_node *np, + const char *phandle_name, + int index); |