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/0190-of-irq-Fix-bug-in-interrupt-parsing-refactor.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/0190-of-irq-Fix-bug-in-interrupt-parsing-refactor.patch')
-rw-r--r-- | target/linux/mvebu/patches-3.10/0190-of-irq-Fix-bug-in-interrupt-parsing-refactor.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.10/0190-of-irq-Fix-bug-in-interrupt-parsing-refactor.patch b/target/linux/mvebu/patches-3.10/0190-of-irq-Fix-bug-in-interrupt-parsing-refactor.patch new file mode 100644 index 0000000000..5e1e6053b8 --- /dev/null +++ b/target/linux/mvebu/patches-3.10/0190-of-irq-Fix-bug-in-interrupt-parsing-refactor.patch @@ -0,0 +1,60 @@ +From 1c67d6e7cc30a856e79664e0be3a1f705bad56e4 Mon Sep 17 00:00:00 2001 +From: Grant Likely <grant.likely@linaro.org> +Date: Thu, 19 Dec 2013 09:31:01 -0300 +Subject: [PATCH 190/203] of/irq: Fix bug in interrupt parsing refactor. + +Commit 2361613206e6, "of/irq: Refactor interrupt-map parsing" introduced +a bug. The irq parsing will fail for some nodes that don't have a reg +property. It is fixed by deferring the check for reg until it is +actually needed. Also adjust the testcase data to catch the bug. + +Signed-off-by: Grant Likely <grant.likely@linaro.org> +Tested-by: Stephen Warren <swarren@nvidia.com> +Tested-by: Ming Lei <tom.leiming@gmail.com> +Tested-by: Stephen Warren <swarren@nvidia.com> +Cc: Rob Herring <rob.herring@calxeda.com> + +Conflicts: + arch/arm/boot/dts/testcases/tests-interrupts.dtsi +--- + drivers/of/irq.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +--- a/drivers/of/irq.c ++++ b/drivers/of/irq.c +@@ -147,18 +147,9 @@ int of_irq_parse_raw(const __be32 *addr, + + pr_debug(" -> addrsize=%d\n", addrsize); + +- /* If we were passed no "reg" property and we attempt to parse +- * an interrupt-map, then #address-cells must be 0. +- * Fail if it's not. +- */ +- if (addr == NULL && addrsize != 0) { +- pr_debug(" -> no reg passed in when needed !\n"); +- return -EINVAL; +- } +- + /* Precalculate the match array - this simplifies match loop */ + for (i = 0; i < addrsize; i++) +- initial_match_array[i] = addr[i]; ++ initial_match_array[i] = addr ? addr[i] : 0; + for (i = 0; i < intsize; i++) + initial_match_array[addrsize + i] = cpu_to_be32(out_irq->args[i]); + +@@ -174,6 +165,15 @@ int of_irq_parse_raw(const __be32 *addr, + return 0; + } + ++ /* ++ * interrupt-map parsing does not work without a reg ++ * property when #address-cells != 0 ++ */ ++ if (addrsize && !addr) { ++ pr_debug(" -> no reg passed in when needed !\n"); ++ goto fail; ++ } ++ + /* Now look for an interrupt-map */ + imap = of_get_property(ipar, "interrupt-map", &imaplen); + /* No interrupt map, check for an interrupt parent */ |