aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-07-05 21:31:52 +0000
committerJonas Gorski <jogo@openwrt.org>2015-07-05 21:31:52 +0000
commit1e8c3d2769fcfc0ec0744281bdbb96dfda6ccf32 (patch)
tree5152b01aff51a92c366d5a05212153a4e78b2c0f /target/linux/brcm63xx
parenta6b2271f5df2384fd7d6edd49369b23a73bf8a78 (diff)
downloadupstream-1e8c3d2769fcfc0ec0744281bdbb96dfda6ccf32.tar.gz
upstream-1e8c3d2769fcfc0ec0744281bdbb96dfda6ccf32.tar.bz2
upstream-1e8c3d2769fcfc0ec0744281bdbb96dfda6ccf32.zip
brcm63xx: use IRQCHIP_DECLARE instead of self-baked version
Backport a commit from 4.2 making IRQCHIP_DECLARE available outside of drivers/irqchip and use it. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46183
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r--target/linux/brcm63xx/patches-4.1/002-4.2-irqchip-Move-IRQCHIP_DECLARE-macro-to-include-linux-.patch79
-rw-r--r--target/linux/brcm63xx/patches-4.1/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch2
2 files changed, 80 insertions, 1 deletions
diff --git a/target/linux/brcm63xx/patches-4.1/002-4.2-irqchip-Move-IRQCHIP_DECLARE-macro-to-include-linux-.patch b/target/linux/brcm63xx/patches-4.1/002-4.2-irqchip-Move-IRQCHIP_DECLARE-macro-to-include-linux-.patch
new file mode 100644
index 0000000000..83c07e6a31
--- /dev/null
+++ b/target/linux/brcm63xx/patches-4.1/002-4.2-irqchip-Move-IRQCHIP_DECLARE-macro-to-include-linux-.patch
@@ -0,0 +1,79 @@
+From 91e20b5040c67c51aad88cf87db4305c5bd7f79d Mon Sep 17 00:00:00 2001
+From: Joel Porquet <joel@porquet.org>
+Date: Thu, 2 Jul 2015 15:32:00 -0400
+Subject: [PATCH] irqchip: Move IRQCHIP_DECLARE macro to
+ include/linux/irqchip.h
+
+At the moment the IRQCHIP_DECLARE macro is only declared locally in
+drivers/irqchip/irqchip.h. It prevents from using it directly in arch/*
+directories whenever irqchip drivers only exist there, which happens in a few
+cases (e.g. arc, arm, microblaze and mips).
+
+This patch makes the macro to be globally defined, i.e. in
+include/linux/irqchip.h, and thus usable for arch-specific declarations of
+irqchip drivers. In this way, it is very similar to what clocksource does (ie
+CLOCKSOURCE_OF_DECLARE is defined in include/linux/clocksource.h).
+
+For now, this patch only moves the declaration of the macro
+IRQCHIP_DECLARE to the global header 'include/linux/irqchip.h' and make
+'drivers/irqchip/irqchip.h' include 'include/linux/irqchip.h'. Later, other
+patches will get rid of 'drivers/irqchip/irqchip.h' and modify all the impacted
+irqchip drivers.
+
+Signed-off-by: Joel Porquet <joel@porquet.org>
+Cc: Jason Cooper <jason@lakedaemon.net>
+Link: http://lkml.kernel.org/r/1435865565-14114-1-git-send-email-joel@porquet.org
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+---
+ drivers/irqchip/irqchip.h | 19 +------------------
+ include/linux/irqchip.h | 14 ++++++++++++++
+ 2 files changed, 15 insertions(+), 18 deletions(-)
+
+--- a/drivers/irqchip/irqchip.h
++++ b/drivers/irqchip/irqchip.h
+@@ -8,21 +8,4 @@
+ * warranty of any kind, whether express or implied.
+ */
+
+-#ifndef _IRQCHIP_H
+-#define _IRQCHIP_H
+-
+-#include <linux/of.h>
+-
+-/*
+- * This macro must be used by the different irqchip drivers to declare
+- * the association between their DT compatible string and their
+- * initialization function.
+- *
+- * @name: name that must be unique accross all IRQCHIP_DECLARE of the
+- * same file.
+- * @compstr: compatible string of the irqchip driver
+- * @fn: initialization function
+- */
+-#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)
+-
+-#endif
++#include <linux/irqchip.h>
+--- a/include/linux/irqchip.h
++++ b/include/linux/irqchip.h
+@@ -11,6 +11,20 @@
+ #ifndef _LINUX_IRQCHIP_H
+ #define _LINUX_IRQCHIP_H
+
++#include <linux/of.h>
++
++/*
++ * This macro must be used by the different irqchip drivers to declare
++ * the association between their DT compatible string and their
++ * initialization function.
++ *
++ * @name: name that must be unique accross all IRQCHIP_DECLARE of the
++ * same file.
++ * @compstr: compatible string of the irqchip driver
++ * @fn: initialization function
++ */
++#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)
++
+ #ifdef CONFIG_IRQCHIP
+ void irqchip_init(void);
+ #else
diff --git a/target/linux/brcm63xx/patches-4.1/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch b/target/linux/brcm63xx/patches-4.1/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch
index f640449d65..555352ef11 100644
--- a/target/linux/brcm63xx/patches-4.1/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch
+++ b/target/linux/brcm63xx/patches-4.1/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch
@@ -23,7 +23,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#include <bcm63xx_io.h>
#include <bcm63xx_irq.h>
-+OF_DECLARE_2(irqchip, mips_cpu_intc, "mti,cpu-interrupt-controller",
++IRQCHIP_DECLARE(mips_cpu_intc, "mti,cpu-interrupt-controller",
+ mips_cpu_irq_of_init);
+
void __init arch_init_irq(void)